Beta Streaming radio helper - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151) +---- Thread: Beta Streaming radio helper (/showthread.php?tid=289314) |
RE: Streaming radio helper - black_eagle - 2016-11-09 @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. RE: Streaming radio helper - JohnyBee - 2016-11-09 If I play streams from Add-onigitally Imported, Streaming radio helper ends with an error. Can you check this? RE: Streaming radio helper - Solo0815 - 2016-11-09 I'm using the music-plugin "Radio". Does anyone know, which $INFO gets the station-name that is actually streaming? RE: Streaming radio helper - JohnyBee - 2016-11-09 (2016-11-09, 16:18)Solo0815 Wrote: I'm using the music-plugin "Radio". Does anyone know, which $INFO gets the station-name that is actually streaming? Maybe: $INFO[Player.Filenameandpath] I suspect that radio_de only start player and does not write anything to the property. RE: Streaming radio helper - Solo0815 - 2016-11-09 Thx, but this gives the complete URL, which is huge RE: Streaming radio helper - Angelinas - 2016-11-09 Code: $INFO[MusicPlayer.offset.Title] RE: Streaming radio helper - Solo0815 - 2016-11-10 ^^^ That's it! Thx RE: Streaming radio helper - black_eagle - 2016-11-10 (2016-11-09, 09:16)black_eagle Wrote: @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. OK, so I've looked at this and it turns out that because of the way I wrote the add-on in the first place, it isn't so straight forward lol ! I wanted logos to work because they were a major part of what was missing, compared to playing local music. So, the script first checks your local music directory for a logo for the artist and it it finds one, it just uses that. Because of this, the first search on TADB is skipped and only the album look-up search is done and even that is only done if the data isn't already in the cache or the cached data is not complete and is older than seven days. What this means is that I'll have to change all the logic to get artist thumbs. This isn't trivial and free time is at a premium at the moment so it's not going to be within a few days.... RE: Streaming radio helper - Solo0815 - 2016-11-11 I have a problem with "1.FM Absolutely Country Hits" the script is stopping with an error and can't get "artist" and "track": Code: 07:50:45.161 T:1482711968 NOTICE: Streaming Radio Helper : Version 0.6.6 started RE: Streaming radio helper - black_eagle - 2016-11-11 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. RE: Streaming radio helper - black_eagle - 2016-11-12 Github link -> https://github.com/the-black-eagle/script.radio.streaming.helper I've made improvements to how the actual stream name is parsed when attempting to obtain a sane station name from a URL. This fixes @solo0815's issue with multiple '.' in the stream URL. Also made improvements in the caching and searching for logos routines. Script no longer looks up a logo online if one already exists in the local music directory. Previously, it looked one up and downloaded it if it existed but then didn't use that one anyway, so that lookup and download was redundant and a waste of time and bandwidth. I've tested this version for 24 hours and it's stable for me, but if anyone has any issues, feel free to let me know and I'll try and sort it. RE: Streaming radio helper - Solo0815 - 2016-11-13 The new version works well so far, except one radio station I used. Can't remember the name and can't test it atm, but will post it the next week. Thx so far Edit: I looked at the code and have a few questions: 1. wouldn't it be better when no hardcoded artists are in the code? instead of this: Code: if artist == "Florence & The Machine": Code: if artist.contains ("&"): 2. Isn't "Pink" found on TADB? If yes, then you could use the gives name from TADB instead of hardcoding artist-IFs Maybe there are 5235 other artists that need such a replacement? that would be a lot of code 3. maybe you could use the actual station name from Kodi's info-string: $INFO[Player.offset.Title] RE: Streaming radio helper - black_eagle - 2016-11-14 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. RE: Streaming radio helper - JohnyBee - 2016-11-14 Hi black_eagle, thanks for srh.Artist.Banner and srh.Artist.Thumb. I'm testing it. If I play streams from Add-onigitally Imported, Streaming Radio Helper ends with an error. log: (...) Radio Streaming Helper has encountered an error and needs to close - too many values to unpack (...) Can you check this? ps. Probably the problem is in identifying the name of the station. When we modify lines (155..181 in default.py - comment) Streaming Radio Helper working properly. RE: Streaming radio helper - black_eagle - 2016-11-14 @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 ! |