Skip to content

Commit

Permalink
v.0.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunatixz committed Jan 1, 2025
1 parent 52a9551 commit 0067c5c
Show file tree
Hide file tree
Showing 41 changed files with 935 additions and 540 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [$default-branch]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
name: ...
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# ...
- name: Commit Doxygen updates
run: |
git config user.name github-actions
git config user.email [email protected]
git diff-index --quiet HEAD || git commit -am "Automated Doxygen updates"
git push
2 changes: 1 addition & 1 deletion addons.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addons>
<addon id="plugin.video.pseudotv.live" version="0.5.6u" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.7" name="PseudoTV Live" provider-name="Lunatixz">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="pvr.iptvsimple" version="21.8.0"/>
Expand Down
2 changes: 1 addition & 1 deletion addons.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
97ea119df203d8f2cc322f16f3d13394
7d74f54baabc603f206762035ab12e62
1 change: 0 additions & 1 deletion language_report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ Language IDS not found in py files, possibly only in xml: {
"30168": "Visit Project Wiki",
"30169": "OSD Display Time",
"30172": "Channel List",
"30179": "Interleave set value",
"30189": "Last Position",
"32004": "TV Networks",
"32005": "TV Shows",
Expand Down
2 changes: 1 addition & 1 deletion plugin.video.pseudotv.live/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.video.pseudotv.live" version="0.5.6u" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.7" name="PseudoTV Live" provider-name="Lunatixz">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="pvr.iptvsimple" version="21.8.0"/>
Expand Down
3 changes: 3 additions & 0 deletions plugin.video.pseudotv.live/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
v.0.5.7
-Improved stability by removing Kodi's segfault prone busy dialog, in-favor of a custom busy dialog.
-Improved "ONNext" options now include Artwork or Text based prompts.
-Improved Background Overlay.
-Fixed Channel Manager path duplication.
-Improved file migration when changing centralized file location.
-Changed Even show distributions global default value to 0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ msgid "Select Diffuse Color"
msgstr ""

msgctxt "#30045"
msgid "Show On Next"
msgid "Show OnNext"
msgstr ""

msgctxt "#30046"
Expand Down Expand Up @@ -789,6 +789,30 @@ msgctxt "#30191"
msgid "Error posting snapshot."
msgstr ""

msgctxt "#30192"
msgid "Interleave Paths"
msgstr ""

msgctxt "#30193"
msgid "Text"
msgstr ""

msgctxt "#30194"
msgid "Artwork"
msgstr ""

msgctxt "#30195"
msgid "UpNext"
msgstr ""

msgctxt "#30196"
msgid "Select OnNext Mode"
msgstr ""

msgctxt "#30197"
msgid "OSD"
msgstr ""


# Skin - strings 31000 thru 31999 reserved for skins

Expand Down Expand Up @@ -1212,7 +1236,7 @@ msgid "Edit Path"
msgstr ""

msgctxt "#32104"
msgid "[B]You're Watching:[/B] %s"
msgid "[B]You're Watching:[/B]"
msgstr ""

msgctxt "#32105"
Expand Down Expand Up @@ -1260,7 +1284,7 @@ msgid "Running as a client."
msgstr ""

msgctxt "#32116"
msgid "[B]Next:[/B] %s"
msgid "[B]Next:[/B]"
msgstr ""

msgctxt "#32117"
Expand Down Expand Up @@ -1428,7 +1452,7 @@ msgid "Changes Detected!"
msgstr ""

msgctxt "#32158"
msgid "[COLOR=yellow][B]Discovering...[/B][/COLOR]"
msgid "[COLOR=yellow][B]Listening...[/B][/COLOR]"
msgstr ""

msgctxt "#32159"
Expand Down Expand Up @@ -1707,6 +1731,23 @@ msgctxt "#32229"
msgid "On Next Position"
msgstr ""

msgctxt "#32230"
msgid "Pause Channel"
msgstr ""

msgctxt "#32231"
msgid "Enable Pause"
msgstr ""

msgctxt "#32232"
msgid "Limits & Sort Methods"
msgstr ""

msgctxt "#32233"
msgid "Minimum Duration"
msgstr ""



# Help - strings 33000 thru 33999 reserved for common strings used in add-ons

Expand Down Expand Up @@ -1807,7 +1848,7 @@ msgid "Select Color to apply [#FFFFFFFF Default]"
msgstr ""

msgctxt "#33045"
msgid "Display On Next information towards the end of programme.\nIf Playlist Playback & Up-Next service installed; support meta is provided."
msgid "Display OnNext information towards the end of program.\nUp-Next requires service install. [0 Disabled, 1 Default]"
msgstr ""

msgctxt "#33046"
Expand Down Expand Up @@ -1951,7 +1992,7 @@ msgid "Create dynamic path"
msgstr ""

msgctxt "#33121"
msgid "Group Autotuned channel TV shows in blocks. [0 Disabled, 0 Default] (Pagination size influences grouping).\nChanges will propagate slowly over time and may not be instantaneous."
msgid "Group channel TV shows in blocks. [0 Disabled, 0 Default] (Pagination size influences grouping).\nChanges will propagate slowly over time and may not be instantaneous."
msgstr ""

msgctxt "#33125"
Expand Down Expand Up @@ -2102,14 +2143,6 @@ msgctxt "#33202"
msgid "Minimum Debugging Level [LOGERROR - Default]\nIf submit is [COLOR=dimgray][B]dim[/B][/COLOR] no debugging information logged, change to [B]LOGDEBUG[/B] and reproduce error."
msgstr ""

msgctxt "#33230"
msgid "Force TV in Episode order, Movies in Year order\nBased on available content provided by your channel configuration."
msgstr ""

msgctxt "#33231"
msgid "Random sort & shuffle channel content."
msgstr ""

msgctxt "#33214"
msgid "Default Sort Method for all channels, overridden per channel by SmartPlaylist, DynamicPlaylist and Adv. Channel rules."
msgstr ""
Expand All @@ -2118,10 +2151,26 @@ msgctxt "#33215"
msgid "Interleave individual paths in sets of x *see wiki for details [0 Disabled, 1 Default]"
msgstr ""

msgctxt "#33228"
msgid "Pause Channel when not viewing (Experimental)"
msgstr ""

msgctxt "#33229"
msgid "Change the onscreen On Next position. [Auto Default]"
msgstr ""

msgctxt "#33230"
msgid "Force TV in Episode order, Movies in Year order\nBased on available content provided by your channel configuration and supersedes SmartPlaylist rules"
msgstr ""

msgctxt "#33231"
msgid "Random sort & shuffle channel content\nSupersedes SmartPlaylist rules"
msgstr ""

msgctxt "#33232"
msgid "Change content limits and sorting methods."
msgstr ""

msgctxt "#33308"
msgid "Install Log Uploader."
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion plugin.video.pseudotv.live/resources/lib/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def backupChannels(self, file: str=CHANNELFLE_BACKUP) -> bool:
if not DIALOG.yesnoDialog('%s\n%s?'%(LANGUAGE(32108),SETTINGS.getSetting('Backup_Channels'))):
return False

with BUILTIN.busy_dialog():
with BUILTIN.busy_dialog(), PROPERTIES.interruptActivity():
if FileAccess.copy(CHANNELFLEPATH,file):
if file == CHANNELFLE_BACKUP: #main backup file, set meta.
PROPERTIES.setBackup(True)
Expand Down
28 changes: 14 additions & 14 deletions plugin.video.pseudotv.live/resources/lib/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, service=None):

#global rules
self.accurateDuration = bool(SETTINGS.getSettingInt('Duration_Type'))
self.enableEvenDistro = bool(SETTINGS.getSettingInt('Enable_Even'))
self.enableEven = bool(SETTINGS.getSettingInt('Enable_Even'))
self.interleaveValue = SETTINGS.getSettingInt('Interleave_Value')
self.incStrms = SETTINGS.getSettingBool('Enable_Strms')
self.inc3D = SETTINGS.getSettingBool('Enable_3D')
Expand Down Expand Up @@ -90,20 +90,20 @@ def log(self, msg, level=xbmc.LOGDEBUG):

def verify(self, channels=None):
if channels is None: channels = Channels().getChannels()

for idx, citem in enumerate(channels):
if not citem.get('name') or not citem.get('id') or len(citem.get('path',[])) == 0:
self.log('verify, [%s] SKIPPING - missing necessary channel meta\n%s'%(citem.get('id'),citem))
continue
else:
citem['name'] = validString(citem['name']) #todo temp. correct existing file names; drop by v.0.6
citem['logo'] = self.resources.getLogo(citem['name'],citem['type'],logo=Seasonal().getHoliday().get('logo') if citem['name'] == LANGUAGE(32002) else None)

self.log('verify, [%s] VERIFIED - channel %s: %s'%(citem['id'],citem['number'],citem['name']))
yield self.runActions(RULES_ACTION_CHANNEL_CITEM, citem, citem, inherited=self)
citem['name'] = validString(citem['name']) #todo temp. correct existing file names; drop by v.0.6
citem['logo'] = self.resources.getLogo(citem['name'],citem['type'],logo=Seasonal().getHoliday().get('logo') if citem['name'] == LANGUAGE(32002) else None)
self.log('verify, [%s] VERIFIED - channel %s: %s'%(citem['id'],citem['number'],citem['name']))
yield self.runActions(RULES_ACTION_CHANNEL_CITEM, citem, citem, inherited=self)


def build(self, channels: list=[]):
def __hasGuideData(citem):
return dict(self.xmltv.hasProgrammes([citem])).get(citem['id'],False)

def __hasProgrammes(cacheResponse):
if isinstance(cacheResponse,list):
if len(cacheResponse) > 0: return True
Expand All @@ -114,16 +114,15 @@ def __hasProgrammes(cacheResponse):
if not channels:
self.log('build, no verified channels found!')
return False, False

channels = self.sortChannels(self.verify(channels))

now = getUTCstamp()
start = roundTimeDown(getUTCstamp(),offset=60)#offset time to start bottom of the hour
stopTimes = dict(self.xmltv.loadStopTimes(fallback=datetime.datetime.fromtimestamp(start).strftime(DTFORMAT)))
self.pDialog = DIALOG.progressBGDialog()
self.completeBuild = True

updated = set()
for idx, citem in enumerate(channels):
for idx, citem in enumerate(self.sortChannels(self.verify(channels))):
citem = self.runActions(RULES_ACTION_CHANNEL_TEMP_CITEM, citem, citem, inherited=self)
self.log('build, id = %s, rules = %s'%(citem['id'],citem.get('rules',{})))
if self.service._interrupt():
Expand Down Expand Up @@ -154,7 +153,7 @@ def __hasProgrammes(cacheResponse):
chanErrors = ' | '.join(list(sorted(set(self.pErrors))))
self.log('build, [%s] In-Valid Channel (%s) %s'%(citem['id'],self.pName,chanErrors))
self.pDialog = DIALOG.progressBGDialog(self.pCount, self.pDialog, message='%s: %s'%(self.pName,chanErrors),header='%s, %s'%(ADDON_NAME,'%s %s'%(LANGUAGE(32027),LANGUAGE(32023))))
self.delChannelStation(citem)
if not __hasGuideData(citem): self.delChannelStation(citem) #only remove m3u references when no valid programmes found.
self.runActions(RULES_ACTION_CHANNEL_STOP, citem, inherited=self)

self.pDialog = DIALOG.progressBGDialog(100, self.pDialog, message='%s %s'%(self.pMSG,LANGUAGE(32025) if self.completeBuild else LANGUAGE(32135)))
Expand Down Expand Up @@ -257,7 +256,7 @@ def _injectFillers(citem, fileList, enable=False):

def _injectRules(citem):
def __chkEvenDistro(citem):
if self.enableEvenDistro and not citem.get('rules',{}).get("1000"):
if self.enableEven and not citem.get('rules',{}).get("1000"):
nrules = {"1000":{"values":{"0":SETTINGS.getSettingInt('Enable_Even'),"1":SETTINGS.getSettingInt('Page_Limit'),"2":SETTINGS.getSettingBool('Enable_Even_Force')}}}
self.log("buildChannel: _injectRules, __chkEvenDistro [%s], new rules = %s"%(citem['id'],nrules))
citem.setdefault('rules',{}).update(nrules)
Expand Down Expand Up @@ -329,6 +328,7 @@ def buildList(self, citem: dict, path: str, media: str='video', page: int=SETTIN
self.log("buildList, [%s] media = %s, path = %s\npage = %s, sort = %s, query = %s, limits = %s\ndirItem = %s"%(citem['id'],media,path,page,sort,query,limits,dirItem))
dirList, fileList, seasoneplist, trailersdict = [], [], [], {}
items, nlimits, errors = self.jsonRPC.requestList(citem, path, media, page, sort, limits, query)

if self.service._interrupt():
self.jsonRPC.autoPagination(citem['id'], '|'.join([path,dumpJSON(query)]), limits) #rollback pagination limits
return [], []
Expand Down Expand Up @@ -451,7 +451,7 @@ def buildList(self, citem: dict, path: str, media: str='video', page: int=SETTIN
self.pErrors.append(LANGUAGE(32032))
self.log("buildList, [%s] IDX = %s skipping content no duration meta found! file = %s"%(citem['id'],idx,file),xbmc.LOGINFO)

if sort.get("method","") == 'episode':
if sort.get("method","").startswith('episode'):
self.log("buildList, [%s] sorting by episode"%(citem['id']))
seasoneplist.sort(key=lambda seep: seep[1])
seasoneplist.sort(key=lambda seep: seep[0])
Expand Down
9 changes: 6 additions & 3 deletions plugin.video.pseudotv.live/resources/lib/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,18 @@
#images
LOGO = os.path.join(MEDIA_LOC,'wlogo.png')
COLOR_LOGO = os.path.join(MEDIA_LOC,'logo.png')
COLOR_FANART = os.path.join(MEDIA_LOC,'fanart.jpg')
HOST_LOGO = 'http://github.com/PseudoTV/PseudoTV_Live/blob/master/plugin.video.pseudotv.live/resources/skins/default/media/logo.png?raw=true'
DUMMY_ICON = 'https://dummyimage.com/512x512/%s/%s.png&text={text}'%(COLOR_BACKGROUND,COLOR_TEXT)
MST3K_1 = os.path.join(MEDIA_LOC,'overlays','MST3K_1.gif')
MST3K_2 = os.path.join(MEDIA_LOC,'overlays','MST3K_2.gif')

#skins
RESTART_XML = '%s.restart.xml'%(ADDON_ID)
BACKGROUND_XML = '%s.background.xml'%(ADDON_ID)
MANAGER_XML = '%s.manager.xml'%(ADDON_ID)
BUSY_XML = '%s.busy.xml'%(ADDON_ID)
ONNEXT_XML = '%s.onnext.xml'%(ADDON_ID)
RESTART_XML = '%s.restart.xml'%(ADDON_ID)
BACKGROUND_XML = '%s.background.xml'%(ADDON_ID)
MANAGER_XML = '%s.manager.xml'%(ADDON_ID)
OVERLAYTOOL_XML = '%s.overlaytool.xml'%(ADDON_ID)

# https://github.com/xbmc/xbmc/blob/master/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h
Expand Down
2 changes: 0 additions & 2 deletions plugin.video.pseudotv.live/resources/lib/data/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

# You should have received a copy of the GNU General Public License
# along with PseudoTV Live. If not, see <http://www.gnu.org/licenses/>.
# https://github.com/xbmc/xbmc/blob/master/xbmc/input/actions/ActionIDs.h
# https://github.com/xbmc/xbmc/blob/master/xbmc/input/Key.h

# -*- coding: utf-8 -*-
from globals import *
Expand Down
26 changes: 26 additions & 0 deletions plugin.video.pseudotv.live/resources/lib/data/program.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2024 Lunatixz


# This file is part of PseudoTV Live.

# PseudoTV Live is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# PseudoTV Live is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with PseudoTV Live. If not, see <http://www.gnu.org/licenses/>.

# -*- coding: utf-8 -*-
from globals import *

class Program():
def __init__(self):
...

#todo convert json to dataclasses https://dataclass-wizard.readthedocs.io/en/latest/
Loading

0 comments on commit 0067c5c

Please sign in to comment.