CU LRC with radio streams - 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: Lyrics Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=146) +---- Thread: CU LRC with radio streams (/showthread.php?tid=203405) |
CU LRC with radio streams - black_eagle - 2014-09-01 Firstly, I'd like to say what a great addon this is !! However, I've never been able to grab lyrics from a live radio stream (and I listen to the radio a lot). I added a bunch of logging to see if I could determine why it wouldn't work for me and it turns out that the addon was trying to find lyrics for the name of the radio station I was listening to, and not a song. No wonder it never found anything !!! I played around a bit with the current song routine in an effort to correct this. I found that using the infolabel to determine a duration of zero (live stream) was hit and miss, probably due to a slight amount of buffering. I changed this to a json call, which appears to always return a value of zero for a live stream. I also found that the current code expects the artist field to be empty, but in testing with various live streams in the UK, this is not the case and the artist field is invariably populated with a string pertaining to the radio station. E.G 'planetrock.aac -' or 'Viking FM -'. I therefore changed the criteria from empty artist field to empty title field. Getting the artist and title is done with another json call after which the script already has code to parse the result and split it into the correct fields. The relevant code that I have changed in utilities.py is as follows PHP Code: def current(): This does work (for me at any rate), but only if you enter the music visualisation screen each time the song changes. I have an idea about updating when the song changes. Need a variable that holds the last song title which is then checked against the current title. PHP Code: if song.title !=lastsongtitle: I'm really not sure though where this should go. In myPlayerChanged in gui.py I'm aware that Ronie wrote it mainly to look through playlists and that triggering it may be difficult with a live stream. I'd love to be able to get it to work though. It really would be icing on my cake. RE: CU LRC with radio streams - refael65 - 2014-09-16 Hi black_eagle i use tunein addon radio in xbmc works great with cu lrc but, like you said you need to enter the music visualisation screen each time the song changes. i'm not a programer but i would love to see it fixed any lock with this issue? Refael RE: CU LRC with radio streams - ray2301 - 2018-03-16 Oh how I love when some old threads help me out to go in the right direction My problem was when using radio streams through the IPTV Simple Client - whenever i executed the script to get the lyrics, it would search for the PVR channel number (something like PVR.xyxyxy). So, I had to replace: Code: if not song.artist and xbmc.getCondVisibility('Player.IsInternetStream'): Code: if not song.artist and xbmc.getCondVisibility('Pvr.IsPlayingRadio'): I copied the whole section so now it works for both internet streams (playing through PVR or playing through some other radio plugin). I guess kodi doesn't recognize internet radio streams that play through PVR plugins as regular internet streams. RE: CU LRC with radio streams - ronie - 2018-03-16 thanx for the tip! i'll add your code to the cu lrc lyrics addon. |