Live data from Hacker News

Serve Your Music Collection Using HTML5, Backbone, and Flask

git.zx2c4.com

71–80 of 86 posts

Re: Serve Your Music Collection Using HTML5, Backbone, and Flask

#71
post #63
post #41

Wow, this is crazy because I'm working on a streaming music player of my own, also using HTML5, Backbone and Flask. (As well as Flask-SQLAlchemy and Mutagen, but those are obvious choices given Flask.) Congrats on shipping first. How long have you been working on this? I might actually use yours until my take on this is done. It certainly looks superior to Subsonic in every way. I'm still going to finish mine, becaus…

Crazily, I have also built a (rudimentary) similar project out of Flask, Backbone, and HTML5 audio (and Mutagen, of course). It's a piece of a larger music-management puzzle: http://beets.readthedocs.org/en/1.0rc2/plugins/web.html Anyway, zx2c4's project is obvious slicker than mine. It's somewhat crazy that all the people on this thread saying "hey, me too" are only now finding each other. I think there are some pre…

I've looked at this one, actually! Are you the author of beets itself?

beets is a great music importer. A few months ago I wanted to write something like that — looking up releases in a central repository, automatically correcting tags and renaming. But I hadn't got very far, so I abandoned the project when I saw you had already done it way better.

I would prefer if it pulled data from Discogs instead of MusicBrainz. Have you considered using the Discogs API? In my limited experience, MusicBrainz disappoints me by "correcting" tags to something wrong because there's a typo in the DB, or changing the typography ("and" -> "&", "... (Part One)" -> "..., Part 1") in a way that doesn't match the official track listing. Also a very, very large percentage of albums I run through beets aren't in the MB database at all. I think I'm spoiled by how good Discogs is: these problems would mostly go away. Last.fm's data might also be an improvement, though it's not on par with Discogs.

> it would be prudent to informally standardize a REST/JSON API for music collections

This sounds cool. If you come up with a spec for this, I'd like to know too (email in profile).

Re: Serve Your Music Collection Using HTML5, Backbone, and Flask

#72

This is lovely - thanks a lot! I listen to a lot of foreign music and have had a hard time populating my zmusic database. There's a work-around (decode the relevant strings to Unicode) that seems to have worked but I have to leave for work before I'll be able to test this fully. I've never submitted a patch before and hope to use this as an opportunity to learn how to make one. I have a basic question, however: why d…

OT, but spaces are more common because they're strongly recommended by PEP 8, the community style guide for Python code.

http://www.python.org/dev/peps/pep-0008/#tabs-or-spaces

Re: Serve Your Music Collection Using HTML5, Backbone, and Flask

#73
post #62

Sadly this link doesn't seem to work anymore. The about-page is broken? But i had this open in a different browser some minutes ago and it seemed quite impressive. Especially the encoding on the fly, as that is something I experimented with on my own mini-project ( https://github.com/onli/music-streamer , ruby with sinatra, plain html5-audio). I'll have a look at your code how you did it, but I wonder if that would w…

I can't seem to clone the repo anymore - can someone push it to github?

Re: Serve Your Music Collection Using HTML5, Backbone, and Flask

#74
post #45
post #41

Wow, this is crazy because I'm working on a streaming music player of my own, also using HTML5, Backbone and Flask. (As well as Flask-SQLAlchemy and Mutagen, but those are obvious choices given Flask.) Congrats on shipping first. How long have you been working on this? I might actually use yours until my take on this is done. It certainly looks superior to Subsonic in every way. I'm still going to finish mine, becaus…

cool.I made one that streams from Google Drive on top of App Engine using Backbone. http://tunebanda.com

Nice. Do you pay for Google Drive? My music collection is too large to store in the cloud affordably. But this looks cool, I'm uploading an album to my (previously unused) Drive to try it out.

Edit: Hmm, seems glitchy. The music is playing but tags won't load and a random textbox is obscuring part of the UI. http://i.imgur.com/sJwd2.png

Re: Serve Your Music Collection Using HTML5, Backbone, and Flask

#75
post #73
post #62

Sadly this link doesn't seem to work anymore. The about-page is broken? But i had this open in a different browser some minutes ago and it seemed quite impressive. Especially the encoding on the fly, as that is something I experimented with on my own mini-project ( https://github.com/onli/music-streamer , ruby with sinatra, plain html5-audio). I'll have a look at your code how you did it, but I wonder if that would w…

I can't seem to clone the repo anymore - can someone push it to github?

Dreamhost is tweaking out. Mirror:

http://github.com/zx2c4/zmusic-ng

Re: Serve Your Music Collection Using HTML5, Backbone, and Flask

#76
post #72

This is lovely - thanks a lot! I listen to a lot of foreign music and have had a hard time populating my zmusic database. There's a work-around (decode the relevant strings to Unicode) that seems to have worked but I have to leave for work before I'll be able to test this fully. I've never submitted a patch before and hope to use this as an opportunity to learn how to make one. I have a basic question, however: why d…

OT, but spaces are more common because they're strongly recommended by PEP 8, the community style guide for Python code. http://www.python.org/dev/peps/pep-0008/#tabs-or-spaces

Yea. Yea, yea. Yea...

But I like tabs. Old habit.

Re: Serve Your Music Collection Using HTML5, Backbone, and Flask

#78
post #70
post #69

Really nice! One thing that concerns me though is the CPU usage on the client machine. chromium uses roughly ~30% CPU on a 6-core AMD Phenom II running only zmusic. Anyone else seeing this too?

That's quite astounding, yikes. I have less than 1 percent of CPU usage with my Chromium. (Using latest dev channel, built from scratch with -march=native -O2 -fomit-frame-pointers -pipe.) If there's high CPU usage, file a Chrome bug -- it's possibly do to some nastiness in their audio decoder.

Found out that it seems to be the drawing of the progress bar, as weird as that may sound. When I switch to another tab, the CPU usage drops. I'm on Linux using the open source ATI radeon driver, that might have something to do with it.

Re: Serve Your Music Collection Using HTML5, Backbone, and Flask

#80
post #74
post #45

Earlier quoted context omitted.

cool.I made one that streams from Google Drive on top of App Engine using Backbone. http://tunebanda.com

Nice. Do you pay for Google Drive? My music collection is too large to store in the cloud affordably. But this looks cool, I'm uploading an album to my (previously unused) Drive to try it out. Edit: Hmm, seems glitchy. The music is playing but tags won't load and a random textbox is obscuring part of the UI. http://i.imgur.com/sJwd2.png

No I don't.I'm using the Drive API https://developers.google.com/drive/ which is free.I'm still very much testing it out but there's a lag in retrieving tags.I'm curious though how it works for you now?
Post reply on HN