{ "info": { "author": "Peter Odding", "author_email": "peter@peterodding.com", "bugtrack_url": null, "classifiers": [ "Environment :: No Input/Output (Daemon)", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Topic :: Multimedia :: Sound/Audio :: Players" ], "description": "Simple Mopidy webclient\n=======================\n\nThe simple Mopidy webclient is an HTTP client for the `Mopidy music server`_\nthat's designed to be simple and minimalistic in an attempt to create a touch\nfriendly web interface that works in most (mobile) web browsers.\n\n.. contents::\n\nIntroduction\n------------\n\n`Mopidy music server`_ is an awesome piece of software that provides a\nheadless_ music player compatible with the MPD_ protocol and is capable of\nstreaming music from Spotify_. I'm running Mopidy on two `Raspberry Pi`_\ncomputers, one in my living room and one in my bedroom.\n\nThe only thing I was missing was a simple client with playback control, volume\ncontrol and playlist selection that would work on my smart phones, iPad and\nlaptops. Despite the plentitude of `HTTP clients`_ referenced in the Mopidy\ndocumentation and the fact that `any MPD client`_ should work I didn't succeed\nin finding a client that actually worked well for me on all of the mentioned\ndevices :-(\n\nAfter wasting two days on my search for a simple Mopidy client that would Just\nWork (TM) I decided to take up the Mopidy developers' promise that Mopidy is\neasy to extend by developing my own web interface. It took three iterations to\nbuild something I was happy with.\n\nFirst iteration: Server side PHP\n The first proof of concept was a simple PHP_ script using Mopidy's `JSON-RPC\n API`_. Once I had playback control implemented I decided that writing PHP\n makes me sad so I switched to Python_ (and Flask) instead.\n\nSecond iteration: Server side Python\n The second proof of concept got a lot further than the first: I implemented\n playback control, volume control and playlist selection. While working on this\n implementation it began to dawn on me that a JavaScript client using\n asynchronous HTTP connections could be a lot more responsive than any server\n side implementation (and potentially simpler to boot).\n\nThird iteration: Client side JavaScript\n JavaScript_ is not exactly my favorite language but the experience of writing\n a Mopidy web client wasn't all that bad. Once I had everything running I\n really appreciated the elegance of only needing HTML, CSS and JavaScript to\n build a simple but usable Mopidy client! I didn't even use Mopidy.js_ because\n I started out by porting Python code built on top of Mopidy's `JSON-RPC API`_.\n\nGetting started\n---------------\n\nAs mentioned in the introduction above the simple Mopidy webclient is a client\nside JavaScript application. Despite this the client is published as a Python\npackage. This package contains the client side code plus the minimal amount of\nglue (18 lines of Python code :-) needed to expose the client as a proper\nMopidy HTTP extension. The Python package is available on PyPI_ which means\nit's very easy to install the client:\n\n.. code-block:: bash\n\n $ sudo pip install Mopidy-Simple-Webclient\n\nAfter installation you need to restart your Mopidy daemon to load the new\nextension. I'm running Mopidy as a system daemon so I would use the following\ncommand:\n\n.. code-block:: bash\n\n $ sudo service mopidy restart\n\nAccessing the web interface\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOnce you've installed the extension and restarted your Mopidy daemon, the\nMopidy web interface should look similar to this:\n\n.. image:: https://github.com/xolox/mopidy-simple-webclient/raw/master/screenshots/getting-started.png\n :alt: Mopidy webserver start screen.\n\nClick on the 'simple-webclient' link to open the simple Mopidy webclient.\n\nThe playlist selection interface\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe simple Mopidy webclient doesn't have a playlist / tracklist editing\ninterface and it also doesn't provide a way to browse your music collection.\nInstead you are expected to create a playlist in a more full featured Mopidy\nclient or Spotify_ and select this playlist in the simple Mopidy web client.\nSelecting a playlist looks similar to this:\n\n.. image:: https://github.com/xolox/mopidy-simple-webclient/raw/master/screenshots/playlist-selection.png\n :alt: Playlist selection interface of the simple Mopidy webclient.\n\nPlease note that I've only been using Mopidy for a couple of days (at the time\nI'm writing this) so I'm still getting to grips with how Mopidy works and this\nmeans I've only tested the playlist selection interface with Spotify\nplaylists (not with local playlists).\n\nThe playback control interface\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOnce the Mopidy track list (the 'current playlist') contains some tracks the\nsimple Mopidy webclient will switch to the playback control interface which\nlooks like this:\n\n.. image:: https://github.com/xolox/mopidy-simple-webclient/raw/master/screenshots/playback-control.png\n :alt: Playback control interface of the simple Mopidy webclient.\n\nHere's an explanation of the main elements in the playback control interface:\n\n- At the top is the track title, followed by the album name and the artist(s).\n\n- Below the track info are the playback control buttons. When nothing is\n playing this shows previous/play/next buttons. While a track is playing this\n shows previous/pause/stop/next buttons.\n\n- The line of blue/grey dots is the volume control. HTML5_ has fancy slider\n controls for this but the web browser on my smartphone isn't fancy enough to\n support those so I created a simple touch friendly control instead.\n\n- The button \"Select playlist\" brings you back to the playlist selection\n interface and the other other two buttons do what you would expect them to\n :-).\n\nFuture improvements\n-------------------\n\nSome ideas for if/when I find the time to continue work on this client:\n\nReal time state changes\n It would be awesome to enable instant server \u2192 client notifications instead of\n a 10 second polling interval. It looks like this requires websockets. Not sure\n those will work on my smart phone. Even if they don't, maybe I can add\n optional support (graceful degradation)?\n\nEnable cover art\n It's not yet clear to me how cover art works in Mopidy, but other clients can\n do it so I should be able to as well :-)\n\nEnable server side configuration\n Mopidy's extension mechanism already forces me to use a configuration file, so\n why not add some useful options to that, like the ability to change the page\n title? This is not trivial because it would involve the first \"server side\"\n logic in this project (on the other hand that opens the door to\n functionality not available to pure JavaScript clients).\n\nUpgrade jQuery/Bootstrap, bundle the files\n Right now jQuery_ and Bootstrap_ are loaded from the Google and Bootstrap CDNs\n but at some point the referenced versions will disappear from the web. Why not\n upgrade to the latest versions and bundle the files in the git repository and\n Python source distributions?\n\nContact\n-------\n\nThe latest version of the simple Mopidy webclient is available on PyPI_ and\nGitHub_. For bug reports please create an issue on GitHub_. If you have\nquestions, suggestions, etc. feel free to send me an e-mail at\n`peter@peterodding.com`_.\n\nLicense\n-------\n\nThis software is licensed under the `MIT license`_.\n\n\u00a9 2014 Peter Odding.\n\nThe simple Mopidy webclient uses the following projects:\n\n`Mopidy music server`_\n Licensed under the Apache License, refer to the `Mopidy license`_ file.\n\njQuery_\n Licensed under the MIT license, refer to the `jQuery license`_ file.\n\nBootstrap_\n The version used is licensed under the Apache License, refer to the\n `Bootstrap license`_ file (newer versions are licensed under the MIT\n license).\n\nsprintf.js_\n Licensed under the BSD license, refer to the `sprintf.js license`_ file (tip:\n I used what-license.com_ to identify the license :-).\n\n`Humanity icon theme`_\n Licensed under the Creative Commons Attribution-ShareAlike 3.0 license, refer\n to the `Humanity license`_ file. It's not clear to me if using these icons\n with attribution and without alterations requires my work to be licensed\n under the same license as well (I'm hoping it doesn't, I'm afraid it does).\n If it turns out that this is true I'd rather find a different icon set\n because using CC BY-SA license for software doesn't make any sense.\n\n.. External references:\n.. _any MPD client: http://en.wikipedia.org/wiki/Music_Player_Daemon#Clients\n.. _Bootstrap license: https://github.com/twbs/bootstrap/blob/v2.3.2/LICENSE\n.. _Bootstrap: http://getbootstrap.com/\n.. _GitHub: https://github.com/xolox/mopidy-simple-webclient\n.. _headless: http://en.wikipedia.org/wiki/Headless_software\n.. _HTML5: http://en.wikipedia.org/wiki/HTML5\n.. _HTTP clients: https://docs.mopidy.com/en/latest/clients/http/\n.. _Humanity icon theme: https://launchpad.net/human-icon-theme\n.. _Humanity license: http://bazaar.launchpad.net/~ubuntu-art-pkg/human-icon-theme/ubuntu/view/head:/COPYING\n.. _JavaScript: http://en.wikipedia.org/wiki/JavaScript\n.. _jQuery license: https://github.com/jquery/jquery/blob/2.0.2/MIT-LICENSE.txt\n.. _jQuery: http://jquery.com/\n.. _JSON-RPC API: https://docs.mopidy.com/en/latest/api/http/#http-api\n.. _MIT license: http://en.wikipedia.org/wiki/MIT_License\n.. _Mopidy license: https://github.com/mopidy/mopidy/blob/develop/LICENSE\n.. _Mopidy music server: https://www.mopidy.com/\n.. _Mopidy.js: https://docs.mopidy.com/en/latest/api/js/#mopidy-js\n.. _MPD: http://en.wikipedia.org/wiki/Music_Player_Daemon\n.. _peter@peterodding.com: peter@peterodding.com\n.. _PHP: http://en.wikipedia.org/wiki/PHP\n.. _PyPI: https://pypi.python.org/pypi/Mopidy-Simple-Webclient\n.. _Python: http://en.wikipedia.org/wiki/Python_(programming_language)\n.. _Raspberry Pi: http://en.wikipedia.org/wiki/Raspberry_Pi\n.. _Spotify: http://en.wikipedia.org/wiki/Spotify\n.. _sprintf.js license: https://github.com/alexei/sprintf.js/blob/master/LICENSE\n.. _sprintf.js: https://github.com/alexei/sprintf.js\n.. _what-license.com: http://www.what-license.com/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/xolox/mopidy-simple-webclient", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "Mopidy-Simple-Webclient", "package_url": "https://pypi.org/project/Mopidy-Simple-Webclient/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Mopidy-Simple-Webclient/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/xolox/mopidy-simple-webclient" }, "release_url": "https://pypi.org/project/Mopidy-Simple-Webclient/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Very simple and mobile friendly web interface for the Mopidy music server", "version": "0.1.1" }, "last_serial": 1583840, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "74c8e7201904cbb0ec8589cc049ca9f4", "sha256": "e44a5b47e0838ea560c5456cd6448599b740d14196a7c74290d516e67eaf1aec" }, "downloads": -1, "filename": "Mopidy-Simple-Webclient-0.1.tar.gz", "has_sig": false, "md5_digest": "74c8e7201904cbb0ec8589cc049ca9f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34841, "upload_time": "2014-10-19T02:10:10", "url": "https://files.pythonhosted.org/packages/51/da/bd7c820c7a336f82eba1a5045855b9663489e683cfa87f8977af31686ff6/Mopidy-Simple-Webclient-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2555a9e7f5039e544455e5972e4d5004", "sha256": "b53fb13fed655f00f570e58b73f01fe338ab745bef7bb13788c9ef0962d6f41c" }, "downloads": -1, "filename": "Mopidy-Simple-Webclient-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2555a9e7f5039e544455e5972e4d5004", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34895, "upload_time": "2015-06-08T20:09:41", "url": "https://files.pythonhosted.org/packages/69/fc/9fdd13beb617a7b6c99a3d4665552de7cb41d61bca375df335b237ebc0fe/Mopidy-Simple-Webclient-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2555a9e7f5039e544455e5972e4d5004", "sha256": "b53fb13fed655f00f570e58b73f01fe338ab745bef7bb13788c9ef0962d6f41c" }, "downloads": -1, "filename": "Mopidy-Simple-Webclient-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2555a9e7f5039e544455e5972e4d5004", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34895, "upload_time": "2015-06-08T20:09:41", "url": "https://files.pythonhosted.org/packages/69/fc/9fdd13beb617a7b6c99a3d4665552de7cb41d61bca375df335b237ebc0fe/Mopidy-Simple-Webclient-0.1.1.tar.gz" } ] }