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.8 (Jan 8, 2016)

  • Update dependencies: requires at least pydora 1.5.1.

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.8.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

Mopidy_Pandora-0.1.8-py2.py3-none-any.whl (15.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for Mopidy-Pandora-0.1.8.tar.gz
Algorithm Hash digest
SHA256 11a49512bb2d9236e510c771e422a5a18df228f12068c41683527c3e5fa1cf08
MD5 33abc3f65f3eaeba2715d7a1b11044fe
BLAKE2b-256 4ead1f369013faea0be0fb97806624511d936f559b1ee4028684c426e01be560

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Mopidy_Pandora-0.1.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fd0010d195b4ba0b8f4f3ececf5c44d5adcfb5992e0508d54e125c5b4476a7ce
MD5 bbc06f34c6948d9c651d8e8d58550c55
BLAKE2b-256 fa80287010892972dbf2932679691e6e6ab42d3cc4b08a3112c33d63466cf7ca

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