Skip to main content

Mopidy extension for Pandora

Project description

Latest PyPI version Number of PyPI downloads Travis CI build status Test coverage

Mopidy extension for Pandora

Installation

Install by running:

pip install Mopidy-Pandora

Or, if available, install the Debian/Ubuntu package from apt.mopidy.com.

Configuration

Before starting Mopidy, you must add configuration for Mopidy-Pandora to your Mopidy configuration file:

[pandora]
enabled = true
api_host = tuner.pandora.com/services/json/
partner_encryption_key =
partner_decryption_key =
partner_username = iphone
partner_password =
partner_device = IP01
preferred_audio_quality = highQuality
username =
password =
sort_order = date
auto_setup = true

### EXPERIMENTAL EVENT HANDLING IMPLEMENTATION ###
event_support_enabled = false
double_click_interval = 2.00
on_pause_resume_click = thumbs_up
on_pause_next_click = thumbs_down
on_pause_previous_click = sleep

The api_host and partner_ keys can be obtained from:

pandora-apidoc

preferred_audio_quality can be one of ‘lowQuality’, ‘mediumQuality’, or ‘highQuality’ (default). If the preferred audio quality is not available for the partner device specified, then the next-lowest bitrate stream that Pandora supports for the chosen device will be used.

sort_order defaults to the date that the station was added. Use ‘A-Z’ to display the list of stations in alphabetical order.

EXPERIMENTAL EVENT HANDLING IMPLEMENTATION: use these settings to work around the limitations of the current Mopidy core and web extensions:

  • double_click_interval - successive button clicks that occur within this interval (in seconds) will trigger the event.

  • on_pause_resume_click - click pause and then play while a song is playing to trigger the event.

  • on_pause_next_click - click pause and then next in quick succession. Calls event and skips to next song.

  • on_pause_previous_click - click pause and then previous in quick succession. Calls event and skips to next song.

The supported events are: thumbs_up, thumbs_down, sleep, add_artist_bookmark, add_song_bookmark

Usage

Mopidy needs dynamic playlist and core extensions support to properly support Pandora. In the meantime, Mopidy-Pandora represents each Pandora station as a separate playlist. The Playlist needs to be played in repeat mode and consume, random, and single should be turned off. Mopidy-Pandora will set this up automatically unless you set the auto_setup config parameter to ‘false’.

Each time a track is played, the next dynamic track for that Pandora station will be played. The playlist will consist of a single track unless the experimental ratings support is enabled. With ratings support enabled, the playlist will contain three tracks. These are just used to determine whether the user clicked on the ‘previous’ or ‘next’ playback buttons, and all three tracks point to the same dynamic track for that Pandora station (i.e. it does not matter which one you select to play).

Project resources

Changelog

v0.1.7 (Oct 31, 2015)

  • Configuration parameter ‘auto_set_repeat’ has been renamed to ‘auto_setup’ - please update your Mopidy configuration file.

  • Now resumes playback after a track has been rated.

  • Enhanced auto_setup routines to ensure that ‘consume’, ‘random’, and ‘single’ modes are disabled as well.

  • Optimized auto_setup routines: now only called when the Mopidy tracklist changes.

v0.1.6 (Oct 26, 2015)

  • Release to pypi

v0.1.5 (Aug 20, 2015)

  • Add option to automatically set tracks to play in repeat mode when Mopidy-Pandora starts.

  • Add experimental support for rating songs by re-using buttons available in the current front-end Mopidy extensions.

  • Audio quality now defaults to the highest setting.

  • Improved caching to revert to Pandora server if station cannot be found in the local cache.

  • Fix to retrieve stations by ID instead of token.

  • Add unit tests to increase test coverage.

v0.1.4 (Aug 17, 2015)

  • Limit number of consecutive track skips to prevent Mopidy’s skip-to-next-on-error behaviour from locking the user’s Pandora account.

  • Better handling of exceptions that occur in the backend to prevent Mopidy actor crashes.

  • Add support for unicode characters in station and track names.

v0.1.3 (Jul 11, 2015)

  • Update to work with release of Mopidy version 1.0

  • Update to work with pydora version >= 1.4.0: now keeps the Pandora session alive in tha API itself.

  • Implement station list caching to speed up browsing.

  • Get rid of ‘Stations’ root directory. Browsing now displays all of the available stations immediately.

  • Fill artist name to improve how tracks are displayed in various Mopidy front-end extensions.

v0.1.2 (Jun 20, 2015)

  • Enhancement to handle ‘Invalid Auth Token’ exceptions when the Pandora session expires after long periods of inactivity. Allows Mopidy-Pandora to run indefinitely on dedicated music servers like the Pi MusicBox.

  • Add configuration option to sort stations alphabetically, instead of by date.

v0.1.1 (Mar 22, 2015)

  • Added ability to make preferred audio quality user-configurable.

v0.1.0 (Dec 28, 2014)

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Mopidy-Pandora-0.1.7.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

Mopidy_Pandora-0.1.7-py2.py3-none-any.whl (15.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Mopidy-Pandora-0.1.7.tar.gz.

File metadata

File hashes

Hashes for Mopidy-Pandora-0.1.7.tar.gz
Algorithm Hash digest
SHA256 3503e201c083f97cba1ea082284a36c8f933b127bc24e241617f2a2b4fbe5a09
MD5 a2df779fde5b829a970336f95ec204c5
BLAKE2b-256 a2aec32f21b537d1a5faa7ba3fc0879113c3a41a4f4c56c28dacc81537351b34

See more details on using hashes here.

File details

Details for the file Mopidy_Pandora-0.1.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Mopidy_Pandora-0.1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 25cda702da792e8f62c473492909bc9c821938d54dabfa15acbf2993a8c7bf92
MD5 e3f23454847069f1fdb72f94c1b1b169
BLAKE2b-256 9385e9484abb147236365db493342f1a1d52f1f4e1f1aac0783e7044c8376b1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page