2022-10-21, 17:35
I'm using MediaMonley version 5 to cast my music on Kody who is installed on my fire TV. My m4a songs have the lyr field properly populated.
When I cast a song from MediaMonkey no lyric is displayed. if I play the same file using the smb network path , the lyric is displayed.
So I open the script.cu.lrclyrics-6.3.9 code and start to review it. the problem seem to be here in the utils.py file :
DLNA is being seen has an internetStream or RadioStream , this is why it does not look into the file for the lyric. I add some logs to confirm this
if match:
song.title = song.title[4:]
if xbmc.getCondVisibility('Player.IsInternetStream') or xbmc.getCondVisibility('Pvr.IsPlayingRadio'):
# disable search for embedded lyrics for internet streams
log('disable search for embedded lyrics for internet streams', debug=True)
song.analyze_safe = False
if not song.artist:
# We probably listen to online radio which usually sets the song title as 'Artist - Title' (via ICY StreamTitle)
sep = song.title.find('-')
if sep > 1:
song.artist = song.title[:sep - 1].strip()
song.title = song.title[sep + 1:].strip()
# The title can contains some additional info in brackets at the end, so we remove it
song.title = re.sub(r'\([^\)]*\)$', '', song.title)
if (song.filepath and ((not song.title) or (not song.artist) or (SETTING_READ_FILENAME))):
song.artist, song.title = get_artist_from_filename(filename=song.filepath, opt=kwargs['opt'])
if SETTING_CLEAN_TITLE:
song.title = re.sub(r'\([^\)]*\)$', '', song.title)
return song
full log is here :
https://paste.kodi.tv/owahoxijam
When I cast a song from MediaMonkey no lyric is displayed. if I play the same file using the smb network path , the lyric is displayed.
So I open the script.cu.lrclyrics-6.3.9 code and start to review it. the problem seem to be here in the utils.py file :
DLNA is being seen has an internetStream or RadioStream , this is why it does not look into the file for the lyric. I add some logs to confirm this
if match:
song.title = song.title[4:]
if xbmc.getCondVisibility('Player.IsInternetStream') or xbmc.getCondVisibility('Pvr.IsPlayingRadio'):
# disable search for embedded lyrics for internet streams
log('disable search for embedded lyrics for internet streams', debug=True)
song.analyze_safe = False
if not song.artist:
# We probably listen to online radio which usually sets the song title as 'Artist - Title' (via ICY StreamTitle)
sep = song.title.find('-')
if sep > 1:
song.artist = song.title[:sep - 1].strip()
song.title = song.title[sep + 1:].strip()
# The title can contains some additional info in brackets at the end, so we remove it
song.title = re.sub(r'\([^\)]*\)$', '', song.title)
if (song.filepath and ((not song.title) or (not song.artist) or (SETTING_READ_FILENAME))):
song.artist, song.title = get_artist_from_filename(filename=song.filepath, opt=kwargs['opt'])
if SETTING_CLEAN_TITLE:
song.title = re.sub(r'\([^\)]*\)$', '', song.title)
return song
full log is here :
https://paste.kodi.tv/owahoxijam