(2017-07-16, 23:44)primaeval Wrote: On the plus side if there is ever anything you would like adding just ask and I probably will give it a go.
muhahah *cracks knuckles*
I needed a break too but worked on a skin alot in my free time. I'll release it after i tweak a few things. I have all the (new) possible ids and features in it plus you can flip the description and epg listings by using a provided script.. Something i managed to do was convert it to 1080i using Skin XML Converter by Phil. I can do any skin now. I throw in a dummy addon.xml (like a skins) and a dummy fonts dir\xml and it tricks the program enough to be a code proof reader and 720p\1080p converter. I opted to stick to the main fonts common to estuary and confluence so it looks the same on most devices. I have no idea if there is a benefit to running in native 1080i unless you include large png files but it there for the future. Everything converts fine except the logos that are aligned too far to the left. I think its hardcoded in the gui.py.
Here's a few actual bug like things to consider...
-Line (i think) 3860 needs to be commented out in gui.py. It's an "f.close()" that has no f.open and screws up mapping.ini import.
-In addon.py you have an ffmpeg stat check right off the bat that has crippled a few installs if the exe is missing. I added a failsafe check in my fork where i first read the settings for the ffmpeg.exe and if it doesnt exist it resets the setting to null so the stat doesn't fail.
-The new "database addon icon" works, but has 3 flaws.
1. In Kodi 17 (that i tested) it adds a huge delay in refreshing the descriptions. If i move the mouse fast over 10 listings it will take 10 seconds to refresh each individual listing until it catches up with the mouse movement. I get the same problem occasionally when first opening the guide from time to time. Maybe adding a 500 ms delay before searching the database for the icon would speed it up? i dunno.
2. The "database addon icon" will display a set icon, but then if the following channel has no set addon it still displays the previous one. It was looking to hide it by looking for a null label string but it doesnt work. Seems to work in popup menu.
3. All streams without a reference to a plugin in the stream (ie: abc=html//urlstuff.com/abc.ts) show up as "Playlist" no matter where the source of the stream addon. This has also been in the popup menu id too.
Heres what my newest skin version is looking like. I added alot of scroll\fade animations with mousebars and menus and the menus will self adjust if a mousebar is open. To the guy a few posts up who thought my old one was boggling, you may want to stock up on prozak. I added everything i could use that i could also toggle\hide and keep a clean look. i also have the volume toggle\mute you want in a mousebar player tab in the top right above the videowindow. I am only using "steelblue" as a flat background with a slight clear-black.pn overlay with the tastbar\catbar using the settings colour, in my case firebrick red.
to flip the skin you just select it in the popup menu. Tabs also hide every 10 seconds until they all dissappear in case you are too lazy to reach for the remote.
the flip code isnt too invasive
Code:
skinPath = ''
# Ours - user set custom skin like script.tvguide.fullscreen.skin.cake to script.tvguide.fullscreen
if ADDON_CORE.getSetting('skin.source') == '2':
skin_folder = ADDON_CORE.getSetting('skin.folder')
skin_user = ADDON_CORE.getSetting('skin.user')
skinPath = xbmc.translatePath(os.path.join(skin_folder, 'resources' , 'skins', skin_user))
# Yours - inside user_data resources\skins\yourskinname
if ADDON_CORE.getSetting('skin.source') == '1':
skin_user = ADDON_CORE.getSetting('skin.user')
skinPath = xbmc.translatePath(os.path.join(basePath, 'resources' , 'skins', skin_user))
# Folder - A Built in skin
if ADDON_CORE.getSetting('skin.source') == '0':
skin_user = ADDON_CORE.getSetting('skin')
skinPath = xbmc.translatePath(os.path.join(addonPath, 'resources' , 'skins', skin_user))
#
if not os.path.exists(skinPath):
xbmcgui.Dialog().notification('Error', 'Skin Not Detected', ICON, 1000, False)
sys.exit(0)
flip1 = 'script-tvguide-menu.xml'
flip2 = 'script-tvguide-main.xml'
#dialog.ok(ADDONID_CORE, ADDONID, skinPath, skin_user) # For testing
flip1 = 'script-tvguide-menu.xml'
flip2 = 'script-tvguide-main.xml'
# script-tvguide-menu.xml
if mode == 10:
xbmcgui.Dialog().notification('Toggle', 'Flip Description', ICON, 1000, False)
skinflip_toggle(flip1, '720p')
skinflip_toggle(flip2, '720p')
skinflip_toggle(flip1, '1080i')
skinflip_toggle(flip2, '1080i')
reopen()
def skinflip_toggle(Clean_File, rezsize):
Clean_Name = xbmc.translatePath(os.path.join(skinPath, rezsize, Clean_File))
if not os.path.exists(Clean_Name): return
tmpFile = xbmc.translatePath(os.path.join(Zip_temp_path,'tmp.xml'))
if os.path.exists(tmpFile): os.remove(tmpFile)
xbmc.log(msg='##['+ADDONID+'] '+Clean_Name, level=xbmc.LOGNOTICE)
try: os.rename(Clean_Name, tmpFile)
except: pass
s=open(tmpFile).read()
# 720p main
if '<posy>240</posy><!--flip1-->' in s: s=s.replace('<posy>240</posy><!--flip1-->','<posy>30</posy><!--flip1-->')
else: s=s.replace('<posy>30</posy><!--flip1-->','<posy>240</posy><!--flip1-->')# extra 30 for timebar at top
# 720p menu
if '<posy>-240</posy><!--flip2-->' in s: s=s.replace('<posy>-240</posy><!--flip2-->','<posy>450</posy><!--flip2-->')
else: s=s.replace('<posy>450</posy><!--flip2-->','<posy>-240</posy><!--flip2-->')# extra 30 for timebar at top
#
# 1080p main
if '<posy>360</posy><!--flip1-->' in s: s=s.replace('<posy>360</posy><!--flip1-->','<posy>45</posy><!--flip1-->')
else: s=s.replace('<posy>45</posy><!--flip1-->','<posy>360</posy><!--flip1-->')
# 1080p menu
if '<posy>-360</posy><!--flip2-->' in s: s=s.replace('<posy>-360</posy><!--flip2-->','<posy>675</posy><!--flip2-->')
else: s=s.replace('<posy>675</posy><!--flip2-->','<posy>-360</posy><!--flip2-->')
#
f=open(Clean_Name,'a')
f.write(s)
f.close()
if os.path.exists(tmpFile): os.remove(tmpFile)
#reopen()
I also have a single .py where i added your ini player and ini searcher wich i adore. It's nice to have the addons.ini path already set and propagated and all common files auto set. I can add many little "nice things" by simply including an extra py module or 2 in my skin that i share if people don't mind the extra headaches. Theres a really nice ffmpeg gui that self downloads the files from the official site, a help popup menu, a database file maintenence frontened, etc. I have it where the custom skin buttons searche for for a single "addonid\resources\lib\skin.py" in the skin addons dir and then either runs the extra py module if found in the same dir or throws up a module missing error. Using the new VOD menu as a template i can also add addon widgets, etc. Most of the useful ones are for blacklisted things that would need a user input path in settings or an xml like favourites.xml to be parsed. Ive been having fun pushing my skin to the limits and am open to suggestions. Oh, and does sports fixtures have american baseball? its the only real active american one i would care about until September.