Posts: 3,925
Joined: Sep 2013
Reputation:
365
@JB - Well, I think I might have some time today so I'll look into it. TADB returns links for artist thumb and banner already in the data returned from the artist search so it shouldn't be too difficult to add a couple of properties.
Learning Linux the hard way !!
Posts: 1,267
Joined: Sep 2004
Reputation:
27
I'm using the music-plugin "Radio". Does anyone know, which $INFO gets the station-name that is actually streaming?
Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Posts: 1,267
Joined: Sep 2004
Reputation:
27
Thx, but this gives the complete URL, which is huge
Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Posts: 3,925
Joined: Sep 2013
Reputation:
365
Yeah, that's because of the '.1.fm' bit in the address.
The script tries to obtain a relatively sane station name from the actual playing file name. Pretty much all the radio streams I listen to end with '/station-name.codec' so it was written originally to strip off the bit after '/' , throw away the ending after the '.' (because I don't need the mp3 or aac bit from there) and use the rest as a station name.
Then I added some substitutions so that I could tidy up the displayed name and make it right.
Anyway, I've re-visited that part and have added some logic to better handle streams without a station name at the end. Not updated as yet on github but I will post once it is. Just need to check it's stable.
Also, the next version has support added for current artist thumb and banner. Properties added are "srh.Artist.Thumb" and "srh.Artist.Banner". These are empty strings if the property is not available. The URL's are cached in the add-ons database to avoid multiple hits on TADB. The database pickle file should update automatically and retain any previously cached tracks. Thumb and banner URL's will be added for previously cached artists as well as new ones.
This version should be up on github later today.
Learning Linux the hard way !!
Posts: 3,925
Joined: Sep 2013
Reputation:
365
Sure it would be better if there were no hard-coded artists, however my local radio station uses "Pink" when it should actually be "P!nk" and the same with Florence. This causes the lookups to fail. It's not just my add-on that this causes issues for either. AS shows artwork for Pink Floyd when P!nk is playing on a radio station if they call her Pink.
In actual fact, I added some extra lookup code yesterday which may help in this (and other) situations which I am currently testing. I've also improved the error handling and the script can now cope with the Musicbrainz server being unavailable. Originally it would have just returned a value of None for the mbid but now it will generate it's own uuid based on the artist name and use that.
Don't believe that Player.Title returns the station name, but rather that it returns "artist - track title" as that is exactly the method used be the script to get the currently playing artist and track info. I don't think there is an easy way of determining the station name or at least, this information is not exposed in an info label within Kodi. Thats why the script uses the filename to try and determine the station name and has substitutions so that you can "pretty up" the name for display.
Learning Linux the hard way !!
Posts: 3,925
Joined: Sep 2013
Reputation:
365
@JB, can you post the relevant lines from the log please. Just the bit from where the add-on starts up to the line that starts "file playing is".......
It's probably a similar issue to the one solo0815 had although I thought that that might be fixed. Possibly it's only partially fixed however !
Learning Linux the hard way !!