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)



- User 55003 - 2011-09-15

Quote:PS: Does anybody know how to hide the "Video Position Scrubber" when flipping channels?


You are going to have to edit the relevant skins DialogSeekbar.xml.. Add " + !Window.IsVisible(script.pseudotv.TVOverlay.xml)" to the <visible> tags in question in the DialogSeekbar.xml..The seekbar should work as normal outside PseudoTV.


- Jason102 - 2011-09-15

Haha, I don't read the forum for a day and I get a dozen bug reports and feature requests. Ok, here we go:

I didn't know there was an issue with background updating on the initial setup. Can someone get me a detailed log of this? I'll try it out, but there may be some setup part that I'm missing.

marktuk: Yes, I did something stupid and broke my own ordering scheme. I did fix this last night, though, so get the newest version and you should be good. You say that you can't get the rules to work properly...what doesn't work?

dannycorker: Can you send me a debug log of this "crash" while it's processing the channel rule? If it's breaking here, presumably that's why background updating isn't working either.

Atarian: Can you clarify what your "media server" is? Are you saying that the machine running XBMC freezes? Or is this some networked NAS or server with samba shares or something?

CameronC: You say that scheduling isn't working. In what way? Are you sure you're using a new version of the stable-pre branch? With movie channels, the scheduling may not be able to start the movies at the exact time you specify. For example, if a movie is in the middle at 21:00, then your R-rated movies won't start until it is over, perhaps an hour later. Also (presuming we can get it working), I really like this use of scheduling.


As for all of the suggestions, many of them are very good and I'll put them in. Too busy now to address each individually, but keep an eye out for updates.


- Jason102 - 2011-09-15

Ok Keeper, an update to stable-pre primarily for you. There is now an option (enabled by default) to hide all videos that are shorter than 60 seconds. It also doesn't display the file extension in directory channels. Try it out, see if it does what you're looking for.


- Sranshaft - 2011-09-15

Quick update for ReFocus skin available here. It...is what it is. I don't really have a need for rules and whatnot - using the built in smartplaylist editor is plenty for me.

@Jason: The rules window is a pain in the ass to skin. The use of buttons really limits what I could do.

Where I ran into roadblocks:

- I would have loved a list control for Controls(150-164) so that I could have put both labels on the same line and still use the focustexture.

- Control 102 was another problem control. I think a spin control would have been a better fit for this instead of a button.

- Having to go back to Control(130) and click to exit the window is counter-intuitive. I tried adding a close button with a PreviousMenu action for the OnClick but that caused the window to hang for some reason.

- Days of the week (umtwhfs) doesn't seem to do anything. What exactly does 'umtwhfs' stand for? Should that be Sun - Mon - Tue - Wed - Thu - Fri - Sat? What am I supposed to enter in here to get it to work? This option is not user-friendly as there isn't any indication as to what is supposed to be supplied here. I've tried using the day name, the 3-letter abbreviation, the 1-letter abbreviation, nothing is saved.

Just a quick question: What is the reasoning behind having a separate rule and window for each available option? To me, it seems a single dialog with all available options would be easier to grasp.

Three options could easily be radio button / toggle controls; 'Force real-time mode', 'Don't play this channel' and 'Only played watched items'.

- There's no indication in the channel configuration dialog that a channel has advanced rules applied to it.

These are just some things I wondered about / ran into while skinning the dialog.


- marktuk - 2011-09-15

Jason102 Wrote:marktuk: Yes, I did something stupid and broke my own ordering scheme. I did fix this last night, though, so get the newest version and you should be good. You say that you can't get the rules to work properly...what doesn't work?

Jason, I can confirm a '"TV Show Channel" is now in order. My idea was then to use this channel with a "Best Guess Scheduling" rule to put 2 episodes of friends on my comedy chanel at around 18:00. However, I've set the rule and it doesn't seem to have worked. I've also created two "TV Show" channels and tried to interweave those in to another channel... also doesn't appear to have worked.

EDIT: Actually, interleaving seems to be working. Is there a way to have a channel as a blank canvas that only has other channels interleaved?


- Jason102 - 2011-09-15

Yea, the Rules window is a pain in the ass. It's a giant product of limitations to scripting in XBMC.

Quote:I would have loved a list control for Controls(150-164) so that I could have put both labels on the same line and still use the focustexture.

A list control for each individual set (150 and 160, 151 and 161, etc)? Can you give me an example of what that would look like?

Quote:Control 102 was another problem control. I think a spin control would have been a better fit for this instead of a button.

I completely agree...I'm not a big fan of my solution. XBMC doesn't give the script the ability to add content to a spin control, though...scripts have access to only a subset of the controls available to a skin. When a skin uses those controls, it's always XBMC C++ code that populates them.

Quote:Having to go back to Control(130) and click to exit the window

I'm not sure what you mean by this. You mean that you have to press escape to bring up the save dialog instead of having buttons? I didn't put in buttons to simplify both the look of the window as well as the coding required. The biggest issue was that I wanted to be able to have more than 4 options for a rule, meaning the rules had to scroll, and if I did that then it would seem weird to have to scroll through all of the rules or options to get to the buttons just to close the window.

Quote: Days of the week (umtwhfs) doesn't seem to do anything

They are meant to represent individual days. Sunday was a tough one since there isn't a single unique letter that is ever used to represent it, so I picked 'u'. If a user types any of those letters, or presses enter to bring up the keyboard and types those letters, they will populate the box. In terms of the scheduling rule, it means that a show will only be scheduled on those days of the week.

You're right, it's neither user friendly nor intuitive. I struggled with this since there isn't a simple control that would really do the trick, and I need people that only have access to a couple of keys (enter, escape, arrows) to be able to fill it in, meaning the on screen keyboard. If you have a suggestion, I'd love to have another opinion how to do it.

Quote:What is the reasoning behind having a separate rule and window for each available option?

Not sure what you mean.

Quote:Three options could easily be radio button / toggle controls

Certainly true. One of the big reasons to put in the rules was that, in order to add a new rule, I would just have to write the code. A user would be able to use it without any changes to any skins. Since there are several XBMC skins that include PseudoTV skins as well, I really have to avoid modifying existing files since I would be preventing existing users from using new features. This is the reason there is a new window for rules, so that an existing skin has to change only once. From there I can add rules all I want and don't have to worry about whether existing skins will work or not.

Another reason that these are rules and not just options is because if I start adding random options to each channel type, then it will get cluttered very quickly. One of the biggest complaints I have against TV Time is that it clutters the options and makes even a simple setup seem complicated. I didn't want to do that. Even the rules window itself was designed to allow for flexibility while not overwhelming the user with options all at once.


I'm certainly willing to work with you to improve this window, though...I'd love any suggestions, just know that this thing has a large set of restrictions in order for it to do what I need for it to do.


- Keeper - 2011-09-15

Jason102 Wrote:Ok Keeper, an update to stable-pre primarily for you. There is now an option (enabled by default) to hide all videos that are shorter than 60 seconds. It also doesn't display the file extension in directory channels. Try it out, see if it does what you're looking for.

This is awesome, THIS IS AWESOME !

Works perfectly with my interweaving of Channel ID's/Bumpers !!

It Works exactly how I wanted it, with ads/etc not even SHOWING in the EPG/Info/What's Next Popup


I'll send a few beers when I get my next paycheck Wink



Now I just gotta stop that seek bar from popping up - thanks for the info Steveb, i'll see what I can do Nod


- ghostelement - 2011-09-15

Not sure if this has been asked before, but is there any plans to incorporate actual show times for channels? Lets say I have episodes of a show that normally airs at 9pm on NBC. There should be an option to tell that show to air at that time on that channel when possible.

It would also be cool to have some sort of TGIF mode. Smile By this, I mean that you could create special programming blocks for certain times on certain days of the week. Then special shows would be aired instead of regular programming.


- Keeper - 2011-09-16

Steveb Wrote:You are going to have to edit the relevant skins DialogSeekbar.xml.. Add " + !Window.IsVisible(script.pseudotv.TVOverlay.xml)" to the <visible> tags in question in the DialogSeekbar.xml..The seekbar should work as normal outside PseudoTV.

YES! It worked!

is there any way to hide it when flipping channels, but show it when forwarding/rewinding? Rolleyes






Also, does anyone know how to "normalize" the audio between the different channels/videos ?


- Sranshaft - 2011-09-16

Keeper Wrote:YES! It worked!

is there any way to hide it when flipping channels, but show it when forwarding/rewinding? Rolleyes

No.

Keeper Wrote:Also, does anyone know how to "normalize" the audio between the different channels/videos ?

You're going to need to get a sound card that can do this or stereo equipment. XBMC doesn't have the capability to offer normalization or DRC. Failing that, you could send all of your video through VirtualDub or other video editing software to normalize it at a preset level.


- dannycorker - 2011-09-16

Jason102 Wrote:dannycorker: Can you send me a debug log of this "crash" while it's processing the channel rule? If it's breaking here, presumably that's why background updating isn't working either.

Here's the section of the log relevant to what happens, can send you the full copy if you wish as well.

Code:
21:12:07 T:6572 WARNING: XFILE::CVideoDatabaseDirectory::GetLabel - Unknown nodetype requested 12
00:10:12 T:6572 WARNING: Previous line repeats 1 times.
00:10:12 T:6572 WARNING: XFILE::CVideoDatabaseDirectory::GetLabel - Unknown nodetype requested 11
00:10:18 T:7292  NOTICE: -->Python Interpreter Initialized<--
00:10:21 T:7292   ERROR: C:\Users\Danny\AppData\Roaming\XBMC\addons\script.PseudoTV\resources\lib\Overlay.py:65: DeprecationWarning: object.__init__() takes no parameters
                                              xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
00:10:21 T:7292   ERROR: C:\Users\Danny\AppData\Roaming\XBMC\addons\script.PseudoTV\resources\lib\Overlay.py:40: DeprecationWarning: object.__init__() takes no parameters
                                              xbmc.Player.__init__(self, xbmc.PLAYER_CORE_AUTO)
00:10:21 T:6572 WARNING: Skin has invalid include: screenwidth
00:10:21 T:6572 WARNING: Previous line repeats 1 times.
00:10:21 T:6572   ERROR: Texture manager unable to load file: C:\Users\Danny\AppData\Roaming\XBMC\addons\skin.refocus\media\flags\networks\
00:10:23 T:7292   ERROR: Exception in python script callback execution
00:10:23 T:7292   ERROR: Traceback (most recent call last):
00:10:23 T:7292   ERROR:   File "C:\Users\Danny\AppData\Roaming\XBMC\addons\script.PseudoTV\resources\lib\Overlay.py", line 150, in onInit
00:10:23 T:7292   ERROR: if self.readConfig() == False:
00:10:23 T:7292   ERROR:   File "C:\Users\Danny\AppData\Roaming\XBMC\addons\script.PseudoTV\resources\lib\Overlay.py", line 241, in readConfig
00:10:23 T:7292   ERROR: self.channels = chn.setupList()
00:10:23 T:7292   ERROR:   File "C:\Users\Danny\AppData\Roaming\XBMC\addons\script.PseudoTV\resources\lib\ChannelList.py", line 105, in setupList
00:10:23 T:7292   ERROR: self.setupChannel(i + 1, False, makenewlists, False)
00:10:23 T:7292   ERROR:   File "C:\Users\Danny\AppData\Roaming\XBMC\addons\script.PseudoTV\resources\lib\ChannelList.py", line 351, in setupChannel
00:10:23 T:7292   ERROR: if self.makeChannelList(channel, chtype, chsetting1, chsetting2, append) == True:
00:10:23 T:7292   ERROR:   File "C:\Users\Danny\AppData\Roaming\XBMC\addons\script.PseudoTV\resources\lib\ChannelList.py", line 546, in makeChannelList
00:10:23 T:7292   ERROR: fileList = self.buildFileList(fle, channel)
00:10:23 T:7292   ERROR:   File "C:\Users\Danny\AppData\Roaming\XBMC\addons\script.PseudoTV\resources\lib\ChannelList.py", line 1012, in buildFileList
00:10:23 T:7292   ERROR: duration = re.search('"duration" *: *([0-9]*?),', f)
00:10:23 T:7292   ERROR:   File "C:\Program Files\XBMC\system\python\Lib\re.py", line 142, in search
00:10:23 T:7292   ERROR: return _compile(pattern, flags).search(string)
00:10:23 T:7292   ERROR: TypeError
00:10:23 T:7292   ERROR: :
00:10:23 T:7292   ERROR: expected string or buffer
00:12:19 T:6572  NOTICE: Storing total System Uptime
00:12:19 T:6572  NOTICE: Saving settings
00:12:19 T:6572  NOTICE: stop all
00:12:19 T:6572  NOTICE: ES: Stopping event server
00:12:19 T:6572  NOTICE: stopping upnp
00:12:19 T:8040  NOTICE: ES: UDP Event server stopped
00:12:19 T:6572  NOTICE: Webserver: Stopping...
00:12:19 T:6572  NOTICE: WebServer: Stopped the webserver
00:12:19 T:6572  NOTICE: Webserver: Stopped...
00:12:19 T:6572  NOTICE: stop sap announcement listener
00:12:20 T:6572  NOTICE: clean cached files!
00:12:20 T:6572  NOTICE: unload skin
00:12:20 T:6572   ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block C:\Users\Danny\AppData\Roaming\XBMC\addons\script.PseudoTV
00:12:20 T:6572   ERROR: Previous line repeats 3 times.
00:12:20 T:6572  NOTICE: stop python
00:12:20 T:6572  NOTICE: stopped
00:12:20 T:6572  NOTICE: destroy
00:12:20 T:6572  NOTICE: closing down remote control service
00:12:20 T:6572  NOTICE: unload sections
00:12:20 T:6572  NOTICE: destroy
00:12:20 T:6572 WARNING: Attempted to remove window 10013 from the window manager when it didn't exist
00:12:20 T:6572 WARNING: Attempted to remove window 10014 from the window manager when it didn't exist
00:12:20 T:6572 WARNING: Attempted to remove window 10015 from the window manager when it didn't exist
00:12:20 T:6572 WARNING: Attempted to remove window 10016 from the window manager when it didn't exist
00:12:20 T:6572 WARNING: Attempted to remove window 10017 from the window manager when it didn't exist
00:12:20 T:6572 WARNING: Attempted to remove window 10018 from the window manager when it didn't exist
00:12:20 T:6572 WARNING: Attempted to remove window 10019 from the window manager when it didn't exist
00:12:20 T:6572 WARNING: Attempted to remove window 10107 from the window manager when it didn't exist
00:12:20 T:6572 WARNING: Attempted to remove window 10115 from the window manager when it didn't exist
00:12:20 T:6572 WARNING: Attempted to remove window 10104 from the window manager when it didn't exist
00:12:20 T:6572  NOTICE: closing down remote control service
00:12:20 T:6572  NOTICE: unload sections
00:12:20 T:6572  NOTICE: application stopped...



- Jason102 - 2011-09-16

I fixed the problem, dannycorker. Fix is in stable-pre. Note that the "Only play watched items" rule doesn't work yet, but at least it won't crash on you now.


- User 55003 - 2011-09-16

Keeper Wrote:YES! It worked!

is there any way to hide it when flipping channels, but show it when forwarding/rewinding? Rolleyes

Yes, but you'll have to add the visible condition to all the relevant control/control groups instead of the whole window, except the FF/RW control group off course..
Hope that makes sense. Wink


- Keeper - 2011-09-16

Steveb Wrote:Yes, but you'll have to add the visible condition to all the relevant control/control groups instead of the whole window, except the FF/RW control group off course..
Hope that makes sense. Wink

Heh, I have no idea how to do that

I'll just keep it like it is Laugh


- Keeper - 2011-09-16

Sranshaft Wrote:Quick update for ReFocus skin available here.

Thank you
Now I don't have to switch to confluence every time I need to make a change to PseudoTV =)


edit: It broke my "Info Overlay" though.... I fixed it by copying 2 of the old files back (script.pseudoTV.EPG.xml & script.pseudoTV.TVOverlay.xml)