Kodi Community Forum
[RELEASE] PseudoTV Addon: Virtual EPG and TV Channel Surfing Script - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+----- Forum: PseudoTV / PseudoTV Live (https://forum.kodi.tv/forumdisplay.php?fid=231)
+----- Thread: [RELEASE] PseudoTV Addon: Virtual EPG and TV Channel Surfing Script (/showthread.php?tid=90738)



- jtucker1972 - 2011-02-14

TheOddLinguist Wrote:@Jason102: Just updated my local copy to stable-pre...and wanted to say the updates are fantastic. The preset channels are the feature that put this one over the top. Well done, to you and all involved.

I hope to find some time this week to fix up by fork branch and update the pull request. Hopefully I'll have something for you soon; we'll see. By any chance, did you get a chance to look at any of the code? Perhaps see somewhere I should start?

@TheOddLinguist, it seems me and you are both hitting Jason with enhancement ideas. I've been thinking through the playlists and how to offer the best flexibility and ease of setup to the user. Below are some screenshots of how I would try to tackle this building upon the work Jason has done with the current preset channels.

Here's how it would work. There would be tabs for Preset TV, Preset Movies, Preset Mixed, Custom 1-25, Custom 26-50, could add Custom 51-75 and Custom 76-100.

Image

Preset TV would have toggle box by each TV genre so the user could turn on or off a preset channel. There would also be preset channels by decade the user could turn on or off. These would be linked to preset files like Jason has, but instead of just filling in a missing channel, it would have some logic to copy the selected channel to the appropriate channel_x value.

Image

Preset Movies would work the same way, but be preset playlists which only have movies in them.

Image

Preset Mixed would have channels which combined episodes and movies in the same channel. This one is a little trickier since it requires playlists within playlist to get the mix we want, maybe 10 episodes followed by 2 movies, et.al.

Image

The Custom channels would allow the user to select the playlist file they want to use for the channel. So a user could download my Channel Kit or Channel Pack to a folder anywhere on their computer and just select it. This would be easier IMO than telling the user to figure how to find the hidden AppData folder on Windows, etc. Thinking about very novice users here who don't want to get into the guts of where XBMC stores things.

Image

I also would like to create a custom xml parser to work around the existing playlist functionality so we can get episodes by content rating and studio/network and movies by studio. I find the current smart playlist editor limiting. I would be willing to try and help out with the development.

Just my thoughts and suggestions.


- Jason102 - 2011-02-14

I don't have time at the moment to look at all your proposed feature, jtucker1972, I'll check it out later. I did upload a relatively untested change to stable-pre to fix the issue you saw.


- jtucker1972 - 2011-02-14

Jason102 Wrote:I don't have time at the moment to look at all your proposed feature, jtucker1972, I'll check it out later. I did upload a relatively untested change to stable-pre to fix the issue you saw.

Latest version fixed the issue. Thanks.

No rush on the proposed feature. I know you want to get this version out the door. I'm going to work on some proof of concept ideas around a PseudoTV Channel Creator add-on which would support the concept I am thinking about for "pseudotv" playlists. I'll let you know if I make any progress. If so, then maybe we can discuss how to potentially incorporate. Best way to learn is to try and build it.


- mwkurt - 2011-02-15

Hello,

I wanted to get your opinions of the little test I just performed regarding the durationinseconds, and creating a playlist to allow XBMC to retrieve them to populate the database. I am now a little anal with regards to this.

I am using Windows 7 with the MySql database.

I have, this past weekend, reset my contents to none and had XBMC rescrape all of the shows without any premade nfo files. I am awaiting until I am finished with my tests to export the individual nfo files.

I created a playlist with the following rule:
All episodes created after 1900

This in theory, gets me all of my episodes. It may have as it returned 28,584 items. I have 5 2TB drives, so it could be correct. At any rate, I opened up this playlist last night and let it go until a couple hours ago. It has been open for close to 24 hours. I watched it for a while when I got home today and did not see the duration increasing, so I shut it down.

I then created another playlist to list the episodes on one or two shows at a time. I tried this a number of times. When I opened the playlist, it was as if there was no duration to start with as the duration immediately started increasing until it stopped. Now this happened more often than not.
I figured maybe because it was a new playlist, the durations would need to be created, but here is the weird part.
When I opened my first playlist, all episodes after 1900, the duration that before was not increasing, had actually increased about the amount of the individual episode playlist. So whatever amount the individual episode playlist added up to, was added to my first playlist, thus increasing the total duration.
Now what does this mean? I don't really know. But it may appear as if creating one playlist to get the duration from all shows may not actually be working.
Can anyone else confirm this or am I not seeing things correctly?

Thanks,
Mark


- jtucker1972 - 2011-02-15

mwkurt Wrote:Hello,

I wanted to get your opinions of the little test I just performed regarding the durationinseconds, and creating a playlist to allow XBMC to retrieve them to populate the database. I am now a little anal with regards to this.

I am using Windows 7 with the MySql database.

I have, this past weekend, reset my contents to none and had XBMC rescrape all of the shows without any premade nfo files. I am awaiting until I am finished with my tests to export the individual nfo files.

I created a playlist with the following rule:
All episodes created after 1900

This in theory, gets me all of my episodes. It may have as it returned 28,584 items. I have 5 2TB drives, so it could be correct. At any rate, I opened up this playlist last night and let it go until a couple hours ago. It has been open for close to 24 hours. I watched it for a while when I got home today and did not see the duration increasing, so I shut it down.

I then created another playlist to list the episodes on one or two shows at a time. I tried this a number of times. When I opened the playlist, it was as if there was no duration to start with as the duration immediately started increasing until it stopped. Now this happened more often than not.
I figured maybe because it was a new playlist, the durations would need to be created, but here is the weird part.
When I opened my first playlist, all episodes after 1900, the duration that before was not increasing, had actually increased about the amount of the individual episode playlist. So whatever amount the individual episode playlist added up to, was added to my first playlist, thus increasing the total duration.
Now what does this mean? I don't really know. But it may appear as if creating one playlist to get the duration from all shows may not actually be working.
Can anyone else confirm this or am I not seeing things correctly?

Thanks,
Mark

If you want to see what is happening, turn on debug mode before you begin to scan in your collection without nfo's. Then create your playlist and open it to begin the file scrape for duration. Let it run. Then open xbmc.log and examine. It will be quite large, but you can see if XBMC is stopping after a certain time, if it chokes on a file read, or whatever else.

The playlist workaround isn't the most robust solution but it is the best method we have right now. Sranshaft was working on a media manager which would comply with the XBMC standard and perform the file scraping for duration. It's a big undertaking to test everything and with having jobs too, it may take him some time to complete.


- Jason102 - 2011-02-15

@tungmeister: Weird, you're having the same problem that zepfan had, the duration field isn't being returned. I really need to figure out how to get durations from video files without XBMC knowing them. Did you change anything about your database? Did you reset it or anything? Does the actual release work properly?


- zepfan - 2011-02-15

Jason102 Wrote:@tungmeister: Weird, you're having the same problem that zepfan had, the duration field isn't being returned. I really need to figure out how to get durations from video files without XBMC knowing them. Did you change anything about your database? Did you reset it or anything? Does the actual release work properly?

I went back to release Darhma from pre-Eden. So things will change in the future, it was just causing too many problems for now.
That is, if tungmeister is using pre-eden.

EDIT: Reread last page, doh. I also deleted everything from my .xbmc folder (linux) and started from scratch. Some setting somewhere must get broken.


- zepfan - 2011-02-15

Jason, another(!) quick question, where are the key files located? I'd like to change mine from the OK key to the guide button. Can you tell me which file I'd change?


- Jason102 - 2011-02-15

Hmm, easier said than done. The select key serves different purposes depending on the situation. Key definitions are in resources/lib/Globals.py and the reaction to the button press is in the onAction function in resources/lib/Overlay.py.


- zepfan - 2011-02-15

Jason102 Wrote:Hmm, easier said than done. The select key serves different purposes depending on the situation. Key definitions are in resources/lib/Globals.py and the reaction to the button press is in the onAction function in resources/lib/Overlay.py.

Ok. No worries, just a wish. I'm just as happy with it as the OK button. I love this script more and more each day!


- pcvii - 2011-02-15

pcvii Wrote:I noticed the time is off for some shows i'll be like your watching this and your actually watching something else.

What i mean is the list will say i'm watching one movie but it's playing another movie. Sad


- Sranshaft - 2011-02-15

Griffith86 Wrote:I actually meant to add in "or option" after add in a way but yeah I agree it could look messy if you have internet downloaded tv shows.

I've been able to add an option to display the channel logo as a bug like you've requested and it looks pretty good actually. Jason would have to add this sort of thing in to the official branch but it only took half an hour to get everything working properly so he might be persuaded if he has time and everyone asks him nicely. Laugh

@Jason: I just added an extra image control into the PseudoTV.overlay.xml (id="103") and added a setImage call during the setShowInfo method.

Here's a link if anyone wants to test it out: http://dl.dropbox.com/u/3687220/script.PseudoTV%20%28Channel%20bug%20test%29.zip

I had some ideas on expanding the EPG but I'll wait until things a little more quiet. I know you have your hands full with this duration business and working preset channels into the mix. Basically I think it would be cool to have different views for the EPG (All channel time line, Single channel time line, etc). I'll do some mock ups and send them your way for you're consideration.


- mwkurt - 2011-02-15

Sranshaft Wrote:I've been able to add an option to display the channel logo as a bug like you've requested and it looks pretty good actually. Jason would have to add this sort of thing in to the official branch but it only took half an hour to get everything working properly so he might be persuaded if he has time and everyone asks him nicely. Laugh


<RANT ON>To each his own I guess, but you know, I really find this sad. There was a day, back when we had 3 channels and maybe a couple fuzzy uhf channels, the networks did not put a bug on the programs. One of the reasons for my wanting to use this and an HTPC in general, is to get away from the intrusive lengths the networks are now going through to annoy us viewers. And now I guess some of us have gotten so used to the annoying bugs, that we miss them and want them even when we could not have them. Like I said, to each his own. But please, please make this a selectable option or better yet, make two versions of PseudoTV, one with bugs and one without. There will be no bugs for me! </RANT OFF>

Mark


- mwkurt - 2011-02-15

jtucker1972 Wrote:If you want to see what is happening, turn on debug mode before you begin to scan in your collection without nfo's. Then create your playlist and open it to begin the file scrape for duration. Let it run. Then open xbmc.log and examine. It will be quite large, but you can see if XBMC is stopping after a certain time, if it chokes on a file read, or whatever else.

The playlist workaround isn't the most robust solution but it is the best method we have right now. Sranshaft was working on a media manager which would comply with the XBMC standard and perform the file scraping for duration. It's a big undertaking to test everything and with having jobs too, it may take him some time to complete.

Okay...I have set debug mode to on and can see that it is still getting the stream details. Do you know if there will be some sort of indication in my log file when XBMC completes the probing of my video files. Will there be something to let me know when it is finished?

Thanks,
Mark


- Jason102 - 2011-02-15

@pcvii: Hmm, I haven't seen this bug in a little while. Are you using the release or stable-pre version? Is it always a certain channel that has this problem, or is it all channels? Just to clarify, when you pull up the EPG it will sometime show the currently playing program as something other than what's on? Or is this the info window that you can pop up is wrong (there is a known bug with this)?

@Sranshaft: Ha, since you already did all of the work, I'm fine with putting it in. For mwkurt's sake I'll just default the option to off.