user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36' user_agent_mobile = 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Mobile Safari/537.36' # storage PLEX_CACHE_DIR = 'Plex' # path constants bundle_path = os.path.join(os.getcwd().lstrip('\\\?').split('Plug-in Support')[0], 'Plug-ins', channel_title+'.bundle') modules_path = os.path.join(bundle_path, 'Contents', 'Libraries', 'Shared') resources_path = os.path.join(bundle_path, 'Contents', 'Resources') app_support_path = os.path.join(bundle_path.split('Plug-ins')[0]) support_path = os.path.join(app_support_path, 'Plug-in Support') data_path = os.path.join(support_path, 'Data', identifier) caches_path = os.path.join(support_path, 'Caches', identifier) MC = common.NewMessageContainer(PREFIX, TITLE) BACKUP_KEYS = ['DOWNLOAD_OPTIONS','INTERNAL_SOURCES_QUALS', 'INTERNAL_SOURCES_SIZES', 'INTERNAL_SOURCES_RIPTYPE', 'INTERNAL_SOURCES_FILETYPE', 'OPTIONS_PROVIDERS', 'OPTIONS_PROXY', 'INTERNAL_SOURCES', 'BOOT_UP_CONTROL_SETTINGS', 'DOWNLOAD_AUTOPILOT', 'MISC_OPTIONS'] RECENT_IMDB_SEARCHES = {} #################################################################################################### @route(PREFIX + "/DevToolsC") def DevToolsC(title=None, header=None, message=None, session=None, **kwargs): """Tools to Remove all Covers/URLs cached files""" if not common.interface.isInitialized(): return MC.message_container(common.MSG0, '%s. Progress %s%s (%s)' % (common.MSG1, common.interface.getProvidersInitStatus(), '%', common.interface.getCurrentProviderInProcess())) if AuthTools.CheckAdmin() == False: return MC.message_container('Admin Access Only', 'Only the Admin can perform this action !')
import re, urllib, urllib2, json, sys, time, random, urlparse import common, updater, fmovies, tools, download from DumbTools import DumbKeyboard import AuthTools from __builtin__ import eval TITLE = common.TITLE PREFIX = common.PREFIX MC = common.NewMessageContainer(common.PREFIX, common.TITLE) #################################################################################################### @route(PREFIX+'/videoplayback') def CreateVideoObject(url, title, summary, thumb, params, duration, genres, videoUrl, videoRes, watch_title, include_container=False, playDirect=False, force_transcode=False, **kwargs): videoUrl = videoUrl.decode('unicode_escape') url = url if url != None else videoUrl force_transcode = True if str(force_transcode) == 'True' else False if include_container: video = MovieObject( key = Callback(CreateVideoObject, url=url, title=title, summary=summary, thumb=thumb, params=params, duration=duration, genres=genres, videoUrl=videoUrl, videoRes=videoRes, watch_title=watch_title, include_container=True, playDirect=playDirect, force_transcode=force_transcode), rating_key = url + title, title = title, summary = summary, thumb = thumb, items = [ MediaObject( container = Container.MP4 if not force_transcode else None, # MP4, MKV, MOV, AVI video_codec = VideoCodec.H264 if not force_transcode else None, # H264 audio_codec = AudioCodec.AAC if not force_transcode else None, # ACC, MP3