Live data from Hacker News

Serve Your Music Collection Using HTML5, Backbone, and Flask

git.zx2c4.com

31–40 of 86 posts

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

#31

Pretty interesting. What does your uwsgi line look like? Mine keeps failing with "ImportError: No module named zmusic.login". I'm running: uwsgi --socket /tmp/uwsgi-zmusic.sock --file /home/user/zmusic-ng/backend/zmusic -H /home/user/zmusic-ng/venv --callable app --processes 4

Try adding a --pythonpath or --chdir that points to the project directory in addition to the -H pointing to the venv.

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

#32

Pretty interesting. What does your uwsgi line look like? Mine keeps failing with "ImportError: No module named zmusic.login". I'm running: uwsgi --socket /tmp/uwsgi-zmusic.sock --file /home/user/zmusic-ng/backend/zmusic -H /home/user/zmusic-ng/venv --callable app --processes 4

What you want is zmusic:app with the -w switch.

    -w zmusic:app --socket /tmp/uwsgi-zmusic.sock --chmod-socket=660
Using --chdir to change to the backend/ directory may be useful as well.

I've just updated the README with these instructions.

I've also added a section on using uwsgi in standalone mode, as the built-in debugging server can't handle concurrent requests.

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

#34
post #32

Pretty interesting. What does your uwsgi line look like? Mine keeps failing with "ImportError: No module named zmusic.login". I'm running: uwsgi --socket /tmp/uwsgi-zmusic.sock --file /home/user/zmusic-ng/backend/zmusic -H /home/user/zmusic-ng/venv --callable app --processes 4

What you want is zmusic:app with the -w switch. -w zmusic:app --socket /tmp/uwsgi-zmusic.sock --chmod-socket=660 Using --chdir to change to the backend/ directory may be useful as well. I've just updated the README with these instructions. I've also added a section on using uwsgi in standalone mode, as the built-in debugging server can't handle concurrent requests.

Thanks, that seemed to do the trick!

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

#35

what's behind not being able to search while a song is playing or paused? is that expected behavior?

You're using the built-in debugging server, which does not handle concurrent requests. To use something standalone, that's a bit more robust, use uwsgi:

    zmusic-ng $ uwsgi --chdir backend/ -w zmusic:app --http-socket 0.0.0.0:5000
I've updated the README to reflect this suggestion:

http://git.zx2c4.com/zmusic-ng/about/#standalone

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

#36
post #16

If you're interested in a program that does this + video check out Subsonic: http://www.subsonic.org/ .

I must say, its not nearly as slick as the article's linked, and it uses flash

To be fair, the screenshots do not do it justice. The default theme is a lot more slick than the horrible blue themes in the screen shots.

You also have to bare in mind that Subsonic also has native players for a whole bucket load of platforms (both mobile and desktop), supports video, transcodes, is multi user and has a tone of other neat functions.

In many ways, Subsonic is more akin to Spotify.

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

#38

Does anyone know anything that can do the same thing for movies? Specifically the transcoding part. I use plex, but i hate the fact that they add in GA tracking.

As already mentioned in these comments, Subsonic will do that.

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

#40
Amazing. Hat off to you, sir! I've stumbled through a few of such projects and most fell flat on their collective noses, at the latest when it came to seeking. zmusic-ng works phenomenally well. Next thing I want to try is over a slow and laggy connection, but that has to wait for later.

One minor, minor gripe is that it uses a Makefile instead of the canonical setup.py for building. (did I mention "minor"?) For me personally, it makes up for this fact by using Flask. (Yes, i am unabashedly a fanboy of that microframework. squeee)

One question though: What is the [git-root]/server.cfg? it seems not to have an influence? is it deprecated?

Post reply on HN