program-state not consice between spotify and flac track

Hi there,

i’m working on an lcd-plugin, and notice that when playing spotify, the getState event, holds a key ‘sample-rate’ which contains the bitrate, rather then the sample rate (khz vs kbps)

As i’m using the socketio stuffs (to overcome issues with other plugins (like spotify), it would be nice to see consitent key-content :wink:

spotify:

STATE:  { status: 'play',
  position: 71,
  title: 'Surge',
  artist: 'Above & Beyond',
  album: 'Surge',
  albumart: 'https://i.scdn.co/image/f79e9bd5e51659fd21362c9169befdfb3677385d',
  uri: 'spotify:track:19ez4TX6bQxjAZsIAywNS1',
  trackType: 'spotify',
  seek: 0,
  duration: 144,
  samplerate: '320Kbps',
  bitdepth: '16 bit',
  random: null,
  repeat: null,
  repeatSingle: false,
  consume: false,
  volume: 100,
  mute: false,
  stream: 'spotify',
  volatile: false,
  service: 'spop' }

as when playing a flac track (mpd):

STATE:  { status: 'play',
  position: 73,
  title: '2049',
  artist: 'Hans Zimmer & Benjamin Wallfisch',
  album: 'Blade Runner 2049',
  albumart: '/albumart?cacheid=[FLAC]/01. 2049.flac',
  trackType: 'flac',
  seek: 6470,
  duration: 218,
  samplerate: '44.1 KHz',
  bitdepth: '16 bit',
  channels: 2,
  random: null,
  repeat: null,
  repeatSingle: false,
  consume: false,
  volume: 100,
  mute: false,
  stream: 'flac',
  updatedb: false,
  volatile: false,
  service: 'mpd' }

the unit shoudn’t holds various entities.

You’re right, I would appreciate if you could send a PR to the spotify plugin to fix this :wink: