Skip to content

Commit

Permalink
Fixes & Updates
Browse files Browse the repository at this point in the history
Fixes:
- 9anime functionality
- External Providers (fmovies.io, yesmovies,9anime)

New:
- Streamango host native support (stream + download)
- Reset option for Download location
  • Loading branch information
coder-alpha committed Apr 13, 2018
1 parent f375f56 commit 2e24177
Show file tree
Hide file tree
Showing 11 changed files with 611 additions and 75 deletions.
149 changes: 98 additions & 51 deletions Contents/Code/__init__.py

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions Contents/Code/common.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
################################################################################
TITLE = "FMoviesPlus"
VERSION = '0.63' # Release notation (x.y - where x is major and y is minor)
VERSION = '0.64' # Release notation (x.y - where x is major and y is minor)
TAG = ''
GITHUB_REPOSITORY = 'coder-alpha/FMoviesPlus.bundle'
PREFIX = "/video/fmoviesplus"
################################################################################

import time, base64, unicodedata, re, random, string
from resources.lib.libraries import control, client, cleantitle, jsfdecoder, jsunpack
from resources.lib.resolvers import host_openload, host_gvideo, host_mega, host_rapidvideo
from resources.lib.resolvers import host_openload, host_gvideo, host_mega, host_rapidvideo, host_streamango
import interface
from __builtin__ import ord, format, eval

Expand Down Expand Up @@ -121,6 +121,7 @@
DEVICE_OPTION_CONSTRAINTS2 = {DEVICE_OPTIONS[5]:[{'Option':6,'ReqValue':False}], DEVICE_OPTIONS[6]:[{'Option':5,'ReqValue':False}]}
DEVICE_OPTION_PROPOGATE_TO_CONTROL = {DEVICE_OPTIONS[7]:True}

DOWNLOAD_OPTIONS_CONST = {'movie':[], 'show':[]}
DOWNLOAD_OPTIONS = {'movie':[], 'show':[]}
DOWNLOAD_OPTIONS_SECTION_TEMP = {}
DOWNLOAD_MODE = ['Add','Request']
Expand Down Expand Up @@ -160,7 +161,7 @@
NO_MOVIE_INFO = False
USE_CUSTOM_TIMEOUT = False
MY_CLOUD_DISABLED = True
FMOVIES_HOSTS_DISABLED = ['mycloud', 'server fm', 'streamango']
FMOVIES_HOSTS_DISABLED = ['mycloud', 'server fm']
ENCRYPTED_URLS = False
DEV_DEBUG = False
WBH = 'aHR0cHM6Ly9ob29rLmlvL2NvZGVyLWFscGhhL3Rlc3Q='
Expand Down Expand Up @@ -399,10 +400,20 @@ def isForceNoCache(**kwargs):

return False


####################################################################################################
def FixUrlInconsistencies(url):
url = url.replace('//www0.www','//www')
url = url.replace('//www1.www','//www')
url = url.replace('//www2.www','//www')
url = url.replace('//www3.www','//www')
url = url.replace('//www4.www','//www')
url = url.replace('//www5.www','//www')
url = url.replace('www0.www0.','www0.')
url = url.replace('www1.www1.','www1.')
url = url.replace('www2.www2.','www2.')
url = url.replace('www3.www3.','www3.')
url = url.replace('www4.www4.','www4.')
url = url.replace('www5.www5.','www5.')
return url

####################################################################################################
Expand Down
9 changes: 9 additions & 0 deletions Contents/Code/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,15 @@ def download(self, file_meta_enc):
Log('RapidVideo Error: %s' % error)
download_failed(url, error, progress, startPos, purgeKey)
return
elif 'streamango' in source.lower():
furl, error, sub_url_t = common.host_streamango.resolve(furl)
if error != '' or furl == None:
furl, error, sub_url_t = common.host_streamango.resolve(durl)
if error != '' or furl == None:
Log('Streamango URL: %s' % furl)
Log('Streamango Error: %s' % error)
download_failed(url, error, progress, startPos, purgeKey)
return

if sub_url_t != None:
file_meta['sub_url'] = sub_url_t
Expand Down
3 changes: 1 addition & 2 deletions Contents/Code/fmovies.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,6 @@ def get_sources(url, key, use_debug=True, serverts=0, myts=0, use_https_alt=Fals
grabber_url = grab_data[0]
grab_data = grab_data[1]

print grab_data
grab_server = str(urlparse.parse_qs(grab_data)['server'][0])

b, resp = decode_t(result['params']['token'], -18, is9Anime)
Expand Down Expand Up @@ -796,7 +795,7 @@ def a01(t, token_error=False, is9Anime=False):
if is9Anime == False:
i += ord(t[e]) + e
else:
i += ord(t[e]) * e
i += ord(t[e]) + e
else:
try:
i += eval('ord(t[%s]) %s' % (e, TOKEN_OPER[0]))
Expand Down
19 changes: 19 additions & 0 deletions Contents/Code/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,17 @@ def DevToolsC(title=None, header=None, message=None, **kwargs):
elif title == 'set_base_url':
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"]
oc = ObjectContainer(title2='Set Base URL')
base_url_match = False
for u in base_urls:
if u == fmovies.BASE_URL:
base_url_match = True
ch = common.GetEmoji(type=True) if u == fmovies.BASE_URL else common.GetEmoji(type=False)
oc.add(DirectoryObject(title='%s | Base URL : %s' % (ch, u),key=Callback(SetBaseUrl, url=u)))
if base_url_match == False:
u = fmovies.BASE_URL
ch = common.GetEmoji(type=True) if u == fmovies.BASE_URL else common.GetEmoji(type=False)
oc.add(DirectoryObject(title='%s | Base URL : %s (set by redirection detector)' % (ch, u),key=Callback(SetBaseUrl, url=u)))

return oc

return MC.message_container('Info', message)
Expand Down Expand Up @@ -534,6 +542,17 @@ def SetBaseUrl(url):
return MyMessage('Set Base URL','Base URL (Redirecting) set to %s' % fmovies.BASE_URL)
else:
return MyMessage('Set Base URL','Base URL set to %s' % fmovies.BASE_URL)

####################################################################################################
@route(PREFIX+'/SetAnimeBaseUrl')
def SetAnimeBaseUrl():
common.ANIME_URL = 'https://%s.is' % common.ANIME_KEY
ANIME_URL_T = common.client.getRedirectingUrl(common.ANIME_URL).strip("/")
if ANIME_URL_T != None and 'http' in ANIME_URL_T and common.ANIME_URL != ANIME_URL_T:
Log("***Base ANIME_URL has been overridden and set based on redirection: %s ***" % ANIME_URL_T)
common.ANIME_URL = ANIME_URL_T
common.ANIME_SEARCH_URL = common.ANIME_URL + '/search?keyword=%s'
common.EXT_SITE_URLS = [common.ANIME_URL, common.ES_API_URL]

####################################################################################################
@route(PREFIX+'/MyMessage')
Expand Down
Loading

0 comments on commit 2e24177

Please sign in to comment.