Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Commit

Permalink
Remove unwise decoding; fix video playback.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pip Longrun committed Jan 28, 2017
1 parent cb467f6 commit a68d822
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 125 deletions.
116 changes: 0 additions & 116 deletions Contents/Services/Shared Code/unwise.pys

This file was deleted.

11 changes: 2 additions & 9 deletions Contents/Services/URL/Trailer Addict/ServiceCode.pys
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import unwise
RE_FILES = Regex("file: *'([^']+)'")

####################################################################################################
Expand All @@ -24,17 +23,11 @@ def PlayVideo(url, **kwargs):
if len(video_url) < 1:
raise Ex.MediaNotAvailable

data = HTTP.Request(video_url[0]).content
data = unwise.unwise_process(data)
data = HTTP.Request(video_url[0], cacheTime=0).content
files = RE_FILES.findall(data)

if len(files) < 1:
Log('Regex failed...')
return None

for file in files:

if '-hd' in file:
return Redirect(file)

return Redirect(files[0])
return Redirect(files[-1])

0 comments on commit a68d822

Please sign in to comment.