diff --git a/addons.xml b/addons.xml index f48a086a..31b5c815 100644 --- a/addons.xml +++ b/addons.xml @@ -1,6 +1,6 @@ - + @@ -72,18 +72,13 @@ - + https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/master/addons.xml https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/master/addons.xml.md5 https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/master/zips - - https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/matrix/addons.xml - https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/matrix/addons.xml.md5 - https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/matrix/zips - https://raw.githubusercontent.com/PseudoTV/PseudoTV_Resources/master/addons.xml https://raw.githubusercontent.com/PseudoTV/PseudoTV_Resources/master/addons.xml.md5 diff --git a/addons.xml.md5 b/addons.xml.md5 index 47d429e7..3232e633 100644 --- a/addons.xml.md5 +++ b/addons.xml.md5 @@ -1 +1 @@ -c114e588b689314a3e71fca10db045fb \ No newline at end of file +fb26230a02ae4a12cb2625438e566e17 \ No newline at end of file diff --git a/plugin.video.pseudotv.live/addon.xml b/plugin.video.pseudotv.live/addon.xml index 9ca929c4..38a9c986 100644 --- a/plugin.video.pseudotv.live/addon.xml +++ b/plugin.video.pseudotv.live/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/plugin.video.pseudotv.live/changelog.txt b/plugin.video.pseudotv.live/changelog.txt index a50779d8..66dc7f0a 100644 --- a/plugin.video.pseudotv.live/changelog.txt +++ b/plugin.video.pseudotv.live/changelog.txt @@ -1,5 +1,8 @@ v.0.4.7 -Fixed misc. playback issues. +-Fixed Movie ratings filler and resources. +-Updated April Seasonal channels. +-Fixed channel bug not displaying correct logo. v.0.4.6 -Refactored Seasonal & Provisional Autotuning. diff --git a/plugin.video.pseudotv.live/resources/language/resource.language.en_gb/strings.po b/plugin.video.pseudotv.live/resources/language/resource.language.en_gb/strings.po index b828c2da..6e959eb4 100644 --- a/plugin.video.pseudotv.live/resources/language/resource.language.en_gb/strings.po +++ b/plugin.video.pseudotv.live/resources/language/resource.language.en_gb/strings.po @@ -517,6 +517,18 @@ msgctxt "#30124" msgid "Three Shows" msgstr "" +msgctxt "#30125" +msgid "IMDB Trailers" +msgstr "" + +msgctxt "#30126" +msgid "Kodi Trailers" +msgstr "" + +msgctxt "#30127" +msgid "Both Kodi/IMDB Trailers" +msgstr "" + diff --git a/plugin.video.pseudotv.live/resources/lib/builder.py b/plugin.video.pseudotv.live/resources/lib/builder.py index 447c134f..b286ee1a 100644 --- a/plugin.video.pseudotv.live/resources/lib/builder.py +++ b/plugin.video.pseudotv.live/resources/lib/builder.py @@ -53,32 +53,35 @@ def __init__(self, service=None): self.sort = {} #{"ignorearticle":true,"method":"random","order":"ascending","useartistsortname":true} self.limits = {} #{"end":0,"start":0,"total":0} - self.incRatings = SETTINGS.getSettingInt('Fillers_Ratings') - self.resRatings = SETTINGS.getSetting('Resource_Ratings').split('|') - self.incBumpers = SETTINGS.getSettingInt('Fillers_Bumpers') - self.resBumpers = SETTINGS.getSetting('Resource_Bumpers').split('|') - self.incAdverts = SETTINGS.getSettingInt('Fillers_Commercials') - self.resAdverts = SETTINGS.getSetting('Resource_Commericals').split('|') - self.incTrailer = SETTINGS.getSettingInt('Fillers_Trailers') - self.resTrailer = SETTINGS.getSetting('Resource_Trailers').split('|') + self.incRatings = SETTINGS.getSettingInt('Fillers_Ratings') + self.srcRatings = {"RESC":SETTINGS.getSetting('Resource_Ratings').split('|')} + + self.incBumpers = SETTINGS.getSettingInt('Fillers_Bumpers') + self.srcBumpers = {"PATH":[SETTINGS.getSetting('Resource_Bumpers')]} + + self.incAdverts = SETTINGS.getSettingInt('Fillers_Commercials') + self.srcAdverts = {"PATH":[SETTINGS.getSetting('Resource_Commericals')]} + + self.incTrailer = SETTINGS.getSettingInt('Fillers_Trailers') + self.srcTrailer = {"PATH":[SETTINGS.getSettingInt('Resource_Trailers')]} self.minDuration = SETTINGS.getSettingInt('Seek_Tolerance') self.maxDays = MAX_GUIDEDAYS self.minEPG = 10800 #Secs., Min. EPG guidedata - self.service = service - self.cache = Cache() - self.channels = Channels() - self.rules = RulesList(self.channels.getChannels()) - self.runActions = self.rules.runActions - self.xmltv = XMLTVS() - self.jsonRPC = JSONRPC() - self.xsp = XSP() - self.m3u = M3U() - self.resources = Resources(self.jsonRPC,self.cache) + self.service = service + self.cache = Cache() + self.channels = Channels() + self.rules = RulesList(self.channels.getChannels()) + self.runActions = self.rules.runActions + self.xmltv = XMLTVS() + self.jsonRPC = JSONRPC() + self.xsp = XSP() + self.m3u = M3U() + self.fillers = Fillers(self) + self.resources = Resources(self.jsonRPC,self.cache) - def log(self, msg, level=xbmc.LOGDEBUG): return log('%s: %s'%(self.__class__.__name__,msg),level) @@ -158,7 +161,8 @@ def getFileList(self, citem, now, start): else: cacheResponse = self.buildChannel(citem) if cacheResponse: - if self.fillBCTs and not radio: cacheResponse = Fillers(self).injectBCTs(citem, cacheResponse) + if self.fillBCTs and not radio: + cacheResponse = self.fillers.injectBCTs(citem, cacheResponse) cacheResponse = self.addScheduling(citem, cacheResponse, start) return sorted(cacheResponse, key=lambda k: k['start']) else: raise Exception('cacheResponse in-valid!\n%s'%(cacheResponse)) diff --git a/plugin.video.pseudotv.live/resources/lib/channelbug.py b/plugin.video.pseudotv.live/resources/lib/channelbug.py index 4fbe9b01..9e1cf356 100644 --- a/plugin.video.pseudotv.live/resources/lib/channelbug.py +++ b/plugin.video.pseudotv.live/resources/lib/channelbug.py @@ -48,7 +48,7 @@ def log(self, msg, level=xbmc.LOGDEBUG): def onInit(self): if not BUILTIN.getInfoBool('IsFullscreen','System'): - DIALOG.okDialog(LANGUAGE(32097)%(BUILTIN.getInfoLabel('ScreenResolution','System')), usethread=True) + DIALOG.okDialog(LANGUAGE(32097)%(BUILTIN.getInfoLabel('ScreenResolution','System'))) self.log('onInit, channelbug posx,posy = (%s,%s)'%(self.userPOSX,self.userPOSY)) self._channelBug = xbmcgui.ControlImage(self.userPOSX, self.userPOSY, 128, 128, COLOR_LOGO, aspectRatio=2) diff --git a/plugin.video.pseudotv.live/resources/lib/fillers.py b/plugin.video.pseudotv.live/resources/lib/fillers.py index cc495ac9..1dd32442 100644 --- a/plugin.video.pseudotv.live/resources/lib/fillers.py +++ b/plugin.video.pseudotv.live/resources/lib/fillers.py @@ -26,7 +26,14 @@ "R" :"Restricted – Under 17 requires accompanying parent or adult guardian.\nContains some adult material. Parents are urged to learn more about the film before taking their young children with them.", "NC-17":"Adults only – No one 17 and under admitted.\nClearly adult. Children are not admitted.", "NR" :"Film has not been submitted for a rating or it's rating is unknown."} - + +IMDB_PATHS = ['plugin://plugin.video.imdb.trailers/?action=list1&key=showing', + 'plugin://plugin.video.imdb.trailers/?action=list1&key=coming'] +#Ratings - resource only, Movie Type only any channel type +#Bumpers - plugin, path only, tv type, tv network, custom channel type +#Adverts - plugin, path only, tv type, any tv channel type +#Trailers - plug, path only, movie type, any movie channel. + class Fillers: def __init__(self, builder): self.builder = builder @@ -36,88 +43,109 @@ def __init__(self, builder): self.resources = Resources(self.jsonRPC,self.cache) #default global rules: - self.bctTypes = {"ratings" :{"min":1,"max":1,"auto":builder.incRatings == 1,"enabled":bool(builder.incRatings),"paths":builder.resRatings,"resources":{}}, - "bumpers" :{"min":1,"max":1,"auto":builder.incBumpers == 1,"enabled":bool(builder.incBumpers),"paths":builder.resBumpers,"resources":{}},} - - # "commercials":{"min":SETTINGS.getSettingInt('Fillers_Commercials'),"max":4, - # "enabled":SETTINGS.getSettingInt('Fillers_Commercials') > 0,"paths":(SETTINGS.getSetting('Resource_Commericals')).split('|')}, - - # "trailers" :{"min":SETTINGS.getSettingInt('Fillers_Trailers') ,"max":SETTINGS.getSettingInt('Fillers_Trailers') - 2, - # "enabled":SETTINGS.getSettingInt('Fillers_Trailers') > 0,"paths":(SETTINGS.getSetting('Resource_Trailers')).split('|')}} - - # self.buildResourceByType('ratings',self.bctTypes['ratings']['paths']) + self.bctTypes = {"ratings" :{"max":1 ,"auto":builder.incRatings == 1,"enabled":bool(builder.incRatings),"sources":builder.srcRatings,"resources":{}}, + "bumpers" :{"max":1 ,"auto":builder.incBumpers == 1,"enabled":bool(builder.incBumpers),"sources":builder.srcBumpers,"resources":{}}, + "adverts" :{"max":builder.incAdverts,"auto":builder.incAdverts == 1,"enabled":bool(builder.incAdverts),"sources":builder.srcAdverts,"resources":{}}, + "trailers" :{"max":builder.incTrailer,"auto":builder.incTrailer == 1,"enabled":bool(builder.incTrailer),"sources":builder.srcTrailer,"resources":{}}} + + self.fillResources() + print('self.bctTypes',self.bctTypes) def log(self, msg, level=xbmc.LOGDEBUG): return log('%s: %s'%(self.__class__.__name__,msg),level) - @cacheit(expiration=datetime.timedelta(minutes=15),json_data=True) - def buildResourceByType(self, type, ids): - def _parse(ids): - for id in ids: - if not hasAddon(id): continue - yield self.resources.walkResource(id,exts=VIDEO_EXTS) - - for resource in list(_parse(ids)): + def fillResources(self): + data = {} + for key, values in self.bctTypes.items(): + if values.get("sources",{}).get("RESC"): + data = self.buildResource(key,values['sources']["RESC"]) + if data: values["resources"].update(data) + + + # @cacheit(expiration=datetime.timedelta(minutes=15),json_data=True) + def buildResource(self, type, ids): + self.log('buildResource, type = %s, ids = %s'%(type, ids)) + def _parse(addonids): + for addon in addonids: + if not hasAddon(addon): continue + yield self.resources.walkResource(addon,exts=VIDEO_EXTS) + + def _rating(resource): for path in resource: for file in resource[path]: - key = file.split('.')[0].replace(' (3DSBS)','') - if '(3DSBS)' in file: self.bctTypes['ratings'].get('resources',{}).setdefault('3D',{}).setdefault(key,[]).append(os.path.join(path,file)) - else: self.bctTypes['ratings'].get('resources',{}).setdefault(key,[]).append(os.path.join(path,file)) - print('buildResourceByType',self.bctTypes.get(type,{})) - + tmpDCT.setdefault(file.split('.')[0],[]).append(os.path.join(path,file)) #{'PG-13':[],'R':[]} + tmpDCT = {} + for id in list(_parse(ids)): + if type == 'ratings': _rating(id) + return tmpDCT + - def getRating(self, fileItem, mpaa): + def getRating(self, mpaa): def _convert(rating): #https://www.spherex.com/tv-ratings-vs-movie-ratings #https://www.spherex.com/which-is-more-regulated-film-or-tv return rating.replace('TV-Y','G').replace('TV-Y7','G').replace('TV-G','G').replace('NA','NR').replace('TV-PG','PG').replace('TV-14','PG-13').replace('TV-MA','R') - try: + mpaa = re.compile(":(.*?)/", re.IGNORECASE).search(mpaa.upper()).group(1) + mpaa = mpaa.strip() + except: mpaa = mpaa.upper() - mpaa = re.compile(":(.*?)/", re.IGNORECASE).search(mpaa).group(1) - except: pass files = [] - print('getRating',mpaa) - if self.builder.is3D(fileItem): files = self.bctTypes['ratings']['resources'].get('3D',{}).get(mpaa,[]) - if not files: files = self.bctTypes['ratings'].get('resources',{}).get(mpaa,[]) - if not files: - mpaa = _convert(mpaa) - files = self.bctTypes['ratings'].get('resources',{}).get(mpaa,[]) - if files: return mpaa, random.choice(files) - return mpaa, files + for rating in [mpaa, _convert(mpaa)]: + print('getRating',rating) + files = self.bctTypes['ratings'].get('resources',{}).get(rating,[]) + if files: return rating, random.choice(files) + return mpaa, None + # @cacheit(expiration=datetime.timedelta(minutes=15),json_data=True) + def buildKodiTrailers(self, fileList): + def _parse(fileItem): + if not fileItem.get('trailer','').startswith(tuple(VFS_TYPES)): + return {'title':fileItem.get('title','Trailer'),'plot':(fileItem.get('plotoutline') or fileItem.get('plot','')),'path':fileItem.get('trailer')} + return poolit(_parse)(fileList) + + + def getTrailers(self, fileList): + files = self.buildKodiTrailers(fileList) + print('getTrailers',files) + if files: return random.choice(files) + + def injectBCTs(self, citem, fileList): - # nfileList = [] - # for idx, fileItem in enumerate(fileList): - # if not fileItem: continue - # elif self.builder.service._interrupt() or self.builder.service._suspend(): break - # else: - # try: - # #pre roll - ratings - # if fileItem.get('type').startswith(tuple(MOVIE_TYPES)): - # if self.bctTypes['ratings']['enabled']: - # mpaa = fileItem.get('mpaa','NR') - # mpaa, file = self.getRating(fileItem, mpaa) - # print('injectBCTs',mpaa,file) - # if file: - # dur = self.jsonRPC.getDuration(file, accurate=True) - # if dur > 0: - # self.log('injectBCTs, adding ratings %s\n%s - %s'%(fileItem.get('title'),file,dur)) - # nfileList.append(self.builder.buildCells(citem,dur,entries=1,info={'title':mpaa,'genre':['ratings'],'plot':RATING_DESC.get(mpaa,''),'path':file})[0]) - # # #pre roll - bumpers - # # elif fileItem.get('type').startswith(tuple(TV_TYPES)): - # # ... - # except Exception as e: self.log('injectBCTs, pre roll failed! %s'%(e), xbmc.LOGERROR) - # nfileList.append(fileItem) - # #post roll - commercials/trailers - # return nfileList + nfileList = [] + for idx, fileItem in enumerate(fileList): + if not fileItem: continue + elif self.builder.service._interrupt() or self.builder.service._suspend(): break + else: + #pre roll - ratings + if fileItem.get('type').startswith(tuple(MOVIE_TYPES)): + if self.bctTypes['ratings'].get('enabled',False): + mpaa, file = self.getRating(fileItem.get('mpaa','NR')) + print('injectBCTs',mpaa,file) + if file: + dur = self.jsonRPC.getDuration(file, accurate=True) + if dur > 0: + self.log('injectBCTs, adding ratings %s\n%s - %s'%(fileItem.get('title'),file,dur)) + nfileList.append(self.builder.buildCells(citem,dur,entries=1,info={'title':mpaa,'genre':['ratings'],'plot':RATING_DESC.get(mpaa,''),'path':file})[0]) + # #pre roll - bumpers + # elif fileItem.get('type').startswith(tuple(TV_TYPES)): + # ... + nfileList.append(fileItem) + #post roll - commercials/trailers + # if self.bctTypes['trailers'].get('enabled',False): + # tmpItem = self.getTrailers(fileList): + # dur = self.jsonRPC.getDuration(tmpItem.get('file'),tmpItem, accurate=True) + # print('injectBCTs',tmpItem,dur) + # if dur > 0: nfileList.append(self.builder.buildCells(citem,dur,entries=1,info=tmpItem)[0]) + return nfileList - - return fileList + # HasAddon(plugin.video.imdb.trailers) + # HasContent(Movies) + # return fileList # if not fileList: return fileList # self.log("injectBCTs, channel = %s, fileList = %s"%(citem.get('id'),len(fileList))) # ratings = self.buildResourceByType('ratings') diff --git a/plugin.video.pseudotv.live/resources/lib/globals.py b/plugin.video.pseudotv.live/resources/lib/globals.py index 1eaa1484..fe2fa947 100644 --- a/plugin.video.pseudotv.live/resources/lib/globals.py +++ b/plugin.video.pseudotv.live/resources/lib/globals.py @@ -375,24 +375,28 @@ def KODI_LIVETV_SETTINGS(): #recommended Kodi LiveTV settings def IPTV_SIMPLE_SETTINGS(): #recommended IPTV Simple settings CLIENT_MODE = SETTINGS.getSettingInt('Client_Mode') - return {'kodi_addon_instance_name' :ADDON_NAME, - 'kodi_addon_instance_enabled' :'true', - 'm3uRefreshMode' :'1', - 'm3uRefreshIntervalMins' :'15', - 'm3uRefreshHour' :'0', - 'm3uCache' :'true', - 'logoPathType' :'0', - 'logoPath' :LOGO_LOC, - 'm3uPathType' :'%s'%('1' if CLIENT_MODE == 1 else '0'), - 'm3uPath' :M3UFLEPATH, - 'm3uUrl' :SETTINGS.getSetting('Remote_M3U'), - 'epgPathType' :'%s'%('1' if CLIENT_MODE == 1 else '0'), - 'epgPath' :XMLTVFLEPATH, - 'epgUrl' :SETTINGS.getSetting('Remote_XMLTV'), - 'epgCache' :'true', - 'genresPathType' :'%s'%('1' if CLIENT_MODE == 1 else '0'), - 'genresPath' :GENREFLEPATH, - 'genresUrl' :SETTINGS.getSetting('Remote_GENRE'), + return {'kodi_addon_instance_name' :ADDON_NAME, + 'kodi_addon_instance_enabled' :'true', + 'm3uRefreshMode' :'1', + 'm3uRefreshIntervalMins' :'15', + 'm3uRefreshHour' :'0', + 'm3uCache' :'true', + 'logoPathType' :'0', + 'logoPath' :LOGO_LOC, + 'm3uPathType' :'%s'%('1' if CLIENT_MODE == 1 else '0'), + 'm3uPath' :M3UFLEPATH, + 'm3uUrl' :SETTINGS.getSetting('Remote_M3U'), + 'epgPathType' :'%s'%('1' if CLIENT_MODE == 1 else '0'), + 'epgPath' :XMLTVFLEPATH, + 'epgUrl' :SETTINGS.getSetting('Remote_XMLTV'), + 'epgCache' :'true', + 'genresPathType' :'%s'%('1' if CLIENT_MODE == 1 else '0'), + 'genresPath' :GENREFLEPATH, + 'genresUrl' :SETTINGS.getSetting('Remote_GENRE'), + 'timeshiftEnabled' :'false', + 'catchupPlayEpgAsLive' :'false', + 'catchupWatchEpgEndBufferMins' :'0', + 'catchupWatchEpgBeginBufferMins':'0', # 'tvGroupMode' :'0', # 'customTvGroupsFile' :(TVGROUPFLE),#todo # 'radioGroupMode' :'0', @@ -406,11 +410,7 @@ def IPTV_SIMPLE_SETTINGS(): #recommended IPTV Simple settings 'catchupPlayEpgAsLive' :'false', 'allChannelsCatchupMode' :'0', 'numberByOrder' :'false', - 'startNum' :'1', - # 'epgTSOverride' :'false', - # 'useFFmpegReconnect' :'true', - # 'useInputstreamAdaptiveforHls':'true' - } + 'startNum' :'1'} def togglePVR(state=True, reverse=False, waitTime=15): log('globals: togglePVR, state = %s, reverse = %s, waitTime = %s'%(state,reverse,waitTime)) diff --git a/plugin.video.pseudotv.live/resources/lib/kodi.py b/plugin.video.pseudotv.live/resources/lib/kodi.py index 72ea0025..e8f724e9 100644 --- a/plugin.video.pseudotv.live/resources/lib/kodi.py +++ b/plugin.video.pseudotv.live/resources/lib/kodi.py @@ -777,37 +777,18 @@ def colorDialog(self, xml='', items=[], preselect=[], heading=ADDON_NAME): return xbmcgui.Dialog().colorpicker(heading, colorfile=xml, colorlist=items, selectedcolor=preselect) - def _okDialog(self, msg, heading, autoclose, url, wait=0.5): - timerit(self.okDialog)(wait,[msg, heading, autoclose, url]) - - - def okDialog(self, msg, heading=ADDON_NAME, autoclose=900, url=None, usethread=False): - if usethread: return self._okDialog(msg, heading, autoclose, url) - else: - if autoclose > 0: timerit(Builtin().executebuiltin)(autoclose,['Dialog.Close(okdialog)']) - # todo add qr code support - # if not url is None and hasAddon('script.module.pyqrcode'): - # import pyqrcode - # imagefile = os.path.join(xbmcvfs.translatePath(PROFILE),'%s.png' % str(url.split('/')[-1])) - # qrIMG = pyqrcode.create(url) - # qrIMG.png(imagefile, scale=10) - # qr = QRCode( "main.xml" , ADDON_PATH, "default", image=imagefile, text=message) - # qr.doModal() - # del qr - # xbmcvfs.delete(imagefile) - # return - return xbmcgui.Dialog().ok(heading, msg) + def okDialog(self, msg, heading=ADDON_NAME, autoclose=900, url=None): + if autoclose > 0: timerit(Builtin().executebuiltin)(autoclose,['Dialog.Close(okdialog)']) + return xbmcgui.Dialog().ok(heading, msg) def _textviewer(self, msg, heading, usemono, autoclose, wait=0.5): timerit(self.textviewer)(wait,[msg, heading, usemono, autoclose]) - def textviewer(self, msg, heading=ADDON_NAME, usemono=False, autoclose=900, usethread=False): - if usethread: return self._textviewer(msg, heading, usemono, autoclose) - else: - if autoclose > 0: timerit(Builtin().executebuiltin)(autoclose,['Dialog.Close(textviewer)']) - return xbmcgui.Dialog().textviewer(heading, msg, usemono) + def textviewer(self, msg, heading=ADDON_NAME, usemono=False, autoclose=900): + if autoclose > 0: timerit(Builtin().executebuiltin)(autoclose,['Dialog.Close(textviewer)']) + return xbmcgui.Dialog().textviewer(heading, msg, usemono) def yesnoDialog(self, message, heading=ADDON_NAME, nolabel='', yeslabel='', customlabel='', autoclose=900): diff --git a/plugin.video.pseudotv.live/resources/lib/overlay.py b/plugin.video.pseudotv.live/resources/lib/overlay.py index 96be0b59..3e57e613 100644 --- a/plugin.video.pseudotv.live/resources/lib/overlay.py +++ b/plugin.video.pseudotv.live/resources/lib/overlay.py @@ -259,7 +259,7 @@ def getWait(state): self._channelBug.setEnableCondition('[Player.Playing]') citem = self.player.sysInfo.get('citem',{}) - logo = citem.get('icon',LOGO) + logo = citem.get('logo',LOGO) self.log('toggleBug, channelbug logo = %s)'%(logo)) if SETTINGS.getSettingBool('Force_Diffuse'): self._channelBug.setColorDiffuse(self.channelBugColor) @@ -316,8 +316,8 @@ def getOnNextInterval(interval=3): self._addControl(self._onNext) self._onNext.setEnableCondition('[Player.Playing]') - onNow = '%s on %s'%(self.builtin.getInfoLabel('Title','VideoPlayer'), citem.get('name',ADDON_NAME)) - onNext = self.builtin.getInfoLabel('NextTitle','VideoPlayer') + onNow = '%s on %s'%(BUILTIN.getInfoLabel('Title','VideoPlayer'), citem.get('name',ADDON_NAME)) + onNext = BUILTIN.getInfoLabel('NextTitle','VideoPlayer') self._onNext.setText('%s\n%s'%(LANGUAGE(32104)%(onNow),LANGUAGE(32116)%(onNext))) self._onNext.setAnimations([('Conditional', 'effect=fade start=0 end=100 time=2000 delay=1000 condition=True reversible=True')]) self._onNext.autoScroll(6000, 3000, 5000) diff --git a/plugin.video.pseudotv.live/resources/lib/plugin.py b/plugin.video.pseudotv.live/resources/lib/plugin.py index 4bf144c7..e9cfaecf 100644 --- a/plugin.video.pseudotv.live/resources/lib/plugin.py +++ b/plugin.video.pseudotv.live/resources/lib/plugin.py @@ -43,11 +43,10 @@ def __init__(self, sysARG=sys.argv): try: self.sysInfo = dict(urllib.parse.parse_qsl(sysARG[2][1:].replace('.pvr',''))) except: self.sysInfo = {} - self.sysInfo.update({"name" : (unquoteString(self.sysInfo.get('name','')) or BUILTIN.getInfoLabel('ChannelName')), "title" : (unquoteString(self.sysInfo.get('title','')) or BUILTIN.getInfoLabel('label')), "vid" : decodeString(self.sysInfo.get('vid','')), - "duration" : (timeString2Seconds(BUILTIN.getInfoLabel('Duration(hh:mm:ss)')) or int(self.sysInfo.get('duration',0))), + "duration" : (int(self.sysInfo.get('duration',0)) or timeString2Seconds(BUILTIN.getInfoLabel('Duration(hh:mm:ss)'))), "progress" : (BUILTIN.getInfoLabel('Progress'),BUILTIN.getInfoLabel('PercentPlayed')), "chlabel" : BUILTIN.getInfoLabel('ChannelNumberLabel'), "chpath" : BUILTIN.getInfoLabel('FileNameAndPath'), @@ -234,7 +233,7 @@ def _matchJSON(): callback = _matchVFS() else: callback = _matchJSON() #use faster jsonrpc on high power devices. requires 'pvr://' json whitelisting. - if callback is None: return DIALOG.okDialog(LANGUAGE(32133), autoclose=90, usethread=True) + if callback is None: return DIALOG.okDialog(LANGUAGE(32133), autoclose=90) return callback def _extend(pvritem): @@ -286,15 +285,15 @@ def playCHK(self, oldInfo={}): if oldInfo.get('chid',random.random()) == self.sysInfo.get('chid') and oldInfo.get('starttime',random.random()) == self.sysInfo.get('starttime'): self.sysInfo['playcount'] = oldInfo.get('playcount',0) + 1 self.sysInfo['runtime'] = oldInfo.get('runtime',-1) - if self.sysInfo['duration'] > self.sysInfo['runtime']: - self.log('playCHK, failed! Duration error between player (%s) and pvr (%s).'%(self.sysInfo['duration'],self.sysInfo['runtime'])) - return False - if int(oldInfo['seek']) >= oldInfo['duration']: - self.log('playCHK, failed! Seeking past duration.') - return False - if oldInfo['seek'] == self.sysInfo['seek']: - self.log('playCHK, failed! Seeking to same position.') - return False + # if self.sysInfo['duration'] > self.sysInfo['runtime']: + # self.log('playCHK, failed! Duration error between player (%s) and pvr (%s).'%(self.sysInfo['duration'],self.sysInfo['runtime'])) + # return False + # if self.sysInfo['seek'] >= oldInfo['runtime']: + # self.log('playCHK, failed! Seeking past duration.') + # return False + # elif self.sysInfo['seek'] == oldInfo['seek']: + # self.log('playCHK, failed! Seeking to same position.') + # return False return True diff --git a/plugin.video.pseudotv.live/resources/lib/seasonal.py b/plugin.video.pseudotv.live/resources/lib/seasonal.py index af18a2a1..4acd2603 100644 --- a/plugin.video.pseudotv.live/resources/lib/seasonal.py +++ b/plugin.video.pseudotv.live/resources/lib/seasonal.py @@ -34,77 +34,77 @@ MOVIE_QUERY = {"path":"videodb://movies/titles/" ,"limit":"","sort":{},"filter":{}, "method":"VideoLibrary.GetMovies" ,"enum":"Video.Fields.Movie" ,"key":"movies"} -SEASONS = {"January" : {'1':{'name':"New Years Anthologies" , 'tagline':"“You're traveling through another dimension...“" , 'keyword':'newyear' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://cdn-icons-png.flaticon.com/512/3763/3763123.png'}, - '2':{'name':"Science Fiction Week" , 'tagline':"“Science fiction frees you to go anyplace and examine anything.“", 'keyword':'scifi' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://www.pngall.com/wp-content/uploads/6/Science-Fiction-PNG-Free-Download.png'}, - '3':{'name':"J.R.R. Tolkien Week" , 'tagline':"“One ring to rule them all.“" , 'keyword':'lotr' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://www.pngall.com/wp-content/uploads/12/Lord-Of-The-Rings-Logo-PNG-Picture.png'}, - '4':{'name':'Lego Week' , 'tagline':"“With a bucket of Lego, you can tell any story.“" , 'keyword':'lego' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://pngimg.com/d/lego_PNG99.png'}, - '5':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, +SEASONS = {"January" : {'1':{'name':"New Years Anthologies" , 'tagline':"“You're traveling through another dimension...“" , 'keyword':'newyear' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://cdn-icons-png.flaticon.com/512/3763/3763123.png'}, + '2':{'name':"Science Fiction Week" , 'tagline':"“Science fiction frees you to go anyplace and examine anything.“", 'keyword':'scifi' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://www.pngall.com/wp-content/uploads/6/Science-Fiction-PNG-Free-Download.png'}, + '3':{'name':"J.R.R. Tolkien Week" , 'tagline':"“One ring to rule them all.“" , 'keyword':'lotr' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://www.pngall.com/wp-content/uploads/12/Lord-Of-The-Rings-Logo-PNG-Picture.png'}, + '4':{'name':'Lego Week' , 'tagline':"“With a bucket of Lego, you can tell any story.“" , 'keyword':'lego' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://pngimg.com/d/lego_PNG99.png'}, + '5':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "February" : {'1':{'name':"G.I. Joe Week" , 'tagline':"“A Real American Hero!“" , 'keyword':'gijoe' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://preview.redd.it/zul0o3zwo2r71.png?width=640&crop=smart&auto=webp&s=4ad37682d57f808ce82dba51c9aeaebce5b59258'}, - '2':{'name':"Valentines Week" , 'tagline':"“Love is in the air!“" , 'keyword':'romance' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://icons.iconarchive.com/icons/designbolts/valentine/512/Happy-valentines-day-icon.png'}, - '3':{'name':"Pokémon Week" , 'tagline':"“Gotta Catch ""em All“" , 'keyword':'pokemon' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://w7.pngwing.com/pngs/427/428/png-transparent-pokemon-logo-pokemon-go-pikachu-logo-ash-ketchum-pokemon-go-text-banner-sign.png'}, - '4':{'name':"Superman Week" , 'tagline':"“Truth, justice, and the American way.“" , 'keyword':'superman', 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Superman_S_symbol.svg/2560px-Superman_S_symbol.svg.png'}, - '5':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, + "February" : {'1':{'name':"G.I. Joe Week" , 'tagline':"“A Real American Hero!“" , 'keyword':'gijoe' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://preview.redd.it/zul0o3zwo2r71.png?width=640&crop=smart&auto=webp&s=4ad37682d57f808ce82dba51c9aeaebce5b59258'}, + '2':{'name':"Valentines Week" , 'tagline':"“Love is in the air!“" , 'keyword':'romance' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://icons.iconarchive.com/icons/designbolts/valentine/512/Happy-valentines-day-icon.png'}, + '3':{'name':"Pokémon Week" , 'tagline':"“Gotta Catch ""em All“" , 'keyword':'pokemon' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://w7.pngwing.com/pngs/427/428/png-transparent-pokemon-logo-pokemon-go-pikachu-logo-ash-ketchum-pokemon-go-text-banner-sign.png'}, + '4':{'name':"Superman Week" , 'tagline':"“Truth, justice, and the American way.“" , 'keyword':'superman' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Superman_S_symbol.svg/2560px-Superman_S_symbol.svg.png'}, + '5':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "March" : {'1':{'name':"Dr. Seuss Week" , 'tagline':"“Think and wonder. Wonder and think.”" , 'keyword':'seuss' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://static.wikia.nocookie.net/logopedia/images/9/90/Dr._Seuss.svg/revision/latest?cb=20180125222130',}, - '2':{'name':"Alfred Hitchcock Week" , 'tagline':"“Always make the audience suffer...”" , 'keyword':'hitch' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/fr/6/6b/Alfred_Hitchcock_pr%C3%A9sente.png'}, - '3':{'name':"St. Patrick's Week" , 'tagline':"“May the luck of the Irish lead to happiest heights...”" , 'keyword':'patrick' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://seeklogo.com/images/H/happy-st-patricks-day-logo-AFF883C309-seeklogo.com.png'}, - '4':{'name':"J.R.R. Tolkien Week" , 'tagline':"“One ring to rule them all.“" , 'keyword':'lotr' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://www.pngall.com/wp-content/uploads/12/Lord-Of-The-Rings-Logo-PNG-Picture.png'}, - '5':{'name':"Quentin Tarantino Week" , 'tagline':"“If you just love movies enough, you can make a good one.”" , 'keyword':'quentin' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://rat.in.ua/wp-content/uploads/2019/11/4758-Written-and-Directed-by-Quentin-Tarantino.png'}}, + "March" : {'1':{'name':"Dr. Seuss Week" , 'tagline':"“Think and wonder. Wonder and think.”" , 'keyword':'seuss' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://static.wikia.nocookie.net/logopedia/images/9/90/Dr._Seuss.svg/revision/latest?cb=20180125222130',}, + '2':{'name':"Alfred Hitchcock Week" , 'tagline':"“Always make the audience suffer...”" , 'keyword':'hitchcock', 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/fr/6/6b/Alfred_Hitchcock_pr%C3%A9sente.png'}, + '3':{'name':"St. Patrick's Week" , 'tagline':"“May the luck of the Irish lead to happiest heights...”" , 'keyword':'patrick' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://seeklogo.com/images/H/happy-st-patricks-day-logo-AFF883C309-seeklogo.com.png'}, + '4':{'name':"J.R.R. Tolkien Week" , 'tagline':"“One ring to rule them all.“" , 'keyword':'lotr' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://www.pngall.com/wp-content/uploads/12/Lord-Of-The-Rings-Logo-PNG-Picture.png'}, + '5':{'name':"Quentin Tarantino Week" , 'tagline':"“If you just love movies enough, you can make a good one.”" , 'keyword':'quentin' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://rat.in.ua/wp-content/uploads/2019/11/4758-Written-and-Directed-by-Quentin-Tarantino.png'}}, - "April" : {'1':{'name':"Star Trek Week" , 'tagline':"“To Boldly Go...“" , 'keyword':'startrek', 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/commons/thumb/8/8a/Star_Trek_TOS_logo.svg/2560px-Star_Trek_TOS_logo.svg.png'}, - '2':{'name':"Shakespeare Week" , 'tagline':"“Non Sans Droict“" , 'keyword':'othello' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '3':{'name':"Superhero Week" , 'tagline':"“I Can Do This All Day!“" , 'keyword':'super' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '4':{'name':"Alien Week" , 'tagline':"“In space, no one can hear you scream.“" , 'keyword':'aliens' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '5':{'name':"Star Wars Week" , 'tagline':"“May the force be with you.“" , 'keyword':'starwars', 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, + "April" : {'1':{'name':"Star Trek Week" , 'tagline':"“To Boldly Go...“" , 'keyword':'startrek' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/commons/thumb/8/8a/Star_Trek_TOS_logo.svg/2560px-Star_Trek_TOS_logo.svg.png'}, + '2':{'name':"Shakespeare Week" , 'tagline':"“Non Sans Droict“" , 'keyword':'othello' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '3':{'name':"Superhero Week" , 'tagline':"“I Can Do This All Day!“" , 'keyword':'super' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '4':{'name':"Alien Week" , 'tagline':"“In space, no one can hear you scream.“" , 'keyword':'aliens' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '5':{'name':"Star Wars Week" , 'tagline':"“May the force be with you.“" , 'keyword':'starwars' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "May" : {'1':{'name':"Star Wars Week" , 'tagline':"“May the force be with you.“" , 'keyword':'starwars', 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '2':{'name':"Twilight Zone Week" , 'tagline':"“You are about to enter another dimension...“" , 'keyword':'twilight', 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '3':{'name':"Sherlock Holmes Week" , 'tagline':"“The Game is Afoot!“" , 'keyword':'watson' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '4':{'name':"Dracula Week" , 'tagline':"“Fidelis et mortem“" , 'keyword':'vampire' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '5':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, + "May" : {'1':{'name':"Star Wars Week" , 'tagline':"“May the force be with you.“" , 'keyword':'starwars' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '2':{'name':"Twilight Zone Week" , 'tagline':"“You are about to enter another dimension...“" , 'keyword':'twilight' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '3':{'name':"Sherlock Holmes Week" , 'tagline':"“The Game is Afoot!“" , 'keyword':'watson' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '4':{'name':"Dracula Week" , 'tagline':"“Fidelis et mortem“" , 'keyword':'vampire' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '5':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "June" : {'1':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '2':{'name':"Ghostbusters Week" , 'tagline':"“Who You Gonna Call?“" , 'keyword':'ghosts' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '3':{'name':"Superman Week" , 'tagline':"“Truth, justice, and the American way.“" , 'keyword':'superman', 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Superman_S_symbol.svg/2560px-Superman_S_symbol.svg.png'}, - '4':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '5':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, + "June" : {'1':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '2':{'name':"Ghostbusters Week" , 'tagline':"“Who You Gonna Call?“" , 'keyword':'ghosts' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '3':{'name':"Superman Week" , 'tagline':"“Truth, justice, and the American way.“" , 'keyword':'superman' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Superman_S_symbol.svg/2560px-Superman_S_symbol.svg.png'}, + '4':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '5':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "July" : {'1':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '2':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '3':{'name':"Disney Week" , 'tagline':"“Where Dreams Come True.“" , 'keyword':'disney' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '4':{'name':"Harry Potter Week" , 'tagline':"“Draco Dormiens Nunquam Titillandus“" , 'keyword':'potter' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '5':{'name':"Harry Potter Week" , 'tagline':"“Draco Dormiens Nunquam Titillandus“" , 'keyword':'potter' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, + "July" : {'1':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '2':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '3':{'name':"Disney Week" , 'tagline':"“Where Dreams Come True.“" , 'keyword':'disney' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '4':{'name':"Harry Potter Week" , 'tagline':"“Draco Dormiens Nunquam Titillandus“" , 'keyword':'potter' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '5':{'name':"Harry Potter Week" , 'tagline':"“Draco Dormiens Nunquam Titillandus“" , 'keyword':'potter' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "August" : {'1':{'name':"Spiderman Week" , 'tagline':"“with great power comes great responsibility“" , 'keyword':'spider' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '2':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '3':{'name':"SpongeBob Week" , 'tagline':"“Three hours later“" , 'keyword':'sponge' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '4':{'name':"Power Rangers Week" , 'tagline':"“Everyone gets to be a Ranger!”" , 'keyword':'ranger' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '5':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, + "August" : {'1':{'name':"Spiderman Week" , 'tagline':"“with great power comes great responsibility“" , 'keyword':'spider' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '2':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '3':{'name':"SpongeBob Week" , 'tagline':"“Three hours later“" , 'keyword':'sponge' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '4':{'name':"Power Rangers Week" , 'tagline':"“Everyone gets to be a Ranger!”" , 'keyword':'ranger' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '5':{'name':'' , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "September" : {'1':{'name':"Star Trek Week" , 'tagline':"“To Boldly Go...“" , 'keyword':'startrek', 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/commons/thumb/8/8a/Star_Trek_TOS_logo.svg/2560px-Star_Trek_TOS_logo.svg.png'}, - '2':{'name':"Batman Week" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '3':{'name':"Hobbit Week" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '4':{'name':"Comic Book Week" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '5':{'name':"Comic Book Week" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, + "September" : {'1':{'name':"Star Trek Week" , 'tagline':"“To Boldly Go...“" , 'keyword':'startrek' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/commons/thumb/8/8a/Star_Trek_TOS_logo.svg/2560px-Star_Trek_TOS_logo.svg.png'}, + '2':{'name':"Batman Week" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '3':{'name':"Hobbit Week" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '4':{'name':"Comic Book Week" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '5':{'name':"Comic Book Week" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "October" : {'1':{'name':"Willy Wonka Week" , 'tagline':"“The Suspense Is Terrible. I Hope It’ll Last.”" , 'keyword':'wonka' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '2':{'name':"Back to the Future Week" , 'tagline':"“Great Scott!”" , 'keyword':'future' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '3':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '4':{'name':"Halloween Season" , 'tagline':"Spooky Suggestions" , 'keyword':'horror' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '5':{'name':"Halloween Season" , 'tagline':"Spooky Suggestions" , 'keyword':'horror' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, + "October" : {'1':{'name':"Willy Wonka Week" , 'tagline':"“The Suspense Is Terrible. I Hope It’ll Last.”" , 'keyword':'wonka' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '2':{'name':"Back to the Future Week" , 'tagline':"“Great Scott!”" , 'keyword':'future' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '3':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '4':{'name':"Halloween Season" , 'tagline':"Spooky Suggestions" , 'keyword':'horror' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '5':{'name':"Halloween Season" , 'tagline':"Spooky Suggestions" , 'keyword':'horror' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "November" : {'1':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '2':{'name':"Veterans Week" , 'tagline':"“Honoring all who served”" , 'keyword':'heros' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '3':{'name':"Doctor Who Week" , 'tagline':"“Run!”" , 'keyword':'who' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '4':{'name':"Thanksgiving Week" , 'tagline':'' , 'keyword':'turkey' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '5':{'name':"Marvel Week" , 'tagline':"“Excelsior!”" , 'keyword':'marvel' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, + "November" : {'1':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '2':{'name':"Veterans Week" , 'tagline':"“Honoring all who served”" , 'keyword':'heros' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '3':{'name':"Doctor Who Week" , 'tagline':"“Run!”" , 'keyword':'who' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '4':{'name':"Thanksgiving Week" , 'tagline':'' , 'keyword':'turkey' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '5':{'name':"Marvel Week" , 'tagline':"“Excelsior!”" , 'keyword':'marvel' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}}, - "December" : {'1':{'name':"Marvel Week" , 'tagline':"“Excelsior!”" , 'keyword':'marvel' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '2':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '3':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '4':{'name':"Holiday Season" , 'tagline':"“Tis the season“" , 'keyword':'xmas' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, - '5':{'name':"New Years Anthologies" , 'tagline':"“You're traveling through another dimension...“" , 'keyword':'newyear' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://cdn-icons-png.flaticon.com/512/3763/3763123.png'}}} + "December" : {'1':{'name':"Marvel Week" , 'tagline':"“Excelsior!”" , 'keyword':'marvel' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '2':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '3':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '4':{'name':"Holiday Season" , 'tagline':"“Tis the season“" , 'keyword':'xmas' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''}, + '5':{'name':"New Years Anthologies" , 'tagline':"“You're traveling through another dimension...“" , 'keyword':'newyear' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://cdn-icons-png.flaticon.com/512/3763/3763123.png'}}} class Seasonal: def __init__(self): diff --git a/plugin.video.pseudotv.live/resources/lib/seasons.py b/plugin.video.pseudotv.live/resources/lib/seasons.py index af9e4899..c53eec3c 100644 --- a/plugin.video.pseudotv.live/resources/lib/seasons.py +++ b/plugin.video.pseudotv.live/resources/lib/seasons.py @@ -17,19 +17,19 @@ # along with PseudoTV Live. If not, see . KEYWORDS = {"" :{}, - "hitch" :{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"tvshow", "operator":"contains","value":["Alfred Hitchcock"]}, - {"field":"plot", "operator":"contains","value":["Alfred Hitchcock"]}]}]}}], + "hitchcock":{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"tvshow" ,"operator":"contains","value":["Alfred Hitchcock"]}, + {"field":"plot" ,"operator":"contains","value":["Alfred Hitchcock"]}]}]}}], "movies" : [{"sort":{"method":"random", "order":"ascending"},"filter":{"and":[{"or" :[{"field":"director","operator":"contains","value":["Alfred Hitchcock"]}, - {"field":"writers", "operator":"contains","value":["Alfred Hitchcock"]}, - {"field":"plot", "operator":"contains","value":["Alfred Hitchcock"]}]}]}}]}, + {"field":"writers" ,"operator":"contains","value":["Alfred Hitchcock"]}, + {"field":"plot" ,"operator":"contains","value":["Alfred Hitchcock"]}]}]}}]}, - "patrick" :{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"tvshow", "operator":"contains","value":["It's Always Sunny"]}]}]}}, - {"sort":{"method":"random", "order":"ascending"},"filter":{"and":[{"or" :[{"field":"plot", "operator":"contains","value":["St. Patrick","Leprechaun","Irish","Luck","Lucky","Gold","Shamrock"]}]}]}}], - "movies" : [{"sort":{"method":"random", "order":"ascending"},"filter":{"and":[{"or" :[{"field":"plot", "operator":"contains","value":["St. Patrick","Leprechaun","Irish","Luck","Lucky","Gold","Shamrock"]}]}]}}]}, + "patrick" :{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"tvshow" ,"operator":"contains","value":["It's Always Sunny"]}]}]}}, + {"sort":{"method":"random" ,"order":"ascending"},"filter":{"and":[{"or" :[{"field":"plot" ,"operator":"contains","value":["St. Patrick","Leprechaun","Irish","Luck","Lucky","Gold","Shamrock"]}]}]}}], + "movies" : [{"sort":{"method":"random" ,"order":"ascending"},"filter":{"and":[{"or" :[{"field":"plot" ,"operator":"contains","value":["St. Patrick","Leprechaun","Irish","Luck","Lucky","Gold","Shamrock"]}]}]}}]}, "lotr" :{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"tvshow" ,"operator":"contains","value":["Tolkien","Hobbit","Lord of the Rings"]}, {"field":"plot" ,"operator":"contains","value":["Tolkien","Hobbit","Lord of the Rings"]}]}]}}], - "movies" : [{"sort":{"method":"year" ,"order":"ascending"} ,"filter":{"and":[{"or" :[{"field":"title" ,"operator":"contains","value":["Tolkien","Hobbit","Lord of the Rings"]}, + "movies" : [{"sort":{"method":"year" ,"order":"ascending"},"filter":{"and":[{"or" :[{"field":"title" ,"operator":"contains","value":["Tolkien","Hobbit","Lord of the Rings"]}, {"field":"plot" ,"operator":"contains","value":["Tolkien","Hobbit","Lord of the Rings"]}]}]}}]}, "quentin" :{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"director","operator":"contains","value":["Quentin Tarantino"]}, @@ -38,6 +38,33 @@ "movies" : [{"sort":{"method":"random" ,"order":"ascending"},"filter":{"and":[{"or" :[{"field":"director","operator":"contains","value":["Quentin Tarantino"]}, {"field":"writers" ,"operator":"contains","value":["Quentin Tarantino"]}, {"field":"plot" ,"operator":"contains","value":["Quentin Tarantino"]}]}]}}]}, + + "startrek" :{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"tvshow" ,"operator":"contains","value":["Star Trek"]}, + {"field":"plot" ,"operator":"contains","value":["Star Trek"]}]}]}}], + "movies" : [{"sort":{"method":"year" ,"order":"ascending"},"filter":{"and":[{"or" :[{"field":"title" ,"operator":"contains","value":["Star Trek"]}, + {"field":"plot" ,"operator":"contains","value":["Star Trek"]}]}]}}]}, + + "othello" :{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"tvshow" ,"operator":"contains","value":["William Shakespeare","Shakespeare"]}, + {"field":"writers" ,"operator":"contains","value":["William Shakespeare","Shakespeare"]}, + {"field":"plot" ,"operator":"contains","value":["William Shakespeare","Shakespeare"]}]}]}}], + "movies" : [{"sort":{"method":"random" ,"order":"ascending"},"filter":{"and":[{"or" :[{"field":"title" ,"operator":"contains","value":["William Shakespeare","Shakespeare"]}, + {"field":"writers" ,"operator":"contains","value":["William Shakespeare","Shakespeare"]}, + {"field":"plot" ,"operator":"contains","value":["William Shakespeare","Shakespeare"]}]}]}}]}, + + "super" :{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"tag" ,"operator":"contains","value":["Superhero","Marvel","DC"]}, + {"field":"studio" ,"operator":"contains","value":["Marvel","DC"]}, + {"field":"plot" ,"operator":"contains","value":["Superhero"]}]}]}}], + "movies" : [{"sort":{"method":"year" ,"order":"ascending"},"filter":{"and":[{"or" :[{"field":"tag" ,"operator":"contains","value":["Superhero","Marvel","DC"]}, + {"field":"studio" ,"operator":"contains","value":["Marvel","DC"]}, + {"field":"plot" ,"operator":"contains","value":["Superhero"]}]}]}}]}, + + "aliens" :{"movies" : [{"sort":{"method":"year" ,"order":"ascending"},"filter":{"and":[{"or" :[{"field":"title" ,"operator":"is" ,"value":["TED 2023","Prometheus","Alien: Covenant","Alien","Alien: Isolation","Alien: Out of the Shadows","Alien: Romulus","Aliens","Aliens: Colonial Marines","Fire and Stone","Alien3","Alien³","Aliens: Dark Descent","Aliens: Fireteam Elite","Aliens: Phalanx","Alien Resurrection"]}, + {"field":"title" ,"operator":"is" ,"value":["Predator","Predator 2","Predators","The Predator","Prey","Badlands","Alien vs. Predator","Aliens vs. Predator: Requiem"]}]}]}}]}, + + "starwars" :{"episodes": [{"sort":{"method":"episode","order":"ascending"},"filter":{"and":[{"or" :[{"field":"tvshow" ,"operator":"contains","value":["Star Wars"]}, + {"field":"plot" ,"operator":"contains","value":["Star Wars"]}]}]}}], + "movies" : [{"sort":{"method":"year" ,"order":"ascending"},"filter":{"and":[{"or" :[{"field":"title" ,"operator":"contains","value":["Star Wars"]}, + {"field":"plot" ,"operator":"contains","value":["Star Wars"]}]}]}}]}, } diff --git a/plugin.video.pseudotv.live/resources/lib/server.py b/plugin.video.pseudotv.live/resources/lib/server.py index e0fa2c55..8048ef26 100644 --- a/plugin.video.pseudotv.live/resources/lib/server.py +++ b/plugin.video.pseudotv.live/resources/lib/server.py @@ -100,9 +100,9 @@ def log(self, msg, level=xbmc.LOGDEBUG): def getSettings(self): return {'Resource_Logos' :SETTINGS.getSetting('Resource_Logos'), 'Resource_Ratings' :SETTINGS.getSetting('Resource_Ratings'), - 'Resource_Bumpers' :SETTINGS.getSetting('Resource_Bumpers'), - 'Resource_Commericals':SETTINGS.getSetting('Resource_Commericals'), - 'Resource_Trailers' :SETTINGS.getSetting('Resource_Trailers')} + 'Resource_Bumpers' :SETTINGS.getSetting('Resource_Bumpers'),} + # 'Resource_Commericals':SETTINGS.getSetting('Resource_Commericals'), + # 'Resource_Trailers' :SETTINGS.getSetting('Resource_Trailers')} def _start(self): diff --git a/plugin.video.pseudotv.live/resources/lib/service.py b/plugin.video.pseudotv.live/resources/lib/service.py index 1fb8fbb7..c7a401b0 100644 --- a/plugin.video.pseudotv.live/resources/lib/service.py +++ b/plugin.video.pseudotv.live/resources/lib/service.py @@ -147,7 +147,7 @@ def _onPlay(self): BUILTIN.executebuiltin('ReplaceWindow(fullscreenvideo)') sysInfo = self.getPlayerSysInfo() - sysInfo['runtime'] = ceil(self.getPlayerTime()) + sysInfo['runtime'] = self.getPlayerTime() PROPERTIES.setEXTProperty('%s.lastPlayed.sysInfo'%(ADDON_ID),dumpJSON(sysInfo)) if self.sysInfo.get('citem',{}).get('id') != self.sysInfo.get('citem',{}).get('id',random.random()): #playing new channel diff --git a/plugin.video.pseudotv.live/resources/lib/utilities.py b/plugin.video.pseudotv.live/resources/lib/utilities.py index 7765bff6..6601f267 100644 --- a/plugin.video.pseudotv.live/resources/lib/utilities.py +++ b/plugin.video.pseudotv.live/resources/lib/utilities.py @@ -52,7 +52,7 @@ def openFile(fle): openAddonSettings((7,1)) #todo generate qrcode to server file location. #todo change xmltv to display statistics not raw file. - try: DIALOG.textviewer(openFile(file), heading=('%s - %s')%(ADDON_NAME,os.path.basename(file)),usemono=True,usethread=False) + try: DIALOG.textviewer(openFile(file), heading=('%s - %s')%(ADDON_NAME,os.path.basename(file)),usemono=True) except Exception as e: self.log('showFile failed! %s'%(e), xbmc.LOGERROR) @@ -70,7 +70,7 @@ def showWelcome(self): xmltv=XMLTVFLEPATH, genre=GENREFLEPATH, logo=LOGO_LOC, - lang_30074=LANGUAGE(30074)), heading=(LANGUAGE(32043)%(ADDON_NAME,ADDON_VERSION)),usemono=True,usethread=False) + lang_30074=LANGUAGE(30074)), heading=(LANGUAGE(32043)%(ADDON_NAME,ADDON_VERSION)),usemono=True) except Exception as e: self.log('showWelcome failed! %s'%(e), xbmc.LOGERROR) @@ -88,7 +88,7 @@ def convertMD2TXT(md): fle = FileAccess.open(README_FLE, "r") txt = fle.read() fle.close() - try: DIALOG.textviewer(convertMD2TXT(txt), heading=(LANGUAGE(32043)%(ADDON_NAME,ADDON_VERSION)),usemono=True,usethread=False) + try: DIALOG.textviewer(convertMD2TXT(txt), heading=(LANGUAGE(32043)%(ADDON_NAME,ADDON_VERSION)),usemono=True) except Exception as e: self.log('showReadme failed! %s'%(e), xbmc.LOGERROR) @@ -111,7 +111,7 @@ def addColor(text): fle = FileAccess.open(CHANGELOG_FLE, "r") txt = fle.read() fle.close() - try: DIALOG.textviewer(addColor(txt), heading=(LANGUAGE(32045)%(ADDON_NAME,ADDON_VERSION)),usemono=True, autoclose=30, usethread=False) + try: DIALOG.textviewer(addColor(txt), heading=(LANGUAGE(32045)%(ADDON_NAME,ADDON_VERSION)),usemono=True, autoclose=30) except Exception as e: self.log('showChangelog failed! %s'%(e), xbmc.LOGERROR) diff --git a/plugin.video.pseudotv.live/resources/settings.xml b/plugin.video.pseudotv.live/resources/settings.xml index ab2b9274..0eeae796 100644 --- a/plugin.video.pseudotv.live/resources/settings.xml +++ b/plugin.video.pseudotv.live/resources/settings.xml @@ -756,7 +756,6 @@ 1 - @@ -774,7 +773,6 @@ 1 - @@ -891,11 +889,14 @@ true - + 2 - + 0 - kodi.resource.images + + + + @@ -904,17 +905,17 @@ - - 30070 - installed - true - + - + 2 - + 0 - kodi.resource.images + + + + + @@ -923,11 +924,7 @@ - - 30071 - installed - true - + diff --git a/repository.pseudotv/addon.xml b/repository.pseudotv/addon.xml index 75eed7d1..8d8471b8 100644 --- a/repository.pseudotv/addon.xml +++ b/repository.pseudotv/addon.xml @@ -1,16 +1,11 @@  - + https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/master/addons.xml https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/master/addons.xml.md5 https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/master/zips - - https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/matrix/addons.xml - https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/matrix/addons.xml.md5 - https://raw.githubusercontent.com/PseudoTV/PseudoTV_Live/matrix/zips - https://raw.githubusercontent.com/PseudoTV/PseudoTV_Resources/master/addons.xml https://raw.githubusercontent.com/PseudoTV/PseudoTV_Resources/master/addons.xml.md5 diff --git a/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.6c.zip b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.6c.zip new file mode 100644 index 00000000..b1a80595 Binary files /dev/null and b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.6c.zip differ diff --git a/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.6d.zip b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.6d.zip new file mode 100644 index 00000000..6b9ad214 Binary files /dev/null and b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.6d.zip differ diff --git a/zips/repository.pseudotv/repository.pseudotv-1.0.5.zip b/zips/repository.pseudotv/repository.pseudotv-1.0.5.zip new file mode 100644 index 00000000..5c0b5bf8 Binary files /dev/null and b/zips/repository.pseudotv/repository.pseudotv-1.0.5.zip differ