2016-07-03, 17:59
I try to add .lrc file to my audio list:
But .lrc file is displayed just as another music file. Do I use incorrect mimetype (Kodi source doesn't have .lrc value defined)?
Does Kodi verifies actual filenames? In my case mp3 file name could have one value (for ex., http://server1.com/abcd.mp3, when lyrics file will be named totally different (for ex., http://example.com/folder/filename.lrc)).
P.S. Karaoke is enabled (and yes, I use old version of Kodi, which supports Karaoke).
Code:
# add mp3 record
listitem = xbmcgui.ListItem(PrepareString(listTitle))
listitem.setInfo(type='Music', infoLabels={'title': a.get('title') or '',
'artist': a.get('artist') or '',
'album': a.get('artist') or '',
'duration': a.get('duration') or 0})
listitem.setProperty('mimetype', 'audio/mpeg')
xbmcplugin.addDirectoryItem(self.handle, url, listitem, False)
# add according lyrics record
url = 'http://example.com/filename.lrc'
listitem = xbmcgui.ListItem(PrepareString(listTitle))
listitem.setInfo(type='Music', infoLabels={'title': a.get('title') or '',
'artist': a.get('artist') or '',
'album': a.get('artist') or '',
'duration': a.get('duration') or 0})
listitem.setProperty('mimetype', 'application/octet-stream')
xbmcplugin.addDirectoryItem(self.handle, url, listitem, False)
But .lrc file is displayed just as another music file. Do I use incorrect mimetype (Kodi source doesn't have .lrc value defined)?
Does Kodi verifies actual filenames? In my case mp3 file name could have one value (for ex., http://server1.com/abcd.mp3, when lyrics file will be named totally different (for ex., http://example.com/folder/filename.lrc)).
P.S. Karaoke is enabled (and yes, I use old version of Kodi, which supports Karaoke).