Skip to content

Commit

Permalink
修复软路由启用解锁网易云灰色功能导致插件无法播放
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengfan2014 committed Apr 15, 2021
1 parent 010f34d commit fadbe8f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
24 changes: 20 additions & 4 deletions plugin.audio.jsososo/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ def one63ritui():
# gdurl = mp3urls[i]['url']
# if gdurl == '':
# gd['name'] += ' - [无版权]'
gdurl = 'https://music.163.com/song/media/outer/url?id='+str(glist[index]['id'])+'.mp3'
if xbmcplugin.getSetting(int(sys.argv[1]), 'httpswitch') == 'true':
gdurl = 'http'
else:
gdurl = 'https'
gdurl += '://music.163.com/song/media/outer/url?id='+str(glist[index]['id'])+'.mp3'
gd['url'] = gdurl
gd['info'] = {'title':glist[index]['name'],'album':glist[index]['album']['name'],'artist':glist[index]['artists'][0]['name'],'mediatype':'song'}
#gd['url'] = j2['data'][0]['url']
Expand Down Expand Up @@ -301,7 +305,11 @@ def one63playlist(id):
# if gdurl == '':
# gd['name'] += ' - [无版权]'
# gd['url'] = gdurl
gd['url'] = 'http://music.163.com/song/media/outer/url?id=' + str(mp3detail[index]['id']) + '.mp3'
if xbmcplugin.getSetting(int(sys.argv[1]), 'httpswitch') == 'true':
gd['url'] = 'http'
else:
gd['url'] = 'https'
gd['url'] += '://music.163.com/song/media/outer/url?id=' + str(mp3detail[index]['id']) + '.mp3'
gd['info'] = {'title':mp3detail[index]['name'],'album':mp3detail[index]['al']['name'],'artist':mp3detail[index]['ar'][0]['name'],'mediatype':'song'}
#gd['url'] = j2['data'][0]['url']
gedans.append(gd)
Expand Down Expand Up @@ -358,7 +366,11 @@ def one63album(id):
gd['name'] = mp3detail[index]['name']
gd['thumb'] = mp3detail[index]['al']['picUrl']
# gd['url'] = mp3url[index]['url']
gd['url'] = 'https://music.163.com/song/media/outer/url?id=' + str(mp3detail[index]['id']) + '.mp3'
if xbmcplugin.getSetting(int(sys.argv[1]), 'httpswitch') == 'true':
gd['url'] = 'http'
else:
gd['url'] = 'https'
gd['url'] += '://music.163.com/song/media/outer/url?id=' + str(mp3detail[index]['id']) + '.mp3'
gedans.append(gd)
return gedans

Expand Down Expand Up @@ -483,7 +495,11 @@ def one63rank(value):
gd['label'] += u'(' + glist[index]['alia'][0] + u')'
gd['thumb'] = glist[index]['al']['picUrl']
# gd['url'] = mp3url[index]['url']
gd['url'] = 'https://music.163.com/song/media/outer/url?id=' + str(glist[index]['id']) + '.mp3'
if xbmcplugin.getSetting(int(sys.argv[1]), 'httpswitch') == 'true':
gd['url'] = 'http'
else:
gd['url'] = 'https'
gd['url'] += '://music.163.com/song/media/outer/url?id=' + str(glist[index]['id']) + '.mp3'
gedans.append(gd)
return gedans

Expand Down
2 changes: 1 addition & 1 deletion plugin.audio.jsososo/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.jsososo" name="Jsososo" version="0.1.0" provider-name="zhengfan">
<addon id="plugin.audio.jsososo" name="Jsososo" version="0.1.1" provider-name="zhengfan">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.xbmcswift2" version="2.4.0"/>
Expand Down

0 comments on commit fadbe8f

Please sign in to comment.