Skip to content

Commit

Permalink
fixes & enhancements
Browse files Browse the repository at this point in the history
Fixes:
- openload.js
- GoWatchSeries False Positives
- FMovies algo for certain cases did not match year correctly
- 3dOnlineFilms match algo.
- IMDb provider

New:
- Thread Status
- Interface Control Log
- More file size options
- AutoPilot via External Search
- Search Using IMDb ID (50 free per day) via VideoSpider
  • Loading branch information
coder-alpha committed Mar 9, 2019
1 parent 71e99ed commit a357f9f
Show file tree
Hide file tree
Showing 38 changed files with 1,164 additions and 476 deletions.
11 changes: 6 additions & 5 deletions Contents/Code/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
TITLE = "FMoviesPlus"
VERSION = '0.75' # Release notation (x.y - where x is major and y is minor)
VERSION = '0.76' # Release notation (x.y - where x is major and y is minor)
TAG = ''
GITHUB_REPOSITORY = 'coder-alpha/FMoviesPlus.bundle'
PREFIX = "/video/fmoviesplus"
Expand All @@ -23,7 +23,7 @@
pass

BASE_URL = "https://fmovies.taxi"
BASE_URLS = ["https://bmovies.is","https://bmovies.to","https://bmovies.pro","https://bmovies.online","https://bmovies.club","https://bmovies.ru","https://fmovies.to","https://fmovies.is","https://fmovies.taxi","https://fmovies.se"]
BASE_URLS = ["https://bmovies.is","https://bmovies.to","https://bmovies.pro","https://bmovies.online","https://bmovies.club","https://bmovies.ru","https://fmovies.to","https://fmovies.is","https://fmovies.taxi","https://fmovies.se","https://ffmovies.ru"]

JSEngines_ALLowed = ['Node']
Engine_OK = False
Expand Down Expand Up @@ -100,7 +100,7 @@
#INTERNAL_SOURCES_FILETYPE = [{'label':'Movie/Show','enabled': 'True'},{'label':'Trailer','enabled': 'True'},{'label':'Interviews','enabled': 'False'},{'label':'Behind the scenes','enabled': 'False'},{'label':'Music Video','enabled': 'False'},{'label':'Deleted Scenes','enabled': 'False'},{'label':'Misc.','enabled': 'False'}]
#INTERNAL_SOURCES_SIZES = [{'label':'> 2GB','enabled': 'True','LL':2*TO_GB,'UL':100*TO_GB},{'label':'1GB - 2GB','enabled': 'True','LL':1*TO_GB,'UL':2*TO_GB},{'label':'0.5GB - 1GB','enabled': 'True','LL':0.5*TO_GB,'UL':1*TO_GB},{'label':'0GB - 0.5GB','enabled': 'True','LL':1,'UL':0.5*TO_GB},{'label':'0GB','enabled': 'False','LL':0,'UL':0}]

INTERNAL_SOURCES_SIZES_CONST = [{'label':'> 2GB','enabled': 'True','LL':2*TO_GB,'UL':1024*TO_GB},{'label':'1GB >= 2GB','enabled': 'True','LL':1*TO_GB,'UL':2*TO_GB},{'label':'0.5GB >= 1GB','enabled': 'True','LL':0.5*TO_GB,'UL':1*TO_GB},{'label':'0GB >= 0.5GB','enabled': 'True','LL':999999,'UL':0.5*TO_GB},{'label':'0GB','enabled': 'False','LL':0,'UL':999999}]
INTERNAL_SOURCES_SIZES_CONST = [{'label':'> 10GB','enabled': 'False','LL':10*TO_GB,'UL':1024*TO_GB},{'label':'5GB >= 10GB','enabled': 'True','LL':5*TO_GB,'UL':10*TO_GB},{'label':'2GB >= 5GB','enabled': 'True','LL':2*TO_GB,'UL':5*TO_GB},{'label':'1GB >= 2GB','enabled': 'True','LL':1*TO_GB,'UL':2*TO_GB},{'label':'0.5GB >= 1GB','enabled': 'True','LL':0.5*TO_GB,'UL':1*TO_GB},{'label':'0GB >= 0.5GB','enabled': 'True','LL':999999,'UL':0.5*TO_GB},{'label':'0GB','enabled': 'False','LL':0,'UL':999999}]
INTERNAL_SOURCES_QUALS_CONST = [{'label':'4K','enabled': 'True'},{'label':'1080p','enabled': 'True'},{'label':'720p','enabled': 'True'},{'label':'480p','enabled': 'True'},{'label':'360p','enabled': 'True'}]
INTERNAL_SOURCES_RIPTYPE_CONST = [{'label':'BRRIP','enabled': 'True'},{'label':'3D-BRRIP','enabled': 'True'},{'label':'PREDVD','enabled': 'True'},{'label':'CAM','enabled': 'True'},{'label':'TS','enabled': 'True'},{'label':'SCR','enabled': 'True'},{'label':'UNKNOWN','enabled': 'True'}]
INTERNAL_SOURCES_FILETYPE_CONST = [{'label':'Movie/Show','enabled':'True'},{'label':'Trailer','enabled':'True'},{'label':'Featurette','enabled':'False'},{'label':'Interviews','enabled':'False'},{'label':'Behind the scenes','enabled':'False'},{'label':'Music Video','enabled':'False'},{'label':'Deleted Scenes','enabled':'False'},{'label':'Misc.','enabled':'False'}]
Expand Down Expand Up @@ -184,6 +184,7 @@
ICON_GL_ENABLE = "icon-gl-enable.png"
ICON_GL_DISABLE = "icon-gl-disable.png"
ICON_INFO = "icon-info.png"
ICON_LOG = "icon-log.png"
ICON_INFO_ALERT = "icon-info-alert.png"
ICON_STAR = "icon-star.png"
ICON_PEOPLE = "icon-people.png"
Expand All @@ -196,6 +197,7 @@
ICON_SAVE = "icon-save.png"
ICON_QUALITIES = "icon-qualities.png"
ICON_FILESIZES = "icon-filesizes.png"
ICON_SIZES = "icon-sizes.png"
ICON_RIPTYPE = "icon-riptype.png"
ICON_QUESTION = "icon-question.png"
ICON_PROXY = "icon-proxy.png"
Expand All @@ -212,6 +214,7 @@
ICON_REQUESTS = "icon-requests.png"
ICON_TOOLS = "icon-tools.png"
ICON_WARNING = "icon-warning.png"
ICON_SYSSTATUS = "icon-status.png"

MSG0 = "Please wait.."
MSG1 = "Please give some time for the Interface to Load & Initialize plugins"
Expand Down Expand Up @@ -987,13 +990,11 @@ def OpenLoadUnpair(**kwargs):

def makeUID(title, year='None', quality='None', source='None', url='None', season='None', episode='None'):
return E(title+str(year)+str(quality)+str(source)+str(url)+str(season)+str(episode))


def id_generator(size=9, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))

def makeid(N,arr):

r = ''
while r == '':
rt = ''.join(random.choice(string.ascii_uppercase) for _ in range(N))
Expand Down
30 changes: 29 additions & 1 deletion Contents/Code/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def setDownloadThrottler(self, d):
self.dlthrottle = d

def download(self, file_meta_enc):

file_meta = JSON.ObjectFromString(D(file_meta_enc))
title = file_meta['title']
url = file_meta['url']
Expand Down Expand Up @@ -209,6 +210,9 @@ def download(self, file_meta_enc):
if fname == None:
raise fname_e

tuid = common.id_generator(16)
common.control.AddThread('download', 'Download File: %s' % fname, time.time(), '2', False, tuid)

abs_path = Core.storage.join_path(path, item_folder_name, fname)
directory = Core.storage.join_path(path, item_folder_name)

Expand All @@ -225,6 +229,7 @@ def download(self, file_meta_enc):
Log('OpenLoad URL: %s' % furl)
Log('OpenLoad Error: %s' % error)
download_failed(url, error, progress, startPos, purgeKey)
common.control.RemoveThread(tuid)
return
elif 'rapidvideo' in source.lower():
furl, error, sub_url_t = common.host_rapidvideo.resolve(furl)
Expand All @@ -234,6 +239,7 @@ def download(self, file_meta_enc):
Log('RapidVideo URL: %s' % furl)
Log('RapidVideo Error: %s' % error)
download_failed(url, error, progress, startPos, purgeKey)
common.control.RemoveThread(tuid)
return
elif 'streamango' in source.lower():
furl, error, sub_url_t = common.host_streamango.resolve(furl)
Expand All @@ -243,6 +249,7 @@ def download(self, file_meta_enc):
Log('Streamango URL: %s' % furl)
Log('Streamango Error: %s' % error)
download_failed(url, error, progress, startPos, purgeKey)
common.control.RemoveThread(tuid)
return
elif 'direct' in source.lower():
furl, params_enc, error = common.host_direct.resolve(furl)
Expand All @@ -252,6 +259,7 @@ def download(self, file_meta_enc):
Log('3donlinefilms URL: %s' % furl)
Log('3donlinefilms Error: %s' % error)
download_failed(url, error, progress, startPos, purgeKey)
common.control.RemoveThread(tuid)
return
try:
params = json.loads(base64.b64decode(params_enc))
Expand Down Expand Up @@ -415,6 +423,7 @@ def download(self, file_meta_enc):
except:
pass
end_download_by_user(title, url, purgeKey)
common.control.RemoveThread(tuid)
return
elif action == common.DOWNLOAD_ACTIONS[1]: # pause
while action == common.DOWNLOAD_ACTIONS[1]:
Expand Down Expand Up @@ -450,6 +459,7 @@ def download(self, file_meta_enc):
except:
pass
postpone_download_by_user(title, url, progress, bytes_read, purgeKey)
common.control.RemoveThread(tuid)
return
else:
pass
Expand Down Expand Up @@ -570,6 +580,8 @@ def download(self, file_meta_enc):
r.close()
except:
pass

common.control.RemoveThread(tuid)

##############################################################################################

Expand Down Expand Up @@ -621,6 +633,9 @@ def create_fname(file_meta, vidtype, riptype, file_ext, file_ext_temp='', c='0')

def do_download(file_meta_enc):

tuid = common.id_generator(16)
common.control.AddThread('do_download', 'Initiate Download', time.time(), '2', False, tuid)

if len(common.DOWNLOAD_STATS.keys()) >= int(Prefs['download_connections']):
#Log(common.DOWNLOAD_STATS)
longstringObjs = JSON.ObjectFromString(D(file_meta_enc))
Expand All @@ -629,6 +644,7 @@ def do_download(file_meta_enc):
del QUEUE_RUN_ITEMS[uid]
if Prefs['use_debug']:
Log("Downlod connections limit reached (%s of %s). This item will be queued !" % (str(len(common.DOWNLOAD_STATS.keys())), Prefs['download_connections']))
common.control.RemoveThread(tuid)
return

downloader = Downloader()
Expand All @@ -641,6 +657,8 @@ def do_download(file_meta_enc):
#thread_i.start()
Thread.Create(downloader.download, {}, file_meta_enc)

common.control.RemoveThread(tuid)

def download_subtitle(url, sub_file_path, params=None):

try:
Expand Down Expand Up @@ -794,6 +812,9 @@ def postpone_download_by_user(title, url, progress, startPos, purgeKey):

def trigger_que_run(skip = []):

tuid = common.id_generator(16)
common.control.AddThread('trigger_que_run', 'Updates Download Items Run/Status', time.time(), '2', False, tuid)

time.sleep(3)
items_for_que_run = []
Dict_Temp = {}
Expand Down Expand Up @@ -843,6 +864,8 @@ def trigger_que_run(skip = []):
except Exception as e:
Log(e)

common.control.RemoveThread(tuid)

def move_unfinished_to_failed():

common.DOWNLOAD_TEMP = Dict['DOWNLOAD_TEMP']
Expand Down Expand Up @@ -946,6 +969,10 @@ def verifyStartPos(startPos, filepath):
return startPos

def DownloadInit():

tuid = common.id_generator(16)
common.control.AddThread('DownloadInit', 'Initialize Downloader', time.time(), '2', False, tuid)

move_unfinished_to_failed()
time.sleep(1)
if common.UsingOption(key=common.DEVICE_OPTIONS[13], session='None') == True:
Expand All @@ -955,6 +982,7 @@ def DownloadInit():
DLT.append(dlt)
DLT[0].start()
Thread.Create(trigger_que_run)


common.control.RemoveThread(tuid)
return

Loading

0 comments on commit a357f9f

Please sign in to comment.