devsnd / cherrymusic

Stream your own music collection to all your devices! The easy to use free and open-source music streaming server.
http://www.fomori.org/cherrymusic
GNU General Public License v3.0
1.03k stars 189 forks source link

Some way to provide license info in the UI #672

Closed kozross closed 7 years ago

kozross commented 7 years ago

I have a lot of music under various Creative Commons licenses, and I would like it if the CherryMusic UI could display them somehow. I don't mind having it read from a per-directory local file (LICENSE or something) rather than the song metadata, but it would be very nice to have.

devsnd commented 7 years ago

Hey Koz,

Thanks for the suggestion! I however don't see this as part of the scope of what CherryMusic should provide for the users (it is a too niche requirement).

I would however assist you in implementing this feature yourself in your own personal fork, if you want to try. The code is a big mess™, but you could hack it into the song meta info fetching API call.

See you could add per track licensing information here in the API: https://github.com/devsnd/cherrymusic/blob/devel/cherrymusicserver/httphandler.py#L712

You can then add the license to each track.title so it is shown in the playlist: https://github.com/devsnd/cherrymusic/blob/devel/res/js/playlistmanager.js#L829

And for the file browser you could hack it the rendering in here: https://github.com/devsnd/cherrymusic/blob/devel/res/js/mediabrowser.js#L374

Feel free to ask any questions if you get stuck or anything, Good luck! :four_leaf_clover: