Help with program guide python code
#6
(2019-08-28, 23:43)bornagainpengui Wrote:
(2019-08-28, 21:00)soundman1611 Wrote:
(2019-08-28, 20:11)Lunatixz Wrote: epoch is only used for one particular chtype (8) which is live tv. The loop helps live TV's linear lineup stay in order. PseudoTV's modules are heavily interconnected and not well suited for dropping in channels and guide data. I would recommend you look into uEPG, its a basic EPG framework I wrote to help developers. Feel free to fork and contribute code to the project. https://forum.kodi.tv/showthread.php?tid=321231 

Thanks for the reply.  As it always happens, I figured it out.  Only happens after I get frustrated enough to go online and ask for help.  After I post the problem online, it comes to me.

In my last code paste the following line was jamming me up:
if curchannel == self.currentChannel-1:

So although I was sitting on channel 2 looking at the guide channel, the above code was registering that I was actually on channel 3, so it wasn't using the correct block of code to figure out which show was on.

To correct this I simply added a -1 to self.currentChannel, because one variable carries the channel index and the other carries the actual channel number.:
if curchannel == self.currentChannel-1:

Now I have an old school channel listings channel that stays updated all the time.  The way I set it up was when you tune to channel 3 the processing code updates the listings, shows the overlay over the bottom half of the screen and starts the animation timer to animate.  When turning to a different channel the overlay is hidden and the animation timer is cancelled to save performance.  I made the base video in After Effects which carries a bunch of movie trailers that are "on demand" (aka, just in my Kodi library).  

By the way I love this plugin, and it has been fun digging into the code and tearing it apart, has been a great learning experience for me since most of my background is more of VB.net, java and html.  I've customized this thing so much that I will probably just stick with it after the new version comes out.  Performance is great and after my fixes it literally never loses track of when and where a channel is.  

This aspect of my project is done and working.  Next I'm off to create a basic "weather channel", the very basic ones we had when it was just some basic graphics, some cheesy background music and the current forecast.

Here is a video of my old school guide channel, which is automatic and updates with all available channels:
https://www.youtube.com/watch?v=dt4hVcIr...e=youtu.be 
I don't understand any of the programming but I've got to post in the thread to say this is so cool! Thanks for sharing the video of it in action, hopefully we'll be able to use it or something like it once the main addon for PseudoTV Live is updated. I can't stop grinning, this is the kind of stuff I was hoping to eventually see when I first started using the addon back when it was TV Time... I love it! Smile 

When the new version comes out maybe Lunatixz will have a way for others to easily create integrations to work within PseudoTV.  What I have now is very much hacked, but I did do it in such a way as to not interfere with any of the plugin's operations or without being a performance hog.  Part of me feels like releasing a slightly different version of the plugin, giving the user the ability to customize such features.  I don't have a lot of time on my hands though, and most likely by the time I get anything done Lunatixz will have released his version leaving anything I do in the dust.
Reply


Messages In This Thread
RE: Help with program guide python code - by soundman1611 - 2019-08-29, 00:00
Logout Mark Read Team Forum Stats Members Help
Help with program guide python code1