Kodi Community Forum

Full Version: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2017-07-16, 21:04)Blackbear199 Wrote: [ -> ]i'm using kjb85's skin and have a problem.

when viewing the epg guide if i use down arrow to navigate when its gets to the bottom of the visible epg data it will load the next page.
when i do the same thing with up arrow it stops at the 1st visible row and doesnt load the previous page.

up/down page keys work as expected.

its this is how its setup or is there a code error?

You've gone Up to the Categories Bar.
You can control that with:
Settings \ Appearance \ Up To Categories Bar

If you chose No you will have to map up a key in "Lab 1 \ Action Editor" or "Kodi\Keymap Editor" to get to the Categories Bar,
or use the one in the Menu,
or use m to open the popup Categories Bar.

[EDIT] Or you can use Page Up/ Page Down to scroll the epg pages.
once again thank you.
no matter how many times i read the posts here there always something i miss.
there are so many options and settings combinations one gets confused how one thing affects another.

still waiting for a remote to get here to dive into the mapping part.

this reminds me of webgrab,the authors of it thought of just about every scenario one could run into grabbing epg data,looks like your doing the same thing but for viewing it.
kewl stuff just alot to take in unless one has been using it from the beginning and kept up with all the changes/additions.
(2017-07-16, 23:36)Blackbear199 Wrote: [ -> ]once again thank you.
no matter how many times i read the posts here there always something i miss.
there are so many options and settings combinations one gets confused how one thing affects another.

still waiting for a remote to get here to dive into the mapping part.

this reminds me of webgrab,the authors of it thought of just about every scenario one could run into grabbing epg data,looks like your doing the same thing but for viewing it.
kewl stuff just alot to take in unless one has been using it from the beginning and kept up with all the changes/additions.

I should really add everything to the wiki on Github but it is too daunting a task.
There is a ton of stuff that I've added due to requests. I can't remember why half the settings were added in the first place.
It takes a while to follow the code to remember.

I try to mark all the new additions with the red exclamation mark icon which might help narrow it down.
I also try to include the changelog so you can search for the text of a Setting and maybe get a bit of help from the surrounding posts.

On the plus side if there is ever anything you would like adding just ask and I probably will give it a go.
Just don't ask to tidy up the code and write the wiki. Wink
(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* Smile

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.
Image

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. Smile
Image

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.
@myname Thanks for that. If you could email me your version I'll see what I can add in.

The Sports Fixtures addon has died and been partially resurected. getyourfixtures.com folded so I'm using BBC Sports so far. It has no channel information.

There are some hardcoded values for the skin in gui.py and utils.py that really should depend on the skin. If you or I get a chance to fix that I'll add it in.

The default Playlist addon name could do with some variations. What do you suggest as the original addon is lost by the time the url is read?

I'll have to see the ffmpeg code. I'm not sure what you mean by it's settings if it is just a binary exe that hasn't been installed anywhere.

I don't understand what you mean by the database addon icon. Maybe it is too early in the morning for me.
version 0.0.352
- multiple Catchup Addons in Lab1 \ Manage Catchup Urls
- Catchup Addon dialog via Lab1 \ Ask to Catchup
- removed ffmpeg chmod
- only download tvgf backgrounds

I've changed the new Catchup handling code in Lab1 to allow multiple Catchup Urls.
There is also an "Ask To Catchup" variable that will select when to pop up a dialog for Play or Catchup.
If anyone works out some urls for legal addons or pvr backends please post them here.
You should at least be able to trigger the Search urls in some addons with the Program Title and perhaps Season and Episode.
There will probably be some overlap between this and the Meta* Catchup and iSearch buttons.

@myname. I commented out the ffmpeg chmod code in addon.py.
It was useful to me on Android but if you are that advanced to install ffmpeg on Android you can probably work out how to chmod it.
(2017-07-16, 10:40)primaeval Wrote: [ -> ]version 0.0.351
- Settings \ Appearance \ Show Addon Logo in EPG above Program Image
- use controls 44025 and 44026 for addon logo and name in main xml file
- Settings \ Lab1 \ Catchup url
- Catchup Command Action and Button
- eg plugin://plugin.video.XXX/catchup/%I/%Y-%m-%d:%H-%M/%T/%D
- Catchup Addon button is hidden in Default skin and has id 4017
- Settings \ Playback \ Use Alternative Streams as a Fallback Only

@JQZ* Here is your addon logo for the main epg xml file. It is in Default and Catbar as examples.
Settings \ Appearance \ Show Addon Logo in EPG above Program Image
Use controls 44025 and 44026 for addon logo and name in main xml file.

@JQZ* and @RayW1986 Here is a way to just use the Alternative Streams as Fallback Only.
Settings \ Playback \ Use Alternative Streams as a Fallback Only
If you enable that and
Settings \ Playback \ Try Other Alternative Streams if Play Fails
you won't get the initial Choose Alternative Stream dialog but it will try the next Alternative Stream if the first one fails.
It should do the same as your strm solution.
Thanks for implementing this linked addon logo primaeval. It was quick and simple to add to my main.xml, and again is a very useful feature. I had to chuckle at Blackbear199's comment about the webgrab authors adding every scenario one could run into, and your reply on how daunting a task it's become to add info on all your updates to the wiki on Github. Hammering out the code and seeing its results, esp in a masterpiece like yours can be so rewarding. But like Herr Mozart, writing it all out for others to understand can certainly be a pita. Smile

And your new option 'Use Alternative Streams as Fallback Only' together with 'Try Other Alternative Streams if Play Fails' does indeed work well for having an alternate addon channel link stream when the main addon's channel fails. Seems I saw something in your code where you're using that option with the the new catchup functions. I'm a bit foggy on that. If I can get my head wrapped around it I'd like try getting catchup programs linked.
(2017-07-17, 05:41)myname Wrote: [ -> ]To the guy a few posts up who thought my old one was boggling, you may want to stock up on prozak.
Rofl Hahaha... I'm struggling to just wrap my head around 80% of your post Laugh
(2017-07-17, 09:56)primaeval Wrote: [ -> ]@myname Thanks for that. If you could email me your version I'll see what I can add in.
.....
I don't understand what you mean by the database addon icon. Maybe it is too early in the morning for me.
I think he's referring to the currently linked addon channel logo/name you added for me.

EDIT: Yes... I see what myname means. While scrolling up or down through the EPG, channels that have no addons linked will display the logo for the last channel that was scrolled by. Apparently it's also causing delays for him in refreshing the program descriptions.

His issue of, "streams without a reference to a plugin in the stream (ie: abc=html//urlstuff.com/abc.ts) show up as "Playlist"" is something I'm grappling to try to understand. Without additional metadata in those channel stream links, there are a few functions of the guide that don't work as intended. I'll have to jot them down as I see them and try to figure out solutions.
Hi Misters,

I asked myself if there is a detailed guide for TV Guide Addon which explains every setting and every option .?
The Autor implemented a lot of functions and settings into this addon. Someone wrote a full userguide for this ?
Big Grin
I doubt anyone would want to spend their spare time writing a full user guide for this addon, or any other addon. For this it would be quite extensive & would be of no benefit to whoever spent days writing it Smile There are some links in the OP or you could search the thread for answers, but that's about as good as you'll get.
(2017-07-18, 08:15)JQZ* Wrote: [ -> ]
(2017-07-17, 09:56)primaeval Wrote: [ -> ]@myname Thanks for that. If you could email me your version I'll see what I can add in.
.....
I don't understand what you mean by the database addon icon. Maybe it is too early in the morning for me.
I think he's referring to the currently linked addon channel logo/name you added for me.

EDIT: Yes... I see what myname means. While scrolling up or down through the EPG, channels that have no addons linked will display the logo for the last channel that was scrolled by. Apparently it's also causing delays for him in refreshing the program descriptions.

His issue of, "streams without a reference to a plugin in the stream (ie: abc=html//urlstuff.com/abc.ts) show up as "Playlist"" is something I'm grappling to try to understand. Without additional metadata in those channel stream links, there are a few functions of the guide that don't work as intended. I'll have to jot them down as I see them and try to figure out solutions.

Thanks for that I see what @myname means too. Good explanation.

I think I have fixed it in 0.0.354. Finding the addon for the channel involves an expensive database call so I've wrapped in up in an asynchronous thread. Scrolling should be smooth again.

[EDIT] I've used "url" instead of "Playlist" for non-plugin sources. I'm open to options is that sucks too.

I've added a couple of pages to the wiki at Github.
I'll see if I can at least add the posts that I have added an exclamation mark here so the information is easier to find.
Don't hold your breath for an easy to follow user guide that your grandmother can use though.
https://github.com/primaeval/script.tvgu...creen/wiki
(2017-07-18, 23:03)primaeval Wrote: [ -> ]I think I have fixed it in 0.0.354. Finding the addon for the channel involves an expensive database call so I've wrapped in up in an asynchronous thread. Scrolling should be smooth again.

It does seem like scrolling is better in the 0.0.354 update. But I'm afraid the new option to show the currently linked addon logo is freezing Kodi if you're aggressive about scrolling and hit the PgUp or PgDn keys after the guide loads. This happens with your default skin set on my Windows 7 desktop PC with the 0.0.354 update as well as my Windows 10 notebook that's still on 0.0.351.

Quote:I've added a couple of pages to the wiki at Github.
I'll see if I can at least add the posts that I have added an exclamation mark here so the information is easier to find.
Don't hold your breath for an easy to follow user guide that your grandmother can use though.
https://github.com/primaeval/script.tvgu...creen/wiki

Rofl And perhaps the average Kodi EPG user. Wink

I've started to make a text file with all the TVGFS settings based on your settings.xml to have a quick reference I can browse through quickly. I ran a few recorded notepad++ macros on it, but have only gotten through about 1/5th the way, doing most work manually. Another reminder of just how powerful this guide is.
(2017-07-19, 12:45)JQZ* Wrote: [ -> ]
(2017-07-18, 23:03)primaeval Wrote: [ -> ]I think I have fixed it in 0.0.354. Finding the addon for the channel involves an expensive database call so I've wrapped in up in an asynchronous thread. Scrolling should be smooth again.

It does seem like scrolling is better in the 0.0.354 update. But I'm afraid the new option to show the currently linked addon logo is freezing Kodi if you're aggressive about scrolling and hit the PgUp or PgDn keys after the guide loads. This happens with your default skin set on my Windows 7 desktop PC with the 0.0.354 update as well as my Windows 10 notebook that's still on 0.0.351.

Quote:I've added a couple of pages to the wiki at Github.
I'll see if I can at least add the posts that I have added an exclamation mark here so the information is easier to find.
Don't hold your breath for an easy to follow user guide that your grandmother can use though.
https://github.com/primaeval/script.tvgu...creen/wiki

Rofl And perhaps the average Kodi EPG user. Wink

I've started to make a text file with all the TVGFS settings based on your settings.xml to have a quick reference I can browse through quickly. I ran a few recorded notepad++ macros on it, but have only gotten through about 1/5th the way, doing most work manually. Another reminder of just how powerful this guide is.

Try 0.0.355. I've added a delay to the threads so that it should only do the database lookup if the channel id is still the same after 50ms.
From my tests it worked ok while I held pagedown for a while but I haven't got many channels mapped up.
The 50ms delay might need a tweak.

If you want to donate your notes to the wiki or add any content that would be helpful.
I'm sure quite a few people would be grateful for some extra help.
i dont know python but is the delay setting in the gui.py file?
if so is it the xbmc.sleep(50)?
i been messing with it as i know its a delay for something but not sure if its for the database lookup.