appdaemon-widgets icon indicating copy to clipboard operation
appdaemon-widgets copied to clipboard

Widget media_select used in MPD (mopidy) for playlists

Open RaJeronimo opened this issue 8 years ago • 4 comments

Hi, first of all i really like your widgets! Thanks.

And this is not exactly an issue so i will try to explain my problem. My thought was that the widget media_select was for playlists. Because in MPD (mopidy) the source of the mediaplayer is used for the playlists (in my case Spotify). So i was Yeey! But it's not working like that. It's the source of the audio. bluetooth receiver etc. I get that now.

is it possible to change / add an simular widget especially for the source (playlist) of MPD ? I'm no programmer so it's difficult to change this myself. I can only explain the problems: When i open the dashboard the playlist is restarting. Because it's opening again the source value i think? When there is no playlist selected but just a song in an mopidy client it's not working because he needs a source of course to play.

Do you think this is possible to add?

Are there any other people using this for an MPD server?

greetz!

RaJeronimo avatar Mar 11 '18 11:03 RaJeronimo

Hi,

can you post me the states of your mopidy media_player entity ?

It should be something similar to this:

{
  "volume_level": 0.63,
  "is_volume_muted": false,
  "source": "TV",
  "source_list": [
    "AirPlay",
    "Bluetooth",
    "MusicCast Link",
    "NET RADIO",
    "SERVER",
    "TUNER",
    "TV",
    "USB"
  ],
  "friendly_name": "Yamaha Receiver",
  "supported_features": 18828
}

gcosta74 avatar Mar 12 '18 20:03 gcosta74

Hi. It's different. The source_list includes all my spotify playlists. And that's perfect if I can use it. I now changed a widget of yours so it kinda works. But I'm no expert.

{ "volume_level": 0.2, "is_volume_muted": false, "media_content_id": "spotify:track:3ZbZPKPFMDsKE2pulMaLQq", "media_content_type": "music", "media_duration": "11", "media_title": "Silent Song", "media_artist": "Silent Song", "media_album_name": "Silent Song - Single", "source": "start (by 11276)", "source_list": [ "Favourites", "[Radio Streams]", "-- (by 112345)", "start (by 112345)", "Michael Jackson - Top Tracks (by michaeljackson)", "Hits March 2018 - Monthly Hits (By Jesper Hesseling - Meester Jesper) Top Songs (by 112921300)", "The War On Drugs 2017 (by )", "3voor12 #NIEUWEMUZIEK (by 3voor12)",`

It continues with all the playlists

RaJeronimo avatar Mar 12 '18 21:03 RaJeronimo

Hi. It's different. The source_list includes all my spotify playlists. And that's perfect if I can use it. I now changed a widget of yours so it kinda works. But I'm no expert.

What did you do exactly ?

The widget calls the service media_player/select_source and maybe this will not fit for your playlists that will show as a source.

gcosta74 avatar Mar 14 '18 08:03 gcosta74

I have Mopidy setup and have it setup as a MPD in HA.

media_player:
- alias: 'Music Pi'
  platform: mpd
  name: 'Music Pi'
  host: 192.168.1.xxx

But when I add it to my dashboard, its seems to really quickly pull up the playlist’s as source select, but then they disappear before I can select them. If i manually start playing something on the mopidy interface, it plays for a few seconds, then stops, and switches off the media player. Its like the plugin is constantly polling the MPD server.

My dashboard setup is

your_media_select:
  widget_type: media_select
  entity: media_player.music_pi
  title: Kitchen Source
  title2: Your Subtitle

Any help would be very much appreciated, thank you in advance

biffter avatar May 20 '18 21:05 biffter