GithubHelp home page GithubHelp logo

jukebox's Introduction

Unmaintained

The big time of local mp3 libraries is over. Therefore this project has been abandoned and is currently unmaintained. Maybe have a look at https://qca.st/ which provides jukebox functionalities for music streaming services.

Democratic Jukebox - your democratic music player

Ever wanted to listen to music with a larger group of people e.g. in your office? Who decides what to play? Make your music player democratic and give everyone the chance to promote their favourite song.

Jukebox provides a web interface to search your music library and vote for songs to be played. The more votes a song gets, the sooner you will listen to it.

At one point in your life your play queue might get empty. Don't worry, the jukebox will keep on playing. The playback system figures out who is online using the web interface or API and plays music to their liking.

Required system libraries

libshout3, libshout3-dev and python-dev are required to build the dependecy python-shout.

Democratic Jukebox - your democratic music player

General

  • Jukebox is available in english, german and brazilian portuguese
  • Jukebox uses Facebook, Twitter and Github for authentication (see django-social-auth for more authentication providers)

Setup

Install virtualenvwrapper via pip if not alreay done:

sudo pip install virtualenvwrapper

Set up a project for jukebox:

mkproject jukebox

Install the jukebox in your fresh virtual environment:

workon jukebox
pip install jukebox

Now it's time to configure the jukebox

  1. Enter admin credentials and select authentication providers
  2. Create the database
  3. Index your music

That's all

jukebox jukebox_setup
jukebox syncdb
jukebox migrate
jukebox jukebox_index --path=/path/to/library

The django builtin development webserver will be sufficient to serve your office or party. Just start it up:

jukebox runserver ip:port

Now you're ready to put music in the queue.

Playback

Currently there are two methods of playing the music chosen in jukebox.

shoutcast

Stream your music to a shoutcast compatible server

pip install jukebox-shout

See jukebox_shout for details and startup command.

mpg123

Play your music locally on the machine running the jukebox.

pip install jukebox-mpg123

See jukebox_mpg123 for details and startup command.

Contribute!

Feel free to write additional playback modules and I'll add them to the list above.

Live indexing

There is no need to update your index every time a new song is added to your library, just use the live indexer package.

pip install jukebox-live-indexer

See jukebox_live_indexer for details and startup command.

API

jukebox_core provides a fully fledged REST API for authenticated users. See API reference

Search filters

Jukebox supports google-like search filter. Available search fields: title, artist, album, genre, year.

title:(love to dance) artist:bobby
artist:(bobby baby) lucky
title:(in ten years) genre:electronic

License

MIT License. See License

Contribute!

You want to contribute to this project? Just fork the repo and do this:

mkproject jukebox
git clone [email protected]:[username]/jukebox.git .
git remote add upstream git://github.com/lociii/jukebox.git
pip install -r requirements.txt
cd jukebox

Follow up configuring jukebox like described in Setup. Use ./manage.py instead of the jukebox command.

You can now create a branch to make your actual changes and send a pull request. See this article for how to do this.

Contributors

Release Notes

0.1.0

  • Initial release

0.1.1

  • Fixed installer bugs
  • Added personal history
  • Added system tests for api

0.2.0

  • Language switch
  • Sortable lists
  • Google-like search operators
  • Autoplay tries to play appropriate music
  • Improved web interface

0.2.1

  • fixed issue with autoplay

0.3.0

  • Added jukebox_watch
  • Added list of voters
  • Minor improvements

0.3.1

  • Improved exception handling
  • Added rss for current song
  • Minor bug fixes

0.3.2

  • Update dependencies
  • Fix authentication problems
  • Switch from inotify to watchdog

0.3.3

  • Fix manifest

0.3.4

  • Fix to skip unauthorized sessions
  • Updated wsgi handler

0.3.5

  • Update mutagen (Thanks guys for removing old packages)
  • Fixed minor bugs (Thanks to saz)

0.3.7

  • Fix buggy pypi package

0.4.0

  • Split jukebox in different packages
  • Strip artist from album data

0.4.1

  • Add missing wsgi file

jukebox's People

Contributors

amirhhz avatar gabber7 avatar hoffmann avatar jone avatar lociii avatar luanfonceca avatar mounirmesselmeni avatar saz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jukebox's Issues

Switch to watchdog

https://github.com/gorakhargosh/watchdog

Right now, jukebox cannot be used on OSX as it relies on inotify, which does not exist for OSX.

Since it seems inotify is mostly used for scanning folders for changes, I would like to request to a plaform independent solution such as watchdog.

Newbe Guide

Is there any chance to get a How-To in detail ?
I was fighting through those steps in the project-description but at the end it does not work.
I am using a RPi 3 Model B.
I would gladly build it to a jukebox with a WLan Access Point for a jukebox with a voting system via a website reachable over something like "juke.box" as URL.
I made my RPi to a Access Point already. But can not get a jukebox to run yet. A Video from a fresh RPi to working jukebox would be the most awesome thing but a more detailed text-Guide (from zero to jukebox) should work as well :)
Thanks already :)

Local authentication method

Is there a way to use an authentication method which is provided local without internet connection?
I think of a simple username:password list.
Thanks!

Regards Udo

Web Interface access

Hi
Access to Web Interface is only inside LAN?
Is there any other way to access WebUI (wan)?

Support more file types

I've noticed that .m4a (MPEG 4 Audio) are not indexed.
The underlaying library for indexing mutagen seems to support it.

http://pypi.python.org/pypi/mutagen/ :
It supports ASF, FLAC, M4A, Monkey's Audio, MP3, Musepack, Ogg FLAC, Ogg Speex, Ogg Theora, Ogg Vorbis, True Audio, WavPack and OptimFROG audio files.

Is there a reason it is not indexed (e.g. it can't be played back later) or was it just not needed yet?

TemplateDoesNotExist

The .html files are in different directories than the program points to. If I move the html files, I get NoReverseMatch errors. If I edit the settings files to change the pointing directory than it gives me other exceptions. I have reinstalled jukebox 2 times, but I keep getting the same issue.

'NoneType' object has no attribute '_info'

After the start of the service, jukebox runserver 0.0.0.0:9999
Prompt for access
`AttributeError at /

'NoneType' object has no attribute '_info'

Request Method: GET
Request URL: http://0.0.0.0:9999/
Django Version: 1.4.5
Exception Type: AttributeError
Exception Value:

'NoneType' object has no attribute '_info'

Exception Location: /home/lin/.virtualenvs/jukebox/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py in _fetch, line 147
Python Executable: /home/lin/.virtualenvs/jukebox/bin/python
Python Version: 2.7.12
Python Path:

['/home/lin/.virtualenvs/jukebox/bin',
'/home/lin/.virtualenvs/jukebox/lib/python2.7',
'/home/lin/.virtualenvs/jukebox/lib/python2.7/plat-x86_64-linux-gnu',
'/home/lin/.virtualenvs/jukebox/lib/python2.7/lib-tk',
'/home/lin/.virtualenvs/jukebox/lib/python2.7/lib-old',
'/home/lin/.virtualenvs/jukebox/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/lin/.virtualenvs/jukebox/local/lib/python2.7/site-packages',
'/home/lin/.virtualenvs/jukebox/lib/python2.7/site-packages',
'/home/lin/.virtualenvs/jukebox/local/lib/python2.7/site-packages/jukebox',
'/home/lin/.jukebox',
'/home/lin/.jukebox']

Server time: Sat, 3 Dec 2016 07:49:03 +0100

/home/lin/.virtualenvs/jukebox/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py in _fetch

        # We want to ensure that, for example,  "en-gb" and "en-us" don't share

        # the same translation object (thus, merging en-us with a local update

        # doesn't affect en-gb), even though they will both use the core "en"

        # translation. So we have to subvert Python's internal gettext caching.

        base_lang = lambda x: x.split('-', 1)[0]

        if base_lang(lang) in [base_lang(trans) for trans in _translations]:

            res._info = res._info.copy()

 ...

            res._catalog = res._catalog.copy()

        def _merge(path):

            t = _translation(path)

            if t is not None:

                if res is None:

`

Seamless upgrade

Provide a command to update the pip package without the need to setup the jukebox again.

TODO:

  • Backup database
  • Backup settings_local.py
  • Upgrade pip package
  • Restore database
  • Restore settings_local.py

google like search filter

i would like to enter 'artist:bobby baby' to search for songs from bobby baby instead of opening the advanced search filters.

Indexer crashes

The indexer crashes if you try to import a lot of songs. Is there anything held in memory or are there any restrictions on the number of songs in the database? Please reply if there is an upper bound on the number so that I do not try to import again ;)

EDIT: After the crash I have 37721 songs in the database.

Here is the stack trace:
jukebox jukebox_index --path=/[some path]
Indexing music in /media/truecrypt1
This may take a while
Traceback (most recent call last):
File "/usr/local/bin/jukebox", line 17, in
execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 459, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/usr/local/lib/python2.7/dist-packages/jukebox/jukebox_core/management/commands/jukebox_index.py", line 25, in handle
self.index(options["path"], int(options["verbosity"]))
File "/usr/local/lib/python2.7/dist-packages/jukebox/jukebox_core/management/commands/jukebox_index.py", line 37, in index
self.index(filename + "/", verbosity)
File "/usr/local/lib/python2.7/dist-packages/jukebox/jukebox_core/management/commands/jukebox_index.py", line 37, in index
self.index(filename + "/", verbosity)
File "/usr/local/lib/python2.7/dist-packages/jukebox/jukebox_core/management/commands/jukebox_index.py", line 37, in index
self.index(filename + "/", verbosity)
File "/usr/local/lib/python2.7/dist-packages/jukebox/jukebox_core/management/commands/jukebox_index.py", line 41, in index
indexer.index(filename)
File "/usr/local/lib/python2.7/dist-packages/jukebox/jukebox_core/utils.py", line 26, in index
tags[k] = v[0].lower()

Wont log in

I cant log in using any of the 3 methods, errors or missing pages for each

Downvote/skip a playing/queued song

It would be nice, if one can vote to stop playing the current or queued song.
If the votes against the song are higher than the votes for that song it should be dropped from the queue or stopped playing.

Custom Login

Is there any possibility to use a simple Login Provider when jukebox has no online access?
I would like to use this application at a party where every user should just login and nobody has internet access.

bin/pip install jukebox unable to download mutagen.

the install fails for me when running bin/pip install jukebox


pi@raspberrypi ~/jukebox $ bin/pip install jukebox
Downloading/unpacking jukebox
Downloading jukebox-0.3.4.tar.gz (99Kb): 99Kb downloaded
Running setup.py egg_info for package jukebox

Downloading/unpacking Django==1.4.5 (from jukebox)
Downloading Django-1.4.5.tar.gz (7.7Mb): 7.7Mb downloaded
Running setup.py egg_info for package Django

Downloading/unpacking mutagen==1.20 (from jukebox)
Could not find a version that satisfies the requirement mutagen==1.20 (from jukebox) (from versions: )
No distributions matching the version for mutagen==1.20 (from jukebox)
Storing complete log in /home/pi/.pip/pip.log


when i check pip.log

No distributions matching the version for mutagen==1.20 (from jukebox)

the script follows the links
http://pypi.python.org/simple/mutagen/1.20
http://pypi.python.org/simple/mutagen/
http://code.google.com/p/mutagen/

and finally ignores Ignoring link http://mutagen.googlecode.com/files/mutagen-1.21.tar.gz before failing.

error on bad mp3 files

File "/home/pi/jukebox/lib/python2.6/site-packages/mutagen/id3.py", line 211, in __load_header
raise ID3NoHeaderError("'%s' doesn't start with an ID3 tag" % fn)
mutagen.id3.ID3NoHeaderError: '/media/usbstick/Amon Tobin/Cujo/._01 Paris Streatham.mp3' doesn't start with an ID3 tag

the solution is to catch ID3NoHeaderError line 112 in jukebox_core/management/commands/jukebox_index.py and just skip it

Provide browser back button functionality

When searching for an artist, selecting one and then clicking "back" in the browser, the navigation returns to the main site instead of the previous artist search. But it should return to the previously submitted artist search.

System cant index songs anymore

/jukebox$ sudo bin/jukebox jukebox_index --path=/media/2tb/Musik/

Indexing music in /media/2tb/Musik/
This may take a while
Traceback (most recent call last):
File "bin/jukebox", line 14, in
execute_manager(settings)
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/core/manage ment/init.py", line 459, in execute_manager
utility.execute()
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/core/manage ment/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/core/manage ment/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/core/manage ment/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/home/lange/jukebox/local/lib/python2.7/site-packages/jukebox/jukebox_co re/management/commands/jukebox_index.py", line 102, in handle
self.index(options["path"])
File "/home/lange/jukebox/local/lib/python2.7/site-packages/jukebox/jukebox_co re/management/commands/jukebox_index.py", line 114, in index
self.index(filename + "/")
File "/home/lange/jukebox/local/lib/python2.7/site-packages/jukebox/jukebox_co re/management/commands/jukebox_index.py", line 114, in index
self.index(filename + "/")
File "/home/lange/jukebox/local/lib/python2.7/site-packages/jukebox/jukebox_co re/management/commands/jukebox_index.py", line 114, in index
self.index(filename + "/")
File "/home/lange/jukebox/local/lib/python2.7/site-packages/jukebox/jukebox_co re/management/commands/jukebox_index.py", line 116, in index
indexer.index(filename)
File "/home/lange/jukebox/local/lib/python2.7/site-packages/jukebox/jukebox_co re/management/commands/jukebox_index.py", line 16, in index
if data:
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/db/models/q uery.py", line 130, in nonzero
iter(self).next()
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/db/models/q uery.py", line 118, in _result_iter
self._fill_cache()
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/db/models/q uery.py", line 892, in _fill_cache
self._result_cache.append(self._iter.next())
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/db/models/q uery.py", line 291, in iterator
for row in compiler.results_iter():
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/db/models/s ql/compiler.py", line 763, in results_iter
for rows in self.execute_sql(MULTI):
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/db/models/s ql/compiler.py", line 818, in execute_sql
cursor.execute(sql, params)
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/db/backends /util.py", line 40, in execute
return self.cursor.execute(sql, params)
File "/home/lange/jukebox/local/lib/python2.7/site-packages/django/db/backends /sqlite3/base.py", line 344, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicod e strings.

Shuffle songs in queue

When one person queues a large number of songs and there are only a few people, the queue is blocked for a long time. An option to shuffle the songs in the queue would solve this problem.

Deleting an audio file won't remove it from the library

Deleting an already indexed audio file won't remove the file from the library by running

bin/jukebox jukebox_index --path=/Users/saz/Music/

It seems, as the indexer is lacking a cleanup method and only adds new files to the library.

It's possible, that this is intended behavior (e.g. not loosing votes on files or something like that)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.