Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 8
Beta Streaming radio helper
#31
@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 !!
Reply
#32
If I play streams from Add-onBig Grinigitally Imported, Streaming radio helper ends with an error.
Can you check this?
Reply
#33
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
Reply
#34
(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.
Reply
#35
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
Reply
#36
Code:
$INFO[MusicPlayer.offset.Title]
XBoxMediaCenter (Kodi Matrix ) 19.3 , AndroidBox -Matrix Skin AeonMQ6
Reply
#37
^^^ That's it! Thx
Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Reply
#38
(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....
Learning Linux the hard way !!
Reply
#39
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
07:50:45.161 T:1482711968  NOTICE: Streaming Radio Helper : ----------Settings-------------------------
07:50:45.161 T:1482711968  NOTICE: Streaming Radio Helper : Use fanart.tv : true
07:50:45.162 T:1482711968  NOTICE: Streaming Radio Helper : use tadb : true
07:50:45.162 T:1482711968  NOTICE: Streaming Radio Helper : changing  to
07:50:45.162 T:1482711968  NOTICE: Previous line repeats 4 times.
07:50:45.162 T:1482711968  NOTICE: Streaming Radio Helper : ----------Settings-------------------------
07:50:45.162 T:1482711968  NOTICE: Streaming Radio Helper : Setting up addon
07:50:45.164 T:1482711968  NOTICE: Streaming Radio Helper : Loading data from pickle file
07:50:45.164 T:1182782368  NOTICE: Streaming Radio Helper : Version 0.6.6 started
07:50:45.165 T:1182782368  NOTICE: Streaming Radio Helper : ----------Settings-------------------------
07:50:45.165 T:1182782368  NOTICE: Streaming Radio Helper : Use fanart.tv : true
07:50:45.165 T:1182782368  NOTICE: Streaming Radio Helper : use tadb : true
07:50:45.165 T:1182782368  NOTICE: Streaming Radio Helper : changing  to
07:50:45.165 T:1182782368  NOTICE: Previous line repeats 4 times.
07:50:45.165 T:1182782368  NOTICE: Streaming Radio Helper : ----------Settings-------------------------
07:50:45.165 T:1182782368  NOTICE: Streaming Radio Helper : Setting up addon
07:50:45.166 T:1182782368  NOTICE: Streaming Radio Helper : Loading data from pickle file
07:50:45.236 T:1482711968  NOTICE: Streaming Radio Helper : Cache contains 94 tracks
07:50:45.237 T:1482711968  NOTICE: Streaming Radio Helper : Cached data obtained before before 04-11-2016 will be refreshed if details are missing
07:50:45.240 T:1182782368  NOTICE: Streaming Radio Helper : Cache contains 94 tracks
07:50:45.240 T:1182782368  NOTICE: Streaming Radio Helper : Cached data obtained before before 04-11-2016 will be refreshed if details are missing
07:50:45.254 T:1482711968    INFO: easy_aquire - Created session to http://sc-acountry.1.fm
07:50:45.514 T:1482711968    INFO: Previous line repeats 2 times.
07:50:45.515 T:1482711968  NOTICE: Streaming Radio Helper : File playing is http://sc-acountry.1.fm:7800
07:50:45.515 T:1482711968  NOTICE: Streaming Radio Helper : Radio Streaming Helper has encountered an error and needs to close
07:50:45.515 T:1482711968  NOTICE: Streaming Radio Helper : Saving data to pickle file
07:50:45.518 T:1182782368  NOTICE: Streaming Radio Helper : File playing is http://sc-acountry.1.fm:7800
07:50:45.518 T:1182782368  NOTICE: Streaming Radio Helper : Radio Streaming Helper has encountered an error and needs to close
07:50:45.519 T:1182782368  NOTICE: Streaming Radio Helper : Saving data to pickle file
07:50:45.627 T:1182782368  NOTICE: Streaming Radio Helper : Script Stopped
07:50:45.627 T:1182782368    INFO: CPythonInvoker(84, /storage/.kodi/addons/script.radio.streaming.helper/default.py): script aborted
07:50:45.627 T:1182782368    INFO: CPythonInvoker(84, /storage/.kodi/addons/script.radio.streaming.helper/default.py): waiting on thread 1166005152
07:50:45.634 T:1482711968  NOTICE: Streaming Radio Helper : Script Stopped
07:50:45.634 T:1482711968    INFO: CPythonInvoker(83, /storage/.kodi/addons/script.radio.streaming.helper/default.py): script aborted
07:50:45.634 T:1482711968    INFO: CPythonInvoker(83, /storage/.kodi/addons/script.radio.streaming.helper/default.py): waiting on thread 1419793312
07:50:45.739 T:1182782368    INFO: Python script stopped
07:50:45.739 T:1182782368   DEBUG: Thread LanguageInvoker 1182782368 terminating
07:50:45.753 T:1482711968    INFO: Python script stopped
07:50:45.753 T:1482711968   DEBUG: Thread LanguageInvoker 1482711968 terminating
Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Reply
#40
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 !!
Reply
#41
Github link -> https://github.com/the-black-eagle/scrip...ing.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.
Learning Linux the hard way !!
Reply
#42
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":
artist = "Florence + The Machine"
change to this:
Code:
if artist.contains ("&"):
artist.replace ("&", "+")

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 Wink

3. maybe you could use the actual station name from Kodi's info-string: $INFO[Player.offset.Title]
Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Reply
#43
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 !!
Reply
#44
Hi black_eagle,
thanks for srh.Artist.Banner and srh.Artist.Thumb.Big Grin
I'm testing it.

If I play streams from Add-onBig Grinigitally 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.
Reply
#45
@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 !!
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 8

Logout Mark Read Team Forum Stats Members Help
Streaming radio helper2