Skip to content

Latest commit

 

History

History
170 lines (108 loc) · 6.06 KB

File metadata and controls

170 lines (108 loc) · 6.06 KB

librespot_client RGB

sample image for plugin librespot_client

 
PLUGIN: librespot_client v:0.3.0

 
FUNCTION: update_function
update function for librespot_client provides now-playing Spotify information
    
    This plugin pulls and displays now-playing information from a Librespot instance running on the same host. 
    Two librespot services are supported:

    * (go-librespot)[https://github.com/devgianlu/go-librespot]
    * (SpoCon)[https://github.com/spocon/spocon]: [librespot-java wrapper](https://github.com/librespot-org/librespot-java) -- Deprecated in favor of go-librespot
    
      
    This plugin dynamically changes the priority depending on the status of the librespot
    player. Remember, lower priority values are considered **more** important
    Condition         Priority
    ------------------------------
    playing           max_priority
    track change      max_priority -1
    paused            max_priority +1
    stopped           max_priority +3
    non-functional    32,768 (2^15)

      
    Requirements:
        self.config(`dict`): {
        'player_name': 'LibreSpot-Spotify',   # name of player to track
        'idle_timeout': 10,               # timeout for disabling plugin
    }
    self.cache(`CacheFiles` object)

    Args:
        self(namespace): namespace from plugin object
        
    Returns:
        tuple: (is_updated(bool), data(dict), priority(int))    
    
___________________________________________________________________________
 
 

SAMPLE CONFIGURATION FOR paperpi.plugins.librespot_client.librespot_client

[Plugin: Librespot]
layout = layout
plugin = librespot_client
refresh_rate = 10
max_priority = 0
min_display_time = 15
# name of librespot player - use ("*"" to track any and all spotify players)
player_name = LibreSpot-Spotify
# time in seconds before plugin is removed from the display loop
idle_timeout = 10
# port to search for librespot (if unset, defaults to 24879)
port = 24879

 
LAYOUTS AVAILABLE:
  album_art_title
  cover_art_only
  layout
  three_rows_text_only
  two_column_three_row
  two_rows_text_only
 

DATA KEYS AVAILABLE FOR USE IN LAYOUTS PROVIDED BY paperpi.plugins.librespot_client.librespot_client:
   title
   artist
   album
   artwork_url
   duration
   player_name
   mode
   id
   is_playing

Provided Layouts

layout: RGB album_art_title

sample image for plugin album_art_title

layout: album_art_title

sample image for plugin album_art_title

layout: RGB cover_art_only

sample image for plugin cover_art_only

layout: cover_art_only

sample image for plugin cover_art_only

layout: RGB layout

sample image for plugin layout

layout: layout

sample image for plugin layout

layout: three_rows_text_only

sample image for plugin three_rows_text_only

layout: RGB two_column_three_row

sample image for plugin two_column_three_row

layout: two_column_three_row

sample image for plugin two_column_three_row

layout: two_rows_text_only

sample image for plugin two_rows_text_only

Additional librespot_client information

HiFiBerry Sound Card

Adding a HiFiBerry DAC+ or DAC+ Pro sound card to your Raspberry Pi can dramatically improve the sound output. Add a SqueezeLite player to PaperPi and you have a full featured media player with a beautiful Screen. ![./lms_client_sample.png]

HiFiBerry hats such as the DAC+, DAC+ Pro or DAC2 Pro are great choices if you intend to play the audio out to an amplifier or other powered speaker. Choose a HiFiBerry Amp2 or similar if you want to attach speakers directly to the the Pi. Make sure you buy a HiFi Berry with the 2x20 male header or add one. The WaveShare display must have access to the GPIO pins.

Follow HiFiBerry's excellent guide for installing and configuring the sound card.

go-librespot librespot-java/SpoCon

go-librespot is the latest version of librespot from @devgianlu. This is the preferred version of librespot as development has largely halted on the Java version. This version can be installed from the project releases page.

librespot-java is required for this plugin. The java implementation offers a local web interface that this plugin depends on for pulling now-playing information. SpoCon provides an easy-install Raspbian package for installing librespot-java.

Once you've installed and configured your SpoCon service, you will need to set up the plugin in your paperpi.ini configuration.

[Plugin: My LibreSpot Player]
layout = layout
plugin = librespot_client
refresh_rate = 10
# 0 is a good choice for music service tracking to ensure the currently
# playing music is displayed
max_priority = 0
# anything less than 15 seconds is probably not useful
min_display_time = 15
# name of librespot player
player_name = SpoCon-Spotify
# time in seconds before plugin is removed from the display loop when not playing
idle_timeout = 10