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)



- Jason102 - 2011-02-12

A couple of big changes in the stable-pre branch, if anyone wants to check it out. I just need to do some additional testing before I release it.

Changes:
Much faster channel creation speed.
If a channel doesn't have any items (no durations, or just no matches) then it will be skipped...the script will still run without it.
Also, if there is some issue with playing a channel while the script is running, that channel will be removed and the script will just move on to the next one.
Minor changes in the way files are read, to keep with the standard.
Put in jtucker1972's change involving parsing mixed playlists.

Try it out, report any bugs. If everything goes well, I'll do 1 or 2 more things and release this version. At this point the script is nearly ready to be put into the official repo, so report any bugs that you find!


- jtucker1972 - 2011-02-12

mwkurt Wrote:Could one of you guys possibly tell me what I am doing wrong? When I open a playlist that I created I do not see any times accumulating. I do this inside of XBMC. IS there something that I am missing? Could you please give me instructions on what you are doing to accomplish the time accumulation that you all see?

Thanks,
Mark

Couple things here.

1. It sometimes can take a minute or two for it to begin, so be patient.
2. If it still doesn't start calculating the duration, check the shows in the playlist for nfo files. In one case I had, I had nfo files for the shows which had <fileinfo> data but no <durationinseconds>. This resulting in XBMC giving it a 0 duration in streamdetails table and XBMC would not update it! I guess it only updates once if there is no record in streamdetails for the file.

To fix #2, I had to remove my source to clean up the database to remove the incorrect streamdetails information. I then made sure to delete any nfo files in the source I was adding. I then re-added the source location and rescanned. Once completed, I opened the playlist and watched XBMC recalcuate the durations successfully.


- jtucker1972 - 2011-02-12

Jason102 Wrote:A couple of big changes in the stable-pre branch, if anyone wants to check it out. I just need to do some additional testing before I release it.

Changes:
Much faster channel creation speed.
If a channel doesn't have any items (no durations, or just no matches) then it will be skipped...the script will still run without it.
Also, if there is some issue with playing a channel while the script is running, that channel will be removed and the script will just move on to the next one.
Minor changes in the way files are read, to keep with the standard.
Put in jtucker1972's change involving parsing mixed playlists.

Try it out, report any bugs. If everything goes well, I'll do 1 or 2 more things and release this version. At this point the script is nearly ready to be put into the official repo, so report any bugs that you find!

I'll download and start testing for you.


- zepfan - 2011-02-12

Jason102 Wrote:A couple of big changes in the stable-pre branch, if anyone wants to check it out. I just need to do some additional testing before I release it.

Changes:
Much faster channel creation speed.
If a channel doesn't have any items (no durations, or just no matches) then it will be skipped...the script will still run without it.
Also, if there is some issue with playing a channel while the script is running, that channel will be removed and the script will just move on to the next one.
Minor changes in the way files are read, to keep with the standard.
Put in jtucker1972's change involving parsing mixed playlists.

Try it out, report any bugs. If everything goes well, I'll do 1 or 2 more things and release this version. At this point the script is nearly ready to be put into the official repo, so report any bugs that you find!

I'm on it! Let's hope we have less issues than last time!


- jtucker1972 - 2011-02-12

@Jason102, whenever you rebuild the channel list, there needs to be a routine to remove the previous .m3u files. Currently, the script doesn't. So, in my test, my last channel was set to an empty playlist. However, the EMG just pulled my previous channel_x.m3u for that channel #. This was due to that channel_x.m3u still being in the cache. I would think this would be a small fix to add a function to delete the cache before creating the new channel .m3u's.

Load time's are much faster. About 1 sec per channel from my initial limited testing.


- jtucker1972 - 2011-02-12

@Jason102, still have issue with using & in the Channel Name. This will require < & > characters to be escaped in the python code.

Whenever the script does hang for this reason, pressing the Cancel button doesn't exit the script. It just hangs.

On the positive:
Channel seeking is working great!
Remembering which channel you last were watching is working great!

Keep up the great work!


- zepfan - 2011-02-12

Most things are working fine. I had another famous freeze that i seem to be having with this script. I'm going through the log, so i'll see if i can figure it out.
Code:
ERROR: ClearBlock: Trying to clear non existent block /home/peter/.xbmc/addons/script.PseudoTV
Anyone see this before?


- Jason102 - 2011-02-12

@zepfan: Under what condition is this freezing? Channel creation? Bringing up the EPG?

@jtucker1972: What channel name are you using? I tried the very simple "A&B", which worked without an issue. Also, can you give me steps to reproduce the "improperly using the cache file" issue?


- zepfan - 2011-02-12

Jason102 Wrote:@zepfan: Under what condition is this freezing? Channel creation? Bringing up the EPG?

@jtucker1972: What channel name are you using? I tried the very simple "A&B", which worked without an issue. Also, can you give me steps to reproduce the "improperly using the cache file" issue?

Changing channels. After about the third channel loaded from the epg it freezes. I've been through the log, and can't find anything. I'll do a debug log again and see.


- jtucker1972 - 2011-02-12

Jason102 Wrote:@zepfan: Under what condition is this freezing? Channel creation? Bringing up the EPG?

@jtucker1972: What channel name are you using? I tried the very simple "A&B", which worked without an issue. Also, can you give me steps to reproduce the "improperly using the cache file" issue?

"Action & Adventure TV" is the channel name that is causing it to freeze.

To reproduce the cache issue, do the following.

Create Channel_1 with playlist which returns results
Create Channel_2 with playlist which does not return results, e.g. movies with year > 2011.
Load the new channels and see if Channel 2 gets populated from the previous Channel_2.m3u instead of there just being Channel 1 returned.


- jtucker1972 - 2011-02-12

zepfan Wrote:Changing channels. After about the third channel loaded from the epg it freezes. I've been through the log, and can't find anything. I'll do a debug log again and see.

You may want to post your log so we can look at it. More eyes may spot something or help us reproduce the issue.


- Jason102 - 2011-02-12

@jtucker1972: I still cannot reproduce the "&" issue. Can you please post a debug log?

I've fixed (I think) the using an old cached file issue and updated the repository. If you get a chance, can you verify the fix?


- zepfan - 2011-02-12

I can't seem to get it to do it again, so it might have been a fluke.
Jason, I do have a request. Is there any way to make the font of tv show names and episode names bigger? I can't always read them from across the room. If you can tell me where i can do that, I'll start tweaking them myself to my liking. I'm mainly thinking of the info screen not the epg.


- jtucker1972 - 2011-02-12

Jason102 Wrote:@jtucker1972: I still cannot reproduce the "&" issue. Can you please post a debug log?

I've fixed (I think) the using an old cached file issue and updated the repository. If you get a chance, can you verify the fix?

The old cache issue is fixed now.

The other issue has to do with xml and my minidom code. It's a limitation. & is a special character in xml, so if I have "Action & Adventure" in the XML the dom code will break. However, if I have "Action &amp; Adventure" the channel will load, but the Channel Name in the EPG will literally be "Action &amp; Adventure" instead of "Action & Adventure". Not sure how to get around this limitation with the minidom which is the only xml parser available in the version bundled with XBMC.

If we could do a replace("&amp;","&") on the channel name prior to it being shown in the EPG then that would kind of work around it.


- jtucker1972 - 2011-02-12

zepfan Wrote:I can't seem to get it to do it again, so it might have been a fluke.
Jason, I do have a request. Is there any way to make the font of tv show names and episode names bigger? I can't always read them from across the room. If you can tell me where i can do that, I'll start tweaking them myself to my liking. I'm mainly thinking of the info screen not the epg.

Maybe this could be configurable via the settings?