You are not logged in.

#1 2012-09-20 13:26:41

twall
Member
Registered: 2011-04-26
Posts: 12

CherryMusic - a python music server with an HTML5 frontend

Hey fellow archers!

CherryMusic
a music streaming server written in python with an HTML5 frontend

  • nothing to setup, uses SQLite file database

  • light on resources

  • support for all major browsers on almost all OSes (also your fancy phone!)

AUR: cherrymusic
You can install the latest version from the AUR.

current features (v0.24.1) are:

  • super pretty new interface

  • browse and stream your music inside the browser (locally or remote)

  • full text search your music

  • completely AJAX based (no page reloads on click, super fast)

  • create and share playlists in

  • multiple user authentication

  • HTTPS support

  • live transcoding (e.g. you can stream flac over slow connections)

Screenshots and more documentation
on our project website fomori.org/cherrymusic

Also, it would be of great help, if you installed the git version from the AUR, so we're not the only ones testing the software :)

If you're interested on how it works you can also checkout the sources on github. If you find any bugs or have any issues please  open an issue at github, so we can fix it!

Last edited by twall (2013-03-12 17:17:42)

Offline

#2 2012-09-20 13:47:56

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: CherryMusic - a python music server with an HTML5 frontend

Exciting! Looking forward to trying this.

EDIT: For me on Firefox, when I am on the playlist page, the stop button doesn't stop and the pause button doesn't pause. The pause button does nothing and the stop button restarts the playing track. The behaviour is the same whether or not the loop button is on.

Last edited by hellomynameisphil (2012-09-20 14:24:03)

Offline

#3 2012-09-20 14:21:49

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: CherryMusic - a python music server with an HTML5 frontend

Great stuff, keep it up!


ᶘ ᵒᴥᵒᶅ

Offline

#4 2012-09-20 14:31:38

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,835

Re: CherryMusic - a python music server with an HTML5 frontend

Totally off-topic: Il Civetto!! My sister's boyfriend's son is in that band!

On-topic: good stuff, looking forward to trying it. smile

Offline

#5 2012-09-20 14:50:27

twall
Member
Registered: 2011-04-26
Posts: 12

Re: CherryMusic - a python music server with an HTML5 frontend

hellomynameisphil wrote:

Exciting! Looking forward to trying this.

EDIT: For me on Firefox, when I am on the playlist page, the stop button doesn't stop and the pause button doesn't pause. The pause button does nothing and the stop button restarts the playing track. The behaviour is the same whether or not the loop button is on.

What version of firefox are you using? I cant reproduce this behaviour on mine (15.0.1)...

Last edited by twall (2012-09-20 14:51:16)

Offline

#6 2012-09-20 15:13:37

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: CherryMusic - a python music server with an HTML5 frontend

I'm also having a few problems unfortunately, the main one being that pressing play doesn't start playback. smile

This is using the devel version and either Chromium or Firefox, no javascript errors or log lines on the backend. I can use the next/prev buttons and the small dot moves in the playlist, but the tracks don't actually start playing.


ᶘ ᵒᴥᵒᶅ

Offline

#7 2012-09-20 15:25:19

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,835

Re: CherryMusic - a python music server with an HTML5 frontend

Using the git version here, important stuff like playing songs is all good. smile

One minor issue - I can't change the theme.

Offline

#8 2012-09-20 15:29:39

6arms1leg
Member
Registered: 2011-04-19
Posts: 18

Re: CherryMusic - a python music server with an HTML5 frontend

tomk wrote:

One minor issue - I can't change the theme.

Did you reload the page? Your browser is probably using the cache.

Offline

#9 2012-09-20 15:30:39

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,835

Re: CherryMusic - a python music server with an HTML5 frontend

Yes I reloaded the page.

Offline

#10 2012-09-20 15:33:26

twall
Member
Registered: 2011-04-26
Posts: 12

Re: CherryMusic - a python music server with an HTML5 frontend

litemotiv wrote:

I'm also having a few problems unfortunately, the main one being that pressing play doesn't start playback. :)

This is using the devel version and either Chromium or Firefox, no javascript errors or log lines on the backend. I can use the next/prev buttons and the small dot moves in the playlist, but the tracks don't actually start playing.

Ah, i guess I know why. You probably have some kind of flashblock enabled: This lets the client wait for the swf to load infinitively. We haven't found a workaround for that as of now. At least in firefox you can add "localhost" to you flashblock whitelist.

If thats not it, it could be related to the filetype you are trying to play. Which one is it?

Offline

#11 2012-09-20 15:35:37

twall
Member
Registered: 2011-04-26
Posts: 12

Re: CherryMusic - a python music server with an HTML5 frontend

tomk wrote:

Yes I reloaded the page.

Try deleting the browser cache to resolve it. I will open an issue for that, because i see that clearing the cache isn't really a viable solution.
Also, if you mistyped the theme name, it will use the default one.

Offline

#12 2012-09-20 15:49:20

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: CherryMusic - a python music server with an HTML5 frontend

twall wrote:

Ah, i guess I know why. You probably have some kind of flashblock enabled: This lets the client wait for the swf to load infinitively. We haven't found a workaround for that as of now. At least in firefox you can add "localhost" to you flashblock whitelist.

That's it! Maybe a notification would be a nice idea to inform the user about this?

Edit: your website says that "By default it uses HTML5 for music playback and supports flash as fallback.", i should be able to play html5...

If thats not it, it could be related to the filetype you are trying to play. Which one is it?

mp3 plays okay, flac doesn't seem to be working (that's probably why you haven't included it in the default file list). I'm guessing that the flashplayer doesn't support this?

Last edited by litemotiv (2012-09-20 15:52:28)


ᶘ ᵒᴥᵒᶅ

Offline

#13 2012-09-20 16:08:36

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: CherryMusic - a python music server with an HTML5 frontend

twall wrote:
hellomynameisphil wrote:

Exciting! Looking forward to trying this.

EDIT: For me on Firefox, when I am on the playlist page, the stop button doesn't stop and the pause button doesn't pause. The pause button does nothing and the stop button restarts the playing track. The behaviour is the same whether or not the loop button is on.

What version of firefox are you using? I cant reproduce this behaviour on mine (15.0.1)...

Ah, seems like it's the vimperator plugin which is somehow causing this. Disabling it seems to fix the issue.

Offline

#14 2012-09-20 18:50:18

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,835

Re: CherryMusic - a python music server with an HTML5 frontend

I'd rather not dump my cache at the moment, but I did try it with a different Firefox profile, and the correct theme showed up - but only the first time. That profile is now stuck on 'hax1337', while this one is stuck on 'zeropointtwo', regardless of the config file, page refreshes, or server restarts.

Offline

#15 2012-09-21 04:25:14

DoctorSamulus
Member
Registered: 2010-11-04
Posts: 53

Re: CherryMusic - a python music server with an HTML5 frontend

It doesn't work in dwb (but I'm pretty sure this is because of the builtin flashblock like you mentioned above) or jumanji (no flashblock). It does work on my android phone though in the native browser. I like the concept though.

Offline

#16 2012-09-23 08:38:45

maevius
Member
From: Greece
Registered: 2009-09-10
Posts: 132
Website

Re: CherryMusic - a python music server with an HTML5 frontend

Hi, using latest git on firefox 15.0.1. I can't seem to play any songs (mp3 tested). There bumps this (not so helpful) message:

I'm sorry, but this is an error message...

It indicates an error... *sigh*
Sorry, it's just... my whole purpose of existance is to give bad news.
It's frustrating.
Would you mind just clicking 'ok' and leave me alone?

I use the default config. Here's the server.log. Clearing cache doesn't help.

[23/Sep/2012:11:17:46] HTTP Traceback (most recent call last):
  File "/usr/lib/python3.2/site-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/lib/python3.2/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3.2/site-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python3.2/site-packages/cherrymusicserver/httphandler.py", line 137, in api
    return self.handlers[action](value)
  File "/usr/lib/python3.2/site-packages/cherrymusicserver/httphandler.py", line 217, in api_getsonginfo
    return json.dumps(metainfo.getSongInfo(abspath).dict())
  File "/usr/lib/python3.2/site-packages/cherrymusicserver/metainfo.py", line 102, in getSongInfo
    with ar.audio_open(filepath) as f:
TypeError: object.__new__() takes no parameters

[23/Sep/2012:11:20:25] HTTP Traceback (most recent call last):
  File "/usr/lib/python3.2/site-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/lib/python3.2/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3.2/site-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python3.2/site-packages/cherrymusicserver/httphandler.py", line 137, in api
    return self.handlers[action](value)
  File "/usr/lib/python3.2/site-packages/cherrymusicserver/httphandler.py", line 217, in api_getsonginfo
    return json.dumps(metainfo.getSongInfo(abspath).dict())
  File "/usr/lib/python3.2/site-packages/cherrymusicserver/metainfo.py", line 102, in getSongInfo
    with ar.audio_open(filepath) as f:
TypeError: object.__new__() takes no parameters

[23/Sep/2012:11:20:48] HTTP Traceback (most recent call last):
  File "/usr/lib/python3.2/site-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/lib/python3.2/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3.2/site-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python3.2/site-packages/cherrymusicserver/httphandler.py", line 137, in api
    return self.handlers[action](value)
  File "/usr/lib/python3.2/site-packages/cherrymusicserver/httphandler.py", line 217, in api_getsonginfo
    return json.dumps(metainfo.getSongInfo(abspath).dict())
  File "/usr/lib/python3.2/site-packages/cherrymusicserver/metainfo.py", line 102, in getSongInfo
    with ar.audio_open(filepath) as f:
TypeError: object.__new__() takes no parameters

PS: When it starts for the first time it says:

[120923-11:30] WARNING : python library "stagger" not found!
There will be no ID-tag support!
[120923-11:28] WARNING : python library "audioread" not found!
Audio file length can't be determined without it!

So, I installed stagger and the warning disappeared. As for audioread,  is it written in python 2 or 3? I made a PKGBUILD for python2 as there is no pkg in AUR. Building it with python3 I get some SyntaxError: invalid syntax while building. Maybe you should add those two packages as optdepends.


EDIT
Well, it seems that the songs are loaded in the playlist after all. The message I mentioned above keeps popping each time I add a song to the list, though.

Last edited by maevius (2012-09-23 08:45:29)

Offline

#17 2012-09-23 10:02:29

6arms1leg
Member
Registered: 2011-04-19
Posts: 18

Re: CherryMusic - a python music server with an HTML5 frontend

maevius wrote:

Hi, using latest git on firefox 15.0.1. I can't seem to play any songs (mp3 tested). There bumps this (not so helpful) message:

    I'm sorry, but this is an error message...

    It indicates an error... *sigh*
    Sorry, it's just... my whole purpose of existance is to give bad news.
    It's frustrating.
    Would you mind just clicking 'ok' and leave me alone?

I use the default config.[...]

This is a bug in the newest devel branch, see this bug report.

maevius wrote:

PS: When it starts for the first time it says:

[120923-11:30] WARNING : python library "stagger" not found!
There will be no ID-tag support!
[120923-11:28] WARNING : python library "audioread" not found!
Audio file length can't be determined without it!

So, I installed stagger and the warning disappeared. As for audioread,  is it written in python 2 or 3? I made a PKGBUILD for python2 as there is no pkg in AUR. Building it with python3 I get some SyntaxError: invalid syntax while building. Maybe you should add those two packages as optdepends.

you are using the unstable devel-branch from github, which is under heavy development right now. the above startup error you get is because of the developers "[...]first steps of optional dependencies[...]". see this bug report.
so right now, there is no need to make a new PKGBUILD and include (or install) these newly (not fully introduced) optional dependencies into the PKGBUILD. as soon as the optional dependencies are fully implemented and actually used, the PKGBUILD in AUR will be updated.

for now, you can use version 0.2 from the stable master branch until these bugs get fixed (which is probably very soon). its also in AUR.

EDIT:

you said you use the default config. besides the bugs, you need to at least edit the path to your music directory (just in case you didnt).

Last edited by 6arms1leg (2012-09-23 10:09:32)

Offline

#18 2012-09-23 12:42:50

6arms1leg
Member
Registered: 2011-04-19
Posts: 18

Re: CherryMusic - a python music server with an HTML5 frontend

litemotive wrote:

mp3 plays okay, flac doesn't seem to be working (that's probably why you haven't included it in the default file list). I'm guessing that the flashplayer doesn't support this?

right.

Offline

#19 2012-09-23 13:08:46

twall
Member
Registered: 2011-04-26
Posts: 12

Re: CherryMusic - a python music server with an HTML5 frontend

maevius wrote:
[120923-11:30] WARNING : python library "stagger" not found!
There will be no ID-tag support!
[120923-11:28] WARNING : python library "audioread" not found!
Audio file length can't be determined without it!

So, I installed stagger and the warning disappeared. As for audioread,  is it written in python 2 or 3? I made a PKGBUILD for python2 as there is no pkg in AUR. Building it with python3 I get some SyntaxError: invalid syntax while building. Maybe you should add those two packages as optdepends.


EDIT
Well, it seems that the songs are loaded in the playlist after all. The message I mentioned above keeps popping each time I add a song to the list, though.

The optional dependencies should be working now in the devel branch of the sources at github. But you are right: audioread is actually python2 and i ported some, but not all of it to python 3. So i guess it will be integrated into CherryMusic anyway.

Anyway, those packages will be optdepends: But I really would like the user to notice, that they will miss out a lot, if they don't install them, because the next release will have ID3 indexing... but only if stagger is installed.

Offline

#20 2012-09-24 22:49:28

6arms1leg
Member
Registered: 2011-04-19
Posts: 18

Re: CherryMusic - a python music server with an HTML5 frontend

to maevius: there is a new PKGBUILD (and new commits on github) that addresses your issues and suggestion.

Offline

#21 2012-10-28 18:21:21

twall
Member
Registered: 2011-04-26
Posts: 12

Re: CherryMusic - a python music server with an HTML5 frontend

Version 0.21.1 is out!

Changes (summary):

  - Faster DB updates (use --update switch to trigger update)
  - Improved search (allows partial search terms)
  - Exporting playlists as M3U or PLS
  - Show playtime of tracks and the playlist
  - Experimental: live transcoding for ultimative browser support
  - many bug fixes and more features, see changelog

To get all new configuration options, run
  $ cherrymusic --newconfig
This will create a ~/.cherrymusic/config.new file with all available configuration options.

Offline

#22 2013-03-12 16:52:42

twall
Member
Registered: 2011-04-26
Posts: 12

Re: CherryMusic - a python music server with an HTML5 frontend

Version 0.24.1 has been released!
Please check it out.

Since there happened a _lot_, I'll just outline the major changes:

- Completely reworked the UI
- Even simpler setup; Configuration can be done directly in the browser on first start.
- Backward compability to python 2.6+ (not interesting for arch users, but anyway)
- A lot lot lot more.
Full changelog is here:
http://fomori.org/cherrymusic/#changes

Screenshots and some more documentation are provided on project website:
http://fomori.org/cherrymusic/

You can get the newest release from the AUR:
https://aur.archlinux.org/packages/cherrymusic/

To get started you can simply start CherryMusic like so:
   $ python cherrymusic --setup --port 8080
and then open your browser:
   $ firefox localhost:8080

Please report any bug you find at http://github.com/devsnd/cherrymusic/issues thanks!

Offline

Board footer

Powered by FluxBB