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)



Where is channel config stored - Abe Froman - 2011-07-21

Can the channel configuration be edited manually rather than doing it from within Pseudo?


- zepfan - 2011-07-21

Abe Froman Wrote:Can the channel configuration be edited manually rather than doing it from within Pseudo?

If you setup the chananels manually to begin with. For example, Channel_1.xsp, Channel_2.xsp, in Playlists/Video.


- Abe Froman - 2011-07-21

zepfan Wrote:If you setup the chananels manually to begin with. For example, Channel_1.xsp, Channel_2.xsp, in Playlists/Video.

Sure I did that way back, but now I want to rename them all with something descriptive and change the numbering, looking to do that within text editor rather than gui.

edit: found what i want in settings2.xml


- zepfan - 2011-07-21

You can just open them with your text editor. If you want to change the order its the Chanel_ID. Just make sure you don't skip a number


- ModusPwnd - 2011-07-21

Im sorry if this has been mentioned, I searched but couldnt find...


Is there a way to have pseudoTV start and run automatically when XBMC starts?


- User 55003 - 2011-07-22

ModusPwnd Wrote:Im sorry if this has been mentioned, I searched but couldnt find...


Is there a way to have pseudoTV start and run automatically when XBMC starts?

Dharma: You could create a autoexec.py file and place it in your (profile) userdata folder..

Code:
#execute targeted script at startup.
import xbmc
xbmc.executescript('special://home/addons/script.pseudotv/default.py')



- bobbobbob - 2011-07-22

Thanks massively for this! Primary reason I use XBMC. Huge kudos.

I would absolutely love a way to modify the frequency of shows on a particular channel. It would help prevent shows with vast numbers of episodes from absolutely slaughtering shorter-running series. A simple modifier value would be useful - something like '0.2' to reduce the frequency of a show by 80%, etc. I understand that that may be difficult if you rely on XMBC's playlist functionality.

Another minor suggestion is to add an option which would play the episodes of a series in order, whilst still selecting series randomly. Again, this may be complicated if you use XMBC's playlists. If this is the case, in the longer term it may be advisable to write a custom playlist parser allowing such additional functionality.

I also sometimes get the plugin skipping randomly forward after finishing an episode, skipping the next several scheduled shows. Is this a known bug?

Lastly, just out of curiosity, how do you plan to handle scheduling shows? Will it cut off the currently playing video when the time to start the scheduled show comes around?


- oneadvent - 2011-07-23

Can someone explain how to change the skin for this plugin?

Thanks!


- mwkurt - 2011-07-23

bobbobbob Wrote:Thanks massively for this! Primary reason I use XBMC. Huge kudos.

I would absolutely love a way to modify the frequency of shows on a particular channel. It would help prevent shows with vast numbers of episodes from absolutely slaughtering shorter-running series. A simple modifier value would be useful - something like '0.2' to reduce the frequency of a show by 80%, etc. I understand that that may be difficult if you rely on XBMC's playlist functionality.

Another minor suggestion is to add an option which would play the episodes of a series in order, whilst still selecting series randomly. Again, this may be complicated if you use XBMC's playlists. If this is the case, in the longer term it may be advisable to write a custom playlist parser allowing such additional functionality.

These both can be done now. It will take some 'splainin, so hold on....
for this "modify the frequency of shows on a particular channel", here is what you can do.
You need to create a playlist for each show, a show playlist, as follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
<name>TVShow_Taxi</name>
<match>all</match>
<rule field="tvshow" operator="is">Taxi</rule>
<rule field="lastplayed" operator="notinthelast">400 days</rule>
<limit>1</limit>
<order direction="ascending">airdate</order>
</smartplaylist>

Hopefully, it is self explanatory. This is for the show "Taxi"
there are 2 operators: tvshow and lastplayed. Lastplayed is not necessary, I use it to keep shows from repeating for, in my case, 400 days.
The important part is the "limit" tag. The airdate says to play the episodes in aired order. This could just as easily be set to "random".

Now lets say you have 5 shows that you want to put in a channel.

Create another playlist, a channel playlist, that includes each "show playlist" you want included in the channel as follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="mixed">
<name>1970's Comedy TV</name>
<match>one</match>
<rule field="playlist" operator="is">TVShow_Happy Days.xsp</rule>
<rule field="playlist" operator="is">TVShow_MASH.xsp</rule>
<rule field="playlist" operator="is">TVShow_Taxi.xsp</rule>
<rule field="playlist" operator="is">TVShow_The Odd Couple.xsp</rule>
<rule field="playlist" operator="is">TVShow_WKRP in Cincinnati.xsp</rule>
<order direction="ascending">random</order>
</smartplaylist>

If you had created these five playlists as I did the first one above, with a limit of 1, it would take the first episode not aired in the last 400 days from each of these playlists, to create the PsuedoTV playlist. This means that you would have a channel with 5 episodes from 5 different shows.
From here you can do one of two things to get more tv show episodes. Either copy and paste the shows that you want to see more in your channel, ie:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="mixed">
<name>1970's Comedy TV</name>
<match>one</match>
<rule field="playlist" operator="is">TVShow_Happy Days.xsp</rule>
<rule field="playlist" operator="is">TVShow_MASH.xsp</rule>
<rule field="playlist" operator="is">TVShow_Taxi.xsp</rule>
<rule field="playlist" operator="is">TVShow_The Odd Couple.xsp</rule>
<rule field="playlist" operator="is">TVShow_WKRP in Cincinnati.xsp</rule>
<rule field="playlist" operator="is">TVShow_Happy Days.xsp</rule>
<rule field="playlist" operator="is">TVShow_MASH.xsp</rule>
<rule field="playlist" operator="is">TVShow_Happy Days.xsp</rule>
<rule field="playlist" operator="is">TVShow_MASH.xsp</rule>
<order direction="ascending">random</order>
</smartplaylist>

This will give you 3 episodes of Happy Days, 3 episodes of MASH and 1 episode each of Taxi, The Odd Couple and WKRP in random order. If you wanted them in the above order as listed, then remove the "order direction" tag.
Another option would be to change the "limit" tag of each of the "show playlist" from 1 to whatever number of episodes you wish to have in each channel. If you wanted the above number of each episodes you would change the "limit" tag in your "Happy Days" playlist to 3 from 1 as you would do for your MASH playlist.

The above explanation should also answer your second question.
Create each show playlist with this tag as follows:
<order direction="ascending">airdate</order> or
<order direction="ascending">episode</order>

Then put all of your show playlist into you channel playlist with the following tag:
<order direction="ascending">random</order>

"random" will list your show episodes in aired order randomly.
If you omit this tag the episodes will be in aired order in the order that each show is listed in your channel playlist.

Clear as mud...right?

Hope this helps,
Mark


- zepfan - 2011-07-23

oneadvent Wrote:Can someone explain how to change the skin for this plugin?

Thanks!

The PseduoTV skins are dependent on the skin you are running. What skin do you use?


- Jason102 - 2011-07-23

Bobbobbob: No, I haven't heard of that bug. Does it happen all the time? If so, can you get a debug log for me? Does anyone else see this issue?

As far as scheduling, the short answer is that I don't know how I'll do it yet. I'm throwing around a couple of different ideas. I don't think I will interrupt whatever is currently playing, though, I'm sure I'll put it in the playlist itself somehow.

As far as the requests go, things like this may get a bit easier to do in the next release with the addition of channel rules. I'll keep this forum posted as I make progress. I'm almost done with the basic structure of rules, then I'll just need to fill in each one.


- QuinRiva - 2011-07-25

So adding this to the start of my autoexec.py causes XBMC to freeze indefinitely. The log files don't show anything obvious.

Code:
#execute targeted script at startup.
import xbmc
xbmc.executescript('special://home/addons/script.pseudotv/default.py')



- mwkurt - 2011-07-25

QuinRiva Wrote:So adding this to the start of my autoexec.py causes XBMC to freeze indefinitely. The log files don't show anything obvious.

Code:
#execute targeted script at startup.
import xbmc
xbmc.executescript('special://home/addons/script.pseudotv/default.py')

Here is what I use in my autoexec.py:

import time;time.sleep(5);xbmc.executebuiltin("XBMC.RunScript(special://home/addons/script.pseudotv/default.py,-startup)")

That is exactly as copied and I have no problems whatsoever.
The import time;time.sleep(5) tells XBMC to wait 5 seconds before executing said script.

There should not be a space in the "Runscript" wording. I don't know why it looks like that.

Mark


- Martijn - 2011-07-25

Zepfan,

I noticed that the channel setting uses the "standard" skin instead of the skin we have installed. I was wondering if maybe you want to extend the PseudoTV skins with the channel setting part.
Great work


- zepfan - 2011-07-26

Machine-Sanctum Wrote:Zepfan,

I noticed that the channel setting uses the "standard" skin instead of the skin we have installed. I was wondering if maybe you want to extend the PseudoTV skins with the channel setting part.
Great work

Yea, I never use it and kinda forgot about it. Upon looking at it, it's going to take me more time. I'm not going to say when it'll be done as it's more complicated than I had thought. I'll try and include them all in the next update Jason does ( as long as it's not soon!)