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)



- zepfan - 2011-02-07

Jason102 Wrote:New release! Thanks to Sranshaft for the awesome new skin (not to mention coding and testing), Bridgman for the nice new icon, and zepfan for his constant testing of broken code.

Lol! Anytime. Thanks for not killing me over those long log files! Let me know on the next test, I'll be the Linux tester!


- pcvii - 2011-02-07

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


:) - carrot_top - 2011-02-07

This sounds like a great script!

Will this work with live streams?


- Jason102 - 2011-02-07

It will not work with live streams, that's a bit beyond the scope of the project. I may look into including some Internet streams as channels at some point, but it's not a priority.

@pcvii: Can you explain? When you pull up the EPG it shows something that isn't on? Or is this related to the new info window that pops up?


- tungmeister - 2011-02-07

Jason102 Wrote:It will not work with live streams, that's a bit beyond the scope of the project. I may look into including some Internet streams as channels at some point, but it's not a priority.

@pcvii: Can you explain? When you pull up the EPG it shows something that isn't on? Or is this related to the new info window that pops up?

Not sure if pcvii mean what you think he does but I had an issue last night of the info window still displaying the previous episodes information at least several minutes into the next program (didn't look again after that).


- ederson - 2011-02-07

I`ve just installed this and i`m loving it !!! Great addon

I don`t know is this exists and i`ve missed it but i think it would be helpfull if in the epg or the info dialog there was a watched flag.


- jtucker1972 - 2011-02-07

Jason, still having some issues with the mixed playlists. It is hanging trying to Update channel list. Here is the log.

<begin log>
09:12:00 T:2172 M:1791311872 DEBUG: script.PseudoTV-TVOverlay: findMaxChannels
09:12:00 T:2172 M:1791311872 DEBUG: script.PseudoTV-TVOverlay: findMaxChannels return 1
09:12:00 T:2172 M:1791311872 DEBUG: script.PseudoTV-TVOverlay: readConfig
09:12:00 T:2172 M:1791303680 DEBUG: script.PseudoTV-TVOverlay: Auto off is 10800
09:12:00 T:2172 M:1791303680 DEBUG: script.PseudoTV-TVOverlay: Force Reset is True
09:12:00 T:2172 M:1791303680 DEBUG: script.PseudoTV-TVOverlay: Show info label on channel change is True
09:12:00 T:2172 M:1791299584 INFO: Loading skin file: DialogProgress.xml
09:12:00 T:2172 M:1792274432 DEBUG: ------ Window Init (DialogProgress.xml) ------
09:12:00 T:2172 M:1792266240 DEBUG: script.PseudoTV-TVOverlay: makeChannelList 1
09:12:00 T:2172 M:1792266240 DEBUG: script.PseudoTV-TVOverlay: getSmartPlaylistType C:\Users\Administrator\AppData\Roaming\XBMC\userdata\playlists\video/Channel_1.xsp
09:12:00 T:2172 M:1792262144 DEBUG: script.PseudoTV-TVOverlay: getSmartPlaylistType return mixed
09:12:00 T:2172 M:1792262144 DEBUG: script.PseudoTV-TVOverlay: buildMixedFileList
<last entry for PseudoTV>


I have to Alt-F4 to close XBMC. Canceling the update doesn't work.

Here are the playlist xml I am using. I verified the episode and movie playlists return shows.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="mixed">
<name>Current TV Mixed</name>
<match>one</match>
<rule field="playlist" operator="is">get-current-episodes.xsp</rule>
<rule field="playlist" operator="is">get-current-movies.xsp</rule>
<limit>50</limit>
<order direction="ascending">random</order>
</smartplaylist>

get-current-episodes.xsp

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
<name>Current TV</name>
<match>all</match>
<rule field="airdate" operator="inthelast">2 weeks</rule>
<limit>50</limit>
<order direction="ascending">airdate</order>
</smartplaylist>

get-current-movies.xsp

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
<name>Current Movies</name>
<match>all</match>
<rule field="year" operator="greaterthan">2009</rule>
<rule field="videoresolution" operator="lessthan">720</rule>
<limit>25</limit>
<order direction="ascending">random</order>
</smartplaylist>

I'm going to continue to tinker around with it to see if I can figure out why it won't load. As you can, I am starting with a pretty simple mixed list to start.

*updated to remove spaces in filenames. Still doesn't load channel. *


- Jason102 - 2011-02-08

jtucker1972 and I have resolved the issue that he was having. I'm not releasing a fix at the moment because I hope the bug isn't prevalent enough to warrant it. If others are seeing the same thing, though (mixed playlists freeze the script), tell me and I'll make a new release.


- jtucker1972 - 2011-02-08

Jason102, I just sent you some revised code for the buildMixedFileList def. It used the minidom so there can be unlimited playlists as well as it reads the order by from the playlist. This will provide a lot more flexibility when creating these "mixed" playlists and allow for more control. I believe the original code was limited to reading in 3 playlists, but maybe that is just my Dharma Win 7 64 bit issue.


- TheOddLinguist - 2011-02-08

For future reference...if PseudoTV freezes like that, the log will usually have more information after you Alt-F4 (or Force Quit or whatever). Since it'll usually include more details on the method that actually caused the freeze, that may end up being helpful. (I've certainly run into that while testing things.) Just a friendly note...hehe


- jtucker1972 - 2011-02-08

the original code opens the file and reads through it line by line and determines which lines are rules and then parses out the playlist filenames.

the version I sent Jason uses minidom to read through the xml document which is the format the playlists are stored in. It's more efficient and allows for theoretically unlimited number of playlists since it iterates through each playlist node in the xml.

I also am able to get any other node in the playlist xml, e.g. order, limit, etc. Jason's initial version automatically randomized the mixed playlist which would prevent a user like @steppedup from having the control of the order different shows played in. My updated version reads in the <order> value in the mixed playlist and will randomize if the mixed playlist's order is set to random.

I hope I am not stepping on Jason's toes. I am very excited about the possibilities of this script.


- jtucker1972 - 2011-02-08

TheOddLinguist Wrote:For future reference...if PseudoTV freezes like that, the log will usually have more information after you Alt-F4 (or Force Quit or whatever). Since it'll usually include more details on the method that actually caused the freeze, that may end up being helpful. (I've certainly run into that while testing things.) Just a friendly note...hehe

The problem was it wasn't telling me anything. Never did. It would just stop after logging that it was reading the file. It was strange. Jason's updated code fixed the issue, but I was running into other limitations.


- jtucker1972 - 2011-02-08

steppedup Wrote:It would be awesome to mimic the rhythmic nature of movies that keep us interested.

Start off with some comedy, then a drama or dramatic movie, then some more comedy, then a drama.

Kind of an up and down, emotional wave sort of thing.

No idea if that can be done generally, but if so, would be very cool!


Here's a sample "PseudoTV mixed" playlist I have setup.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="mixed">
<name>make-movie-mix</name>
<match>one</match>
<rule field="playlist" operator="is">get-action-movie.xsp</rule>
<rule field="playlist" operator="is">get-comedy-movie.xsp</rule>
<rule field="playlist" operator="is">get-drama-movie.xsp</rule>
<rule field="playlist" operator="is">get-adventure-movie.xsp</rule>
<rule field="playlist" operator="is">get-crime-movie.xsp</rule>
</smartplaylist>

Each get playlist returns one (1) random movie from that genre. My version of the buildMixedFilelist loops through each playlist which returns the one movie. Each show is added to the playlist in the same order as they are listed in the mixed playlist so you have some control of the ordering. Since I am not passing the <order> information, no randomization is done.

Here is the random 5 movies the above grabbed.

Home Alone
Lilo and Stich
44 Inch Chest
Hellfighters
Moon

If I didn't want my Comedies to contain any animation, I could add a rule to the get-comedy-movie where it excluded animation genre. The possibilities are endless.


- ryan03rr - 2011-02-08

jtucker1972 Wrote:the original code opens the file and reads through it line by line and determines which lines are rules and then parses out the playlist filenames.

the version I sent Jason uses minidom to read through the xml document which is the format the playlists are stored in. It's more efficient and allows for theoretically unlimited number of playlists since it iterates through each playlist node in the xml.

I also am able to get any other node in the playlist xml, e.g. order, limit, etc. Jason's initial version automatically randomized the mixed playlist which would prevent a user like @steppedup from having the control of the order different shows played in. My updated version reads in the <order> value in the mixed playlist and will randomize if the mixed playlist's order is set to random.

I hope I am not stepping on Jason's toes. I am very excited about the possibilities of this script.

thanks man... wish i could contribute as much as you have to this little project.... my skills just are not there yet...! (oddlunguist/ jason too)


i dont see how this couldnt be incorporated into the next version of xbmc...... its sooo damn usefull.
web content plugins are cool and everything..... i just seems i keep just using this since its so pailless once setup!
it changed the way i use xbmc from..... only when i can think of "what to watch" to "background noise"
needless to say.... thanks!
SAT TV,s only use to me just got replaced!!!


- jtucker1972 - 2011-02-08

ryan03rr Wrote:thanks man... wish i could contribute as much as you have to this little project.... my skills just are not there yet...! (oddlunguist/ jason too)


i dont see how this couldnt be incorporated into the next version of xbmc...... its sooo damn usefull.
web content plugins are cool and everything..... i just seems i keep just using this since its so pailless once setup!
it changed the way i use xbmc from..... only when i can think of "what to watch" to "background noise"
needless to say.... thanks!
SAT TV,s only use to me just got replaced!!!

My piece of code was nothing. I am no programmer. It took me 5 hours to read up and code the small piece I did. python and xml, oh my! My brain still hurts.

For those interested in helping me test my upcoming PseudoTV Channel Kit let me know. The kit will be different from the packs as it will allow you to build your own channels based on a set of playlists. The packs will have preset channels already configured. I figured there would be those who would just want a general set of channels and those who will want to create their own.