Skip to content

Commit

Permalink
Disable adaptive before player will ready
Browse files Browse the repository at this point in the history
  • Loading branch information
KOL committed Feb 18, 2016
1 parent 7e7541a commit 644de2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<key>CFBundleSignature</key>
<string>hook</string>
<key>CFBundleVersion</key>
<string>4.1</string>
<string>4.2</string>

<key>PlexPluginVersionUrl</key>
<string>http://bit.ly/1FuE3dz</string>
Expand Down
13 changes: 6 additions & 7 deletions Contents/Services/Shared Code/video.pys
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ def GetVideoUrls(url):
# Normal video
elif 'url_encoded_fmt_stream_map' in meta:
# High definition
key = 'adaptive_fmts' if 'adaptive_fmts' in meta else 'url_encoded_fmt_stream_map'
key = 'url_encoded_fmt_stream_map'
if 'adaptive_fmts' and IsAdaptiveSupport():
key = 'adaptive_fmts'

for item in meta[key].split(','):
item = dict(map(
lambda x: (x[0], x[1][0]),
Expand Down Expand Up @@ -204,12 +207,8 @@ def GetUrlFromStream(item, player_url):
return ret


def GetFromMainContent(item, key):
try:
cont = item['video_main_content']['contents'][0]
return cont[key]['runs'][0]['text']
except:
return ''
def IsAdaptiveSupport():
return False


def DecryptSignature(s, player_url):
Expand Down

0 comments on commit 644de2b

Please sign in to comment.