(2016-11-14, 10:54)black_eagle Wrote: [ -> ]@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 !
----------Settings-------------------------
Line 12790: 09:17:01 T:140055550469888 NOTICE: Streaming Radio Helper : Setting up addon
Line 12791: 09:17:01 T:140055550469888 NOTICE: Streaming Radio Helper : Loading data from pickle file
Line 12819: 09:17:01 T:140055550469888 NOTICE: Streaming Radio Helper : Cache contains 322 tracks
Line 12820: 09:17:01 T:140055550469888 NOTICE: Streaming Radio Helper : Cached data obtained before before 07-11-2016 will be refreshed if details are missing
Line 12823: 09:17:02 T:140055550469888 NOTICE: Streaming Radio Helper : File playing is
http://pub7.di.fm:80/di_clubsounds_aacpl...ozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36&Referer=http://www.di.fm
Line 12824: 09:17:02 T:140055550469888 NOTICE: Streaming Radio Helper : Radio Streaming Helper has encountered an error and needs to close - too many values to unpack
Line 12825: 09:17:02 T:140055550469888 NOTICE: Streaming Radio Helper : Saving data to pickle file
Line 12826: 09:17:02 T:140055550469888 NOTICE: Streaming Radio Helper : Script Stopped
Thanks
Well, the add-on was written originally for ICY streams which are all formatted the same and in the form of
Code:
File playing is http://icy-e-bz-06-cr.sharp-stream.com/planetrock.aac
So originally, I just sliced off the end and threw away the codec bit to end up with 'planetrock'. Then solo0815 threw me a curve ball in that his URL had no station name at the end, it was just literally an http address. Now you've thrown me a huge curve with that URL lol. If all the URL's from that addon are formatted the same as in "http://some.server.somewhere:port/name_of_station_codecinfo|User-Agent=" etc etc then the bit we want is between the last '/' and '|' which is easy enough.
I need to re-write the entire URL parsing block I think. I already have some ideas as to how to go about it, including adding a 'catch all' for stations that don't fit into a standard scheme.
I'll get onto it ASAP
Updated version now on
github.
Changes include :-
Improvements to URL handling and parsing, including a graceful fall-back in the event of an error.
Better handling of MBID's when the Musicbrainz server fails to reply - script now generates an 'emergency' MBID and uses that instead.
Much better error handling throughout. Most errors will cause a message (and a traceback) in the log file at the very least, but should not be fatal and cause the script to abort.
Small improvement to the search routine for TADB and the script will now search using the MBID if the artist name look-up fails.
Bit of a code tidy up in certain areas.
Hi black_eagle,
Thanks, I'm testing it.
Hi black_eagle,
new error:
PHP Code:
Line 16931: 08:48:32 T:140669150557952 NOTICE: Streaming Radio Helper : Version 0.6.7 started
Line 16932: 08:48:32 T:140669150557952 NOTICE: Streaming Radio Helper : ----------Settings-------------------------
Line 16933: 08:48:32 T:140669150557952 NOTICE: Streaming Radio Helper : Use fanart.tv : true
Line 16934: 08:48:32 T:140669150557952 NOTICE: Streaming Radio Helper : use tadb : true
Line 16935: 08:48:32 T:140669150557952 NOTICE: Streaming Radio Helper : changing to
Line 16937: 08:48:32 T:140669150557952 NOTICE: Streaming Radio Helper : ----------Settings-------------------------
Line 16938: 08:48:32 T:140669150557952 NOTICE: Streaming Radio Helper : Setting up addon
Line 16939: 08:48:32 T:140669150557952 NOTICE: Streaming Radio Helper : Loading data from pickle file
Line 16996: 08:48:33 T:140669150557952 NOTICE: Streaming Radio Helper : Cache contains 432 tracks
Line 16997: 08:48:33 T:140669150557952 NOTICE: Streaming Radio Helper : Cached data obtained before before 09-11-2016 will be refreshed if details are missing
Line 17003: 08:48:34 T:140669150557952 NOTICE: Streaming Radio Helper : File playing is http://stream.polskastacja.pl/ps40_mp3
Line 17004: 08:48:34 T:140669150557952 NOTICE: Streaming Radio Helper : Station name was : stream.polskastacja.pl/ps40_mp3 - changed to
Line 17005: 08:48:34 T:140669150557952 NOTICE: Streaming Radio Helper : Radio Streaming Helper has encountered an error and needs to close - too many values to unpack
Line 17006: 08:48:34 T:140669150557952 NOTICE: Streaming Radio Helper : ['Traceback (most recent call last):\n', ' File "/storage/.kodi/addons/script.radio.streaming.helper-master/default.py", line 159, in <module>\n artist,track = current_track.split(" - ")\n', 'ValueError: too many values to unpack\n']
Line 17007: 08:48:34 T:140669150557952 NOTICE: Streaming Radio Helper : Saving data to pickle file
Line 17029: 08:48:34 T:140669150557952 NOTICE: Streaming Radio Helper : Script Stopped
Two characters (-) in title
Bah......!!!!
Two '-' in the title wouldn't cause that, but two ' - ' (note the spaces) would as it expects 'artist - title' as the format of the string. Do you happen to know what the actual title was, and I'll see what I can do ?
(2016-11-16, 10:05)black_eagle Wrote: [ -> ]Bah......!!!!
Two '-' in the title wouldn't cause that, but two ' - ' (note the spaces) would as it expects 'artist - title' as the format of the string. Do you happen to know what the actual title was, and I'll see what I can do ?
PHP Code:
Gromee feat. Ma-Britt Scheffer - Fearless w Hot 100 - Gorąca Setka Hitów
artists:
Gromee feat. Ma-Britt Scheffer
title (+ additional info: "w Hot 100"
) :
Fearless w Hot 100
additional info:
Gorąca Setka Hitów
Information on the played song is not "pretty" (in a stream).
Can you immunize SRH?
Hi JB
I have a fix for that.....sort of !!
A better parsing option would appear to be to just find the first ' - ' occurrence and then split on that. This will work for standard ICY and Shoutcast streams as they are formatted 'artist - track'. In the case of the track you were listening to, the result would be Artist = 'Gromee feat. Ma-Britt Scheffer' and Title = 'Fearless w Hot 100 - Gorąca Setka Hitów'. I can't really see how I can pull out the title better given that the station is adding in it's own advertising after the actual title.
That said, there
is a way to do it via the add-on settings, by doing a similar thing to the station name substitution and setting some strings to be removed from the tracktitle. In your case, this would be 'w Hot 100 - Gorąca Setka Hitów' which would remove that from every track title, if it was present.
Give me a day or so and I'm sure I can get something together
(2016-11-16, 20:17)black_eagle Wrote: [ -> ]Hi JB
I have a fix for that.....sort of !!
A better parsing option would appear to be to just find the first ' - ' occurrence and then split on that. This will work for standard ICY and Shoutcast streams as they are formatted 'artist - track'. In the case of the track you were listening to, the result would be Artist = 'Gromee feat. Ma-Britt Scheffer' and Title = 'Fearless w Hot 100 - Gorąca Setka Hitów'. I can't really see how I can pull out the title better given that the station is adding in it's own advertising after the actual title.
That said, there is a way to do it via the add-on settings, by doing a similar thing to the station name substitution and setting some strings to be removed from the tracktitle. In your case, this would be 'w Hot 100 - Gorąca Setka Hitów' which would remove that from every track title, if it was present.
Give me a day or so and I'm sure I can get something together
Hi black_eagle
Thanks, I'm waiting for the new github
I have some code I'm currently testing. With that artist/track info that you gave me above, feeding all that in as the playing track (as Kodi sees it originally) gives this result.
I have added the ability to set three strings in the add-on settings that can be used to remove extra info inserted by a radio station. In this case, I set the string to 'w Hot 100 - Gorąca Setka Hitów' with the result you see above
This should be up on github over the weekend. I just need to make sure that some other stuff I have added is stable first !! It does seem to be, but I want to make sure, although I'm sure you'll probably be able to break it anyway lol
OK,
github has been updated.
Changes are as follows.
- Script now caches MBID's in case the Musicbrainz server is unavailable (this is happening to me quite a lot at the moment). If the server is unavailable, the cached MBID is used if there is one. If not, an emergency MBID is generated from the artist name. This is not cached.
- Script now can correct artist names that are slightly wrong using data from TADB. Eg, 'E.L.O.' is corrected to 'Electric Light Orchestra'. This improves album lookups as well.
- Settings now has an area where three strings can be set which will be removed from the track data. This aids in getting the right track name in cases where the radio station adds extra info after the track name. One string is already set (JohnyBee should be pleased !!! ) (Strings are case sensitive !)
- Splitting of the artist from the track has been improved.
Error logging has been improved also, although I'm hoping it's not going to be needed lol.
(2016-11-19, 19:28)black_eagle Wrote: [ -> ]OK, github has been updated.
Changes are as follows.- Script now caches MBID's in case the Musicbrainz server is unavailable (this is happening to me quite a lot at the moment). If the server is unavailable, the cached MBID is used if there is one. If not, an emergency MBID is generated from the artist name. This is not cached.
- Script now can correct artist names that are slightly wrong using data from TADB. Eg, 'E.L.O.' is corrected to 'Electric Light Orchestra'. This improves album lookups as well.
- Settings now has an area where three strings can be set which will be removed from the track data. This aids in getting the right track name in cases where the radio station adds extra info after the track name. One string is already set (JohnyBee should be pleased !!! ) (Strings are case sensitive !)
- Splitting of the artist from the track has been improved.
Error logging has been improved also, although I'm hoping it's not going to be needed lol.
Hi black_eagle,
Thanks, thanks, thanks I'm testing it.
(2016-11-27, 13:38)Solo0815 Wrote: [ -> ]I'm testing right now ...
There are some issues with skin.helper-beta:
http://forum.kodi.tv/showthread.php?tid=...pid2464542
I hope they are fixed soon I don't know, if your script gives back the variables to skin.helper. Then you should have a look here:
https://github.com/marcelveldt/script.sk...usic-items
You have to use SkinHelper.Player.Art.XYZ in the new version of skin.helper
No, my script doesn't use the skin helper service at all. The modded version of MQ7's musicvisualisation that I use however does use it for cd art.