def playTrack(asin):
content = trackPostUnicodeGetHLSPage('https://music.amazon.de/dmls/', asin)
temp_file_path = addonUserDataFolder
if forceDVDPlayer:
temp_file_path += "/temp.mp4"
else:
temp_file_path += "/temp.m3u8"
if xbmcvfs.exists(temp_file_path):
xbmcvfs.delete(temp_file_path)
m3u_temp_file = xbmcvfs.File(temp_file_path, 'w')
manifest_match = re.compile('manifest":"(.+?)"',re.DOTALL).findall(content)
if manifest_match:
m3u_string = manifest_match[0]
m3u_string = m3u_string.replace("\\n", os.linesep)
m3u_temp_file.write(m3u_string.encode("ascii"))
m3u_temp_file.close()
play_item = xbmcgui.ListItem(path=temp_file_path)
play_item = setPlayItemInfo(play_item)
xbmcplugin.setResolvedUrl(pluginhandle, True, listitem=play_item)
评论列表
文章目录