Skip to content

Commit

Permalink
fixes & new
Browse files Browse the repository at this point in the history
Fixes:
- Retrieve year for Bookmarked items to assist Ext. Sources
- Typos

New:
- Video Page for External List items (Ext. Search WIP)
- Define Min/Max File-Size for AutoPilot
- New Provider Cool Tv Series
- New Provider Series Free
  • Loading branch information
coder-alpha committed Apr 19, 2019
1 parent bb2e87c commit 762e5ea
Show file tree
Hide file tree
Showing 11 changed files with 926 additions and 82 deletions.
9 changes: 8 additions & 1 deletion Contents/Code/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,14 @@ def GetEmoji(type, mode='vibrant', session=None):
if session == None:
session = getSession()

if mode == 'simple' and (UsingOption(DEVICE_OPTIONS[3], session=session) or UsingOption(DEVICE_OPTIONS[4], session=session)):
if mode == 'txt':
if type == 'pos' or type == 'true':
return EMOJI_TXT_POS
elif type =='neg' or type == 'false':
return EMOJI_TXT_NEG
else:
return EMOJI_TXT_QUES
elif mode == 'simple' and (UsingOption(DEVICE_OPTIONS[3], session=session) or UsingOption(DEVICE_OPTIONS[4], session=session)):
if type == 'pos' or type == 'true':
return EMOJI_TICK
elif type =='neg' or type == 'false':
Expand Down
148 changes: 117 additions & 31 deletions Contents/Code/downloadsmenu.py

Large diffs are not rendered by default.

78 changes: 48 additions & 30 deletions Contents/Code/main.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,15 @@ def evpKDF(passwd, salt, key_size=8, iv_size=4, iterations=1, hash_algorithm="md
return {
"key": derived_bytes[0: key_size * 4],
"iv": derived_bytes[key_size * 4:]
}
}

def aliases_to_array(aliases, filter=None):
try:
if not filter:
filter = []
if isinstance(filter, str):
filter = [filter]

return [x.get('title') for x in aliases if not filter or x.get('country') in filter]
except:
return []
29 changes: 24 additions & 5 deletions Contents/Libraries/Shared/resources/lib/resolvers/host_direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def __init__(self):
self.init = False
self.logo = 'https://i.imgur.com/nbtnvDr.png'
self.name = name
self.host = ['imdb.com','media-imdb.com','einthusan.tv','vimeocdn.com','apple.com','akamaized.net','micetop.us','vidcdn.pro','fbcdn.net','cmovieshd.com', 'vcstream.to', 'documentarymania.com','3donlinefilms.com','3dmoviesfullhd.com','totaleclips.com','freedocufilms.com','cartoonhd.pw']
self.netloc = ['imdb.com','media-imdb.com','einthusan.tv','vimeocdn.com','apple.com','akamaized.net','micetop.us','vidcdn.pro','fbcdn.net','cmovieshd.com', 'vcstream.to', 'documentarymania.com','3donlinefilms.com','3dmoviesfullhd.com','totaleclips.com','freedocufilms.com','cartoonhd.pw']
self.host = ['imdb.com','media-imdb.com','einthusan.tv','vimeocdn.com','apple.com','akamaized.net','micetop.us','vidcdn.pro','fbcdn.net','cmovieshd.com', 'vcstream.to', 'documentarymania.com','3donlinefilms.com','3dmoviesfullhd.com','totaleclips.com','freedocufilms.com','cartoonhd.pw','cooltvseries.com']
self.netloc = ['imdb.com','media-imdb.com','einthusan.tv','vimeocdn.com','apple.com','akamaized.net','micetop.us','vidcdn.pro','fbcdn.net','cmovieshd.com', 'vcstream.to', 'documentarymania.com','3donlinefilms.com','3dmoviesfullhd.com','totaleclips.com','freedocufilms.com','cartoonhd.pw','cooltvseries.com']
self.quality = '1080p'
self.loggertxt = []
self.captcha = False
Expand Down Expand Up @@ -240,6 +240,21 @@ def process(self, url, q, r, headers, page_url):
params = client.b64encode(json.dumps(paramsx, encoding='utf-8'))

items.append({'quality':q, 'riptype':r, 'src':url, 'fs':fs, 'online':online, 'params':params, 'urldata':urldata, 'allowsStreaming':False, 'allowsDownload':True})
elif 'cooltvseries.com' in url:
urlx = client.request(url, output='geturl', headers=headers)
urlx = '%s?e=file.mp4' % urlx
fs = client.getFileSize(url, retry429=True, headers=headers)
if fs == None or int(fs) == 0:
fs = client.getFileSize(url, retry429=True)
q = qual_based_on_fs(q,fs)
online = check(url)
urldata = client.b64encode(json.dumps('', encoding='utf-8'))
params = client.b64encode(json.dumps('', encoding='utf-8'))
if headers != None:
paramsx = {'headers':headers}
params = client.b64encode(json.dumps(paramsx, encoding='utf-8'))
allowsDownload = True
items.append({'quality':q, 'riptype':r, 'src':urlx, 'fs':fs, 'online':online, 'params':params, 'urldata':urldata, 'allowsStreaming':True, 'allowsDownload':allowsDownload})
else:
fs = client.getFileSize(url, retry429=True, headers=headers)
if fs == None or int(fs) == 0:
Expand Down Expand Up @@ -274,12 +289,16 @@ def process(self, url, q, r, headers, page_url):

return items

def qual_based_on_fs(q,fs):
def qual_based_on_fs(q, fs):
try:
if int(fs) > 2 * float(1024*1024*1024):
if int(fs) > 1.75 * float(1024*1024*1024):
q = '1080p'
elif int(fs) > 1 * float(1024*1024*1024):
elif int(fs) > 0.5 * float(1024*1024*1024):
q = '720p'
elif int(fs) < 0.3 * float(1024*1024*1024):
q = '480p'
else:
q = '360p'
except:
pass
return q
Expand Down
12 changes: 8 additions & 4 deletions Contents/Libraries/Shared/resources/lib/resolvers/host_mega.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,17 @@ def createurldata(mfile, qual):
ret = json.dumps(ret, encoding='utf-8')

return client.b64encode(ret)
def qual_based_on_fs(q,fs):

def qual_based_on_fs(q, fs):
try:
if int(fs) > 2 * float(1024*1024*1024):
if int(fs) > 1.75 * float(1024*1024*1024):
q = '1080p'
elif int(fs) > 1 * float(1024*1024*1024):
elif int(fs) > 0.5 * float(1024*1024*1024):
q = '720p'
elif int(fs) < 0.3 * float(1024*1024*1024):
q = '480p'
else:
q = '360p'
except:
pass
return q
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,19 @@ def getAllQuals(url, online=None):
e = '{}'.format(e)
return (None, e, None)


def qual_based_on_fs(fs):
q = '480p'
try:
if int(fs) > 2 * float(1024*1024*1024):
q = '480p'

if int(fs) > 1.75 * float(1024*1024*1024):
q = '1080p'
elif int(fs) > 1 * float(1024*1024*1024):
elif int(fs) > 0.5 * float(1024*1024*1024):
q = '720p'
elif int(fs) < 0.3 * float(1024*1024*1024):
q = '480p'
else:
q = '360p'
except:
pass
return q
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,16 @@ def resolve(url, online=None, page_url=None, **kwargs):
e = '{}'.format(e)
return (None, e, None)

def qual_based_on_fs(q,fs):
def qual_based_on_fs(q, fs):
try:
if int(fs) > 2 * float(1024*1024*1024):
if int(fs) > 1.75 * float(1024*1024*1024):
q = '1080p'
elif int(fs) > 1 * float(1024*1024*1024):
elif int(fs) > 0.5 * float(1024*1024*1024):
q = '720p'
elif int(fs) < 0.3 * float(1024*1024*1024):
q = '480p'
else:
q = '360p'
except:
pass
return q
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,16 @@ def getAllQuals(url, page_url, online=None):
e = '{}'.format(e)
return (None, e, None)

def qual_based_on_fs(fs):
q = '480p'
def qual_based_on_fs(q, fs):
try:
if int(fs) > 2 * float(1024*1024*1024):
if int(fs) > 1.75 * float(1024*1024*1024):
q = '1080p'
elif int(fs) > 1 * float(1024*1024*1024):
elif int(fs) > 0.5 * float(1024*1024*1024):
q = '720p'
elif int(fs) < 0.3 * float(1024*1024*1024):
q = '480p'
else:
q = '360p'
except:
pass
return q
Expand Down
Loading

0 comments on commit 762e5ea

Please sign in to comment.