The API I'm using for my BBC Sounds plugin has access to the specific spotify track URL for the track that is currently playing in this format :
I plan to make use of that by adding a context menu using registerinfoprovider to enable the user to go to a menu item enabling them to access the track from Spotty while they are still listening to the station/programme.Code:{ "type": "commercial-music-service", "id": "commercial-music-service-spotify", "label": "Spotify", "uri": "https://open.spotify.com/track/6IOWaTG6MUfR4824H2XOjJ" }
I guess I can transform that uri into a spotify://track:xxxxx format url and easily create a Spotty playable menu item.
However, is there a better way I can interact into spotty to have a nicely formatted menu item with artwork in the right album context etc?
Results 1 to 5 of 5
-
2020-11-26, 07:37 #1
- Join Date
- Aug 2014
- Location
- UK
- Posts
- 268
Linking into Spotty from BBC Sounds
-
2020-11-26, 09:49 #2
TBH. I'm not sure what the cleanest way to do this would be. You can easily call Spotty's trackinfo menu handler to get what you want from inside your trackinfo handler. But if I ever decide to change that code, your plugin would need an update, too. This admittedly is very unlikely going to happen, because it has to stay compatible with the menu handler. But I'd still recommend you make sure Spotty is installed before you do this:
Code:sub trackInfoMenu { my ( $client, $url, $track, $remoteMeta ) = @_; my $items = []; if ( Slim::Utils::PluginManager->isEnabled('Plugins::Spotty::Plugin') ) { require Plugins::Spotty::OPML; push @$items, Plugins::Spotty::OPML::trackInfoMenu(@_); } # ...now add your own items etc. }
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
-
2020-11-26, 11:15 #3
- Join Date
- Apr 2005
- Location
- UK/London
- Posts
- 3,365
Some of the radio stations that I made plugins for do have Spotify or Deezer ids ... so I could also do this.
I have thought for a while that a generic song info call could be useful when playing internet radio - to return cover art or artist image and potentially more when the streaming station has not been able to provide it.
The idea would be to call something in LMS (think of it as MAI) with Artist, Title, [Album], [Year], [set of streaming service ids].
This would be a help for streaming stations that do not provide cover art.
In theory it could be done automatically (optionally) by LMS when it knows it is playing a song but was not given cover art.
For UK users when TuneIn has partially stopped providing services this could be very useful.Paul Webster
http://dabdig.blogspot.com
Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland
-
2020-11-26, 14:55 #4Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
-
2020-11-27, 06:12 #5
- Join Date
- Aug 2014
- Location
- UK
- Posts
- 268