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)



- RockDawg - 2012-03-01

I'm still playing with the method for interleaving hidden channels with a visible channel and each channel being based on a single show. I've got it working, but there's something I've noticed - In order for all the episodes of each channel to play, it seems that the base channel (the visible one) needs to be built on the show with the most episodes. For example, if you have show A with 50 episodes and build the base channel on that show and then interleave a channel based on show B that contains 100 episodes and you have the min and max interleave set to 1, it will only interleave enough of show B (50 of the 100 episodes in this case) as needed to mesh with the base channel's number of episodes.

It would be better IMO if PTV would repeat the base channel episodes as needed until the interleaving has included every episode from every channel at least once. Setting the largest show as the base channel isn't the best solution as the show with the most episodes could change over time.

I've managed to get a balanced programming schedule with interleaving channels and increasing the min/max interleave by 1 for each interleave rule. My problem is that I now get too perfect of a schedule. Shows A, B, C and D always play in the order ABCDABCDABCD. I'd like to have just a little more randomness. I tried playing with the min/max interleave setting and it works, but with then some shows have episodes that never air. I presume this is because of the limitation I mention above.

Maybe I'm just doing something wrong. Have any of you managed to get a bit of random interleaving while still getting all the episodes of each show to air?


- Daavid - 2012-03-01

RockDawg Wrote:I'm still playing with the method for interleaving hidden channels with a visible channel and each channel being based on a single show. I've got it working, but there's something I've noticed - In order for all the episodes of each channel to play, it seems that the base channel (the visible one) needs to be built on the show with the most episodes. For example, if you have show A with 50 episodes and build the base channel on that show and then interleave a channel based on show B that contains 100 episodes and you have the min and max interleave set to 1, it will only interleave enough of show B (50 of the 100 episodes in this case) as needed to mesh with the base channel's number of episodes.

It would be better IMO if PTV would repeat the base channel episodes as needed until the interleaving has included every episode from every channel at least once. Setting the largest show as the base channel isn't the best solution as the show with the most episodes could change over time.

I've managed to get a balanced programming schedule with interleaving channels and increasing the min/max interleave by 1 for each interleave rule. My problem is that I now get too perfect of a schedule. Shows A, B, C and D always play in the order ABCDABCDABCD. I'd like to have just a little more randomness. I tried playing with the min/max interleave setting and it works, but with then some shows have episodes that never air. I presume this is because of the limitation I mention above.

Maybe I'm just doing something wrong. Have any of you managed to get a bit of random interleaving while still getting all the episodes of each show to air?

Hi, Maybe I missed an earlier post that explained this, but why are you only trying this with Interleaving? Is there some benefit I've not thought of?

I'm doing pretty much what you're after with Smart Playlists and I get no limitations. I've set multiple rules in the play list to bring in the shows I want (or genres, or networks in some cases) - Then I set the playlist to random behaviour.
I then add a channel in PTV configuration and set the playlist as the channel. Then I add the rule, 'play shows in order' And while it keeps the randomness of teh playlist, it forces the episodes to be in order. Give it a shot and let me know if it solves it for you.


- Jason102 - 2012-03-01

opentrick1 Wrote:I noticed someone else getting the same error, if not the exact same behaviour(See original quote) was wondering if there is some kind of workaraound?

This "error" should really be a warning. It is really just a warning that I'm using a deprecated version of a function and I need to modify it before it is completely removed. It doesn't actually affect anything at the moment.

Your log file looks...odd. PseudoTV appears to be working properly, but there's a crapload of JSON calls going on. It appears that you have a script (script.watchlist) that may be doing this. I would try disabling this and see if that fixes the issue.

RockDawg Wrote:For example, if you have show A with 50 episodes and build the base channel on that show and then interleave a channel based on show B that contains 100 episodes and you have the min and max interleave set to 1, it will only interleave enough of show B (50 of the 100 episodes in this case) as needed to mesh with the base channel's number of episodes.

You're partially correct. It will only fill in the first 50 in this case. When you start PTV, though, it should fill out the channels a bit more in order to get a 5 day buffer of things to play. While it's doing this, it should continue where it left off with the interleaving.

This is all a should. I've done some testing, but there could be some issue that I don't know about. Do you have any sort of background updating on? If not, then this may not work, but otherwise it should.

Can you verify one way or another?


- RockDawg - 2012-03-02

Daavid Wrote:Hi, Maybe I missed an earlier post that explained this, but why are you only trying this with Interleaving? Is there some benefit I've not thought of?

I'm doing pretty much what you're after with Smart Playlists and I get no limitations. I've set multiple rules in the play list to bring in the shows I want (or genres, or networks in some cases) - Then I set the playlist to random behaviour.
I then add a channel in PTV configuration and set the playlist as the channel. Then I add the rule, 'play shows in order' And while it keeps the randomness of teh playlist, it forces the episodes to be in order. Give it a shot and let me know if it solves it for you.

I tried that in the past, but I found random to be problematic when the channel contained shows of various sizes. The shows with a lot of episodes played often and the shows with much fewer episodes seemingly never played. Some shows would play 4-7 episodes in a row. I am using interleaving to get a more balanced mix.


- RockDawg - 2012-03-02

Jason102 Wrote:You're partially correct. It will only fill in the first 50 in this case. When you start PTV, though, it should fill out the channels a bit more in order to get a 5 day buffer of things to play. While it's doing this, it should continue where it left off with the interleaving.

This is all a should. I've done some testing, but there could be some issue that I don't know about. Do you have any sort of background updating on? If not, then this may not work, but otherwise it should.

Can you verify one way or another?

Yah that seems to work. I just created a test channel with two shows and it did what you said. My example of two shows was just to make it easier to explain. I suppose my problem is that my channel has far more than five days of programming. In that case interleaving stops once it has gone through the base channel once which can leave some shows without having all their episodes in the schedule. This becomes especially true once I start changing up the min/max interleaving values for some of the interleaved channels in an attempt to get a bit of randomness to avoid the ABCDABCDABCD scenario.


- TheFonz - 2012-03-02

Jason102 Wrote:TheFonz: Weird, it appears to start a video and then doesn't ever finish. You said you get an error message...what does it say? I've added a couple more debug messages to the code, can you download the latest stable-pre and get another log? Thanks.

Sorry I am not exactly sure how to download the Stable Pre?
I went to the repository and clicked the Download Zip button. Is that right?


- thumbinollie - 2012-03-02

TheFonz Wrote:Sorry I am not exactly sure how to download the Stable Pre?
I went to the repository and clicked the Download Zip button. Is that right?

Go to the repository, click on "Branches", then stable pre, THEN the Download Zip button.


- thumbinollie - 2012-03-02

Jason,

I've built most of my TV channels by interleaving. It works GREAT and gives me plenty of flexibility to schedule things the way I want.

I've been trying to figure out how to get bumpers in between every show, and I'm stumped. Best I've been able to come up with is getting a bumper at the end of my scheduling loop before it starts again.

Any suggestions?

THANKS!


- jubal1 - 2012-03-02

Apologies in advance if this has already been dealt with, I did look but didn't find anything.

I'm trying to create a channel that reflects my TV Show viewing habits. Basically I watch episodes in the order they appear in my TV Shows menu.

Only unwatched, sorted by number of episodes, ascending, then in show name order.

This way I watch all the shows that I only have one unwatched episode of, followed by those that I have two of etc. etc. etc.

That way the shows I watch as soon as they come out are always prioritised, but shows where I have multiple episodes to watch play all unwatched episodes.

I have not been able to create a smart playlist or PTV playlist that does this.

Can anyone help?


- Keeper - 2012-03-02

thumbinollie Wrote:Jason,

I've built most of my TV channels by interleaving. It works GREAT and gives me plenty of flexibility to schedule things the way I want.

I've been trying to figure out how to get bumpers in between every show, and I'm stumped. Best I've been able to come up with is getting a bumper at the end of my scheduling loop before it starts again.

Any suggestions?

THANKS!

Here is how I do it:

Channel 1: CBS
Channel 2: ABC
...
Channel 100: Adverts (Hidden channel)
Channel 101: CBS Bumpers (Hidden channel)
Channel 102: ABC Bumpers (Hidden channel)
...

On Channel 1, put a rule to interleave channel 100 (adverts) after every 1 show.
On Channel 1, put a rule to interleave channel 101 (cbs bumpers) after every 2 shows.

This gives you:
1) CBS Show
2) Advert
3) Bumper
4) CBS Show
5) Advert
6) Bumper
7) CBS Show
8) Advert
9) Bumper

Hope that helps...


- Keeper - 2012-03-02

Hey Jason, it's me again =)

What future features are you planning? I've got a few ideas up my sleeve if you are interested in hearing them...

1) Channel rule to specify X/Y position of logo, or maybe a toggle for top right, bottom right, top left, bottom left. different channels over the world have them at different locations..

2) Make Logo's transparent - Yes/No, or perhaps 25%, 50%, 75%, 100%
(or this could replace "hide/show logo" rule, where 0% hides it?)
I really would love it if my logo could cover up logos present in videos, a semi-transparent logo can't do this...

3) Maybe a "Guide Channel" where it generates a channel grid?
I've done this manually, but it would be nice to be able to navigate around the icons and have a small info bar or something...
Image

4) Enable us to open the EPG when a bumper/advert is playing.
Note: Advert/bumper filename should not show, but the info of the show that is playing after.

5) My clock display shows:
Quote:9:40
Finish time:
what does the "finish time" mean, because the time displayed is the current time, and "finish time" gives the idea that is the time when the show ends?

6) When changing channels, it sometimes buffers, and you see a black screen - this is fine, however, the logo stays present for that second or two.
I may be picking here, but is it possible to hide the logo temporarily until the video starts playing? It would just give PseudoTV that extra realism...


I feel like a PseudoTV "Experience Tester" hehe
Anyway, I hope those suggestions aren't too "out there" =)

Keep up the good work on the best xbmc addon ever! You are my hero Jason


- Daavid - 2012-03-02

RockDawg Wrote:I tried that in the past, but I found random to be problematic when the channel contained shows of various sizes. The shows with a lot of episodes played often and the shows with much fewer episodes seemingly never played. Some shows would play 4-7 episodes in a row. I am using interleaving to get a more balanced mix.

Hmmm, i see what you mean. I suppose a temporary solution until Jason maybe solve it programatically may be to create a playlist as I've suggested, but using only a certain amount of shows, perhaps shows that have a similar number of episodes. Then use the playlist as a bas channel and interleave some more shows into that, with a 'play shows in order' rule thrown in as well.


- thumbinollie - 2012-03-02

Keeper Wrote:Here is how I do it:

Channel 1: CBS
Channel 2: ABC
...
Channel 100: Adverts (Hidden channel)
Channel 101: CBS Bumpers (Hidden channel)
Channel 102: ABC Bumpers (Hidden channel)
...

On Channel 1, put a rule to interleave channel 100 (adverts) after every 1 show.
On Channel 1, put a rule to interleave channel 101 (cbs bumpers) after every 2 shows.

This gives you:
1) CBS Show
2) Advert
3) Bumper
4) CBS Show
5) Advert
6) Bumper
7) CBS Show
8) Advert
9) Bumper

Hope that helps...

My problem with this is that my channels are built entirely of interleaves to begin with.

All of my TV shows have their own hidden channel, for example, Mythbusters is 200 (hidden) Family Guy is 199 (hidden) South Park is 198 (hidden) American Dad 197 (hidden) etc... I have about 25 tv shows with their own hidden channels. I did this so that I can interleave my channels in a set order.

So, my channel 1 [adult swim] is built like this:
I set up the channel as a tv show, I used Aqua Teen Hunger Force for the base.
Then I interleave my other shows in like this:
Interleave channel 199 min 1 max 1
Interleave channel 198 min 2 max 2
Interleave channel 197 min 3 max 3

That that gives me is a rotation like this:
ATHF
Family Guy
South Park
American Dad
ATHF
Family Guy
South Park
American Dad

It repeats that way.

What I want to do is insert bumpers between every show.


- actapon - 2012-03-02

amazing idea and exactly what i wanted as the last leg to my home HTPC. I think the value of adhoc channel surfing is underestimated by the HTPC community.

anyway... reading this quote answers my question, but i'm looking for more info on what other people have done

Quote:This ONLY uses your existing video library to play video. It will NOT play
video from the internet. If you do not have a significant number of videos in
your library, then this script probably isn't for you. Sorry.

I have a PVR and several shows on disk that work great with PTV allowing me to see how powerful it is, but it's my streamed shows that are causing problems. I've used xbmc.mylibrary to scan my netflix, hulu, and amazon accounts to add a hoard of shows to my library. This app creates strm playlist files for the shows and they get scanned into my library.

The specific problem is when PTV tries to start a show from one of these strm files it starts at the beginning, not at some point in the middle. :confused2: Is this a known limitation? :confused2: :confused2:Is there a workaround? :confused2: Or is someone interested in trying to fix this?

I see posts about icelibrary, but i'm not too familiar with how that library addition worked and that service has now gone to hell... so i'm not going to try playing with it.


- Keeper - 2012-03-02

thumbinollie Wrote:My problem with this is that my channels are built entirely of interleaves to begin with.

<snip>

It repeats that way.

What I want to do is insert bumpers between every show.

Dude, just add a final rule to interleave channel X (Your bumper channel) and set it to interleave after every 1 show Laugh