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_set_repeat = 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. Song continues afterwards.

  • on_pause_next_click - click pause and then next in quick succession. Calls event and skips to next song. You will have to click play again for the next song to start :(

  • on_pause_previous_click - click pause and then previous in quick succession. Calls event and skips to next song. You will have to click play again for the next song to start :(

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 Mopidy-Pandora will enable this automatically just before each track is changed unless you set the auto_set_repeat 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.6 (Oct 26, 2015)

  • Release to pypi

v0.1.5 (UNRELEASED)

  • Add option to automatically set tracks to play in repeat mode, using Mopidy’s ‘about-to-finish’ callback.

  • 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 (UNRELEASED)

  • 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 (UNRELEASED)

  • 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 (UNRELEASED)

  • 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 (UNRELEASED)

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

v0.1.0 (UNRELEASED)

  • 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.6.tar.gz (19.5 kB view hashes)

Uploaded Source

Supported by

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