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)



- danz0l - 2011-03-13

jtucker1972 Wrote:How many of these 60 or simple episode or movie playlists? e.g. Sci-Fi TV, Sci-Fi Movies, etc. These could be replaced by simply selecting those channels from the presets. If at all possible, I am trying to create the functionality to almost eliminate the need for the user to have to create custom playlists.

Yes fully understand your logic but for me the main beauty of Pseudo is its flexibility. So for instance i can create a stargate TV channel, A Startrek one, A film channel dedicated to Stephen King etc etc. Genres are a little limited in that respect.

Quote:It's tough to pick a channel "grouping" that everyone would prefer. I based this version by how the playlists are created, e.g. genre is ..., firstaired before..., tvshow is ..., studio contains ..., et.al. I will post what the current grouping consist of and see what makes sense. Also from a GUI perspective, there are only so many tabs on the left side of the add-on settings which are visible at one time. I am afraid if I add too many a user will not know that the bottom "hidden" ones are even there. This may cause some confusion as well as the more tabs the more complexity. Trying to find a balance is the art of it.

Again fully understand and agree where your going with this, I based the sample genres on the foxsat HDR box that does this. As i see it, Pseudo's goal was and is to make a near LIVE tv type experience as possible with existing available media. So in that respect, a studio channel like CNN, ABC, BBC 1 etc are defined under a genre category (i.e. Entertainment, News, etc). Film channels like Film 4 under the films genre. To me defining a virtual BBC 1, based on available media, would go into an Entertainment genre compiled with any custom channels i defined too (i might opt for a complete comedy channel, or maybe 2 or 3, based on tv genre, age of show or even actors, for instance). Again this would be under the genre Entertainment, alongside the virtual BBc 1 channel. It just seems a little more logical and natural than having to drill down through a category of say TV Genre for my comedys channel and TV networks for my virtual BBC 1.

It may appear more logical however when i test the new platform.

Just offering some sugestions and food for thought.


- jtucker1972 - 2011-03-14

danz0l Wrote:Yes fully understand your logic but for me the main beauty of Pseudo is its flexibility. So for instance i can create a stargate TV channel, A Startrek one, A film channel dedicated to Stephen King etc etc. Genres are a little limited in that respect.



Again fully understand and agree where your going with this, I based the sample genres on the foxsat HDR box that does this. As i see it, Pseudo's goal was and is to make a near LIVE tv type experience as possible with existing available media. So in that respect, a studio channel like CNN, ABC, BBC 1 etc are defined under a genre category (i.e. Entertainment, News, etc). Film channels like Film 4 under the films genre. To me defining a virtual BBC 1, based on available media, would go into an Entertainment genre compiled with any custom channels i defined too (i might opt for a complete comedy channel, or maybe 2 or 3, based on tv genre, age of show or even actors, for instance). Again this would be under the genre Entertainment, alongside the virtual BBc 1 channel. It just seems a little more logical and natural than having to drill down through a category of say TV Genre for my comedys channel and TV networks for my virtual BBC 1.

It may appear more logical however when i test the new platform.

Just offering some sugestions and food for thought.

I understand what you are wanting. Just not sure if there would ever be an agreement on what constitutes "Entertainment" vs "Lifestyle" vs "Special Interest".

So here are the current presets that I've built. There is really only room for a few tabs in the add-on settings so any "groupings" would have to be limited to a few. Honestly, I've been more focused on getting the presets built and the code created to create the playlists on the fly, then on what is the best way to organize these. I could add some custom channels fields to each group. That is not a big deal. The challenge is how do you best organize all of these into 5 or 6 groups that most people will find intuitive and "cable-like".

TV Genres
action-and-adventure-tv
animation-tv
children-tv
comedy-tv
documentary-tv
drama-tv
fantasy-tv
mini-series-tv
reality-tv
science-fiction-tv
special-interest-tv
sport-tv
western-tv
1950s-tv
1960s-tv
1970s-tv
1980s-tv
1990s-tv
2000s-tv
2010s-tv
child-tv
preteen-tv
teen-tv
adult-tv

TV Networks
a&e
abc
abc-family
adult-swim
amc
animal-planet
bbc-america
bio
bet
boomerang
bravo
cn
cbs
cinemax
comedy-central
cooking
discovery
discovery-health
disney-channel
playhouse-disney
diy
e!
food
fox
fx
g4
golf
hbo
hgtv
history
hub
id
lifetime
military
mtv
ngc
nbc
nick
oxygen
pbs
planet-green
showtime
style
sunshine
syfy
tbs
tlc
tnt
usa

Movie Genres
action-movies
adventure-movies
animation-movies
biography-movies
comedy-movies
crime-movies
documentary-movies
drama-movies
family-movies
fantasy-movies
film-noir-movies
history-movies
horror-movies
musical-movies
music-movies
mystery-movies
road-movies
romance-movies
science-fiction
short-movies
sport-movies
thriller-movies
war-movies
western-movies
1950s-movies
1960s-movies
1970s-movies
1980s-movies
1990s-movies
2000s-movies
2010s-movies
child-movies
preteen-movies
teen-movies
adult-movies

Movie Studios
20th-century-fox
columbia-pictures
dreamworks
lionsgate
lucasfilm
marvel
mgm
mirage
new-line
orion
paramount
pixar
sony
united-artists
universal-studios
disney
warner-bros

Mixed
mixed-action
mixed-animation
mixed-comedy
mixed-documentary
mixed-drama
mixed-family
mixed-fantasy
mixed-science-fiction
mixed-sport
mixed-western
mixed-1950s
mixed-1960s
mixed-1970s
mixed-1980s
mixed-1990s
mixed-2000s
mixed-2010s
mixed-child
mixed-preteen
mixed-teen
mixed-adult
mixed-Disney
mixed-Nickelodeon


- ryan03rr - 2011-03-14

does anyone have a idea on the best way to use a custom skin.
i use a heavily modified version of transparency. and the incorporated "t" skin in psuedotv does not fit my liking.
right now i use a grey "desaturated" version of your default skin as it seems to be the most "complete". im applying it by copying over the "t" skin directory.
needless to say if plugin updates. skins wiped back to blue

is there a better way to do this... with my modded "t"skin for xbmc i tweaked the addon.xml so any new skins wouldnt kill it, this does not work for your plugin as i would like any update you provide as soon as they are pushed.


also i would like a little opinion from jasonara...
will the channel_x.xml with corresponding channel logo name format stay the same with all the new "playlist" work going on? i have a rather large system/network and once all my custom channels are built and pushed to all players on the network i would love not to change them for awhile (hopefully)..
finding free time to customize all these boxes is a huge pain.

also would love to know if anyone else is having a issue where the script seems to hang around for 5 seconds or so after stopping it, causing attempted menu navigation to change channels? i personnaly can work out if the script has shut down properly by looking at my menu overlay, but this is a impossible task to the woman resulting in her changing channels when shes trying to navigate menu.

thanks for all you answers/opinions
ps congrats on making imho the most needed plugin ever for xbmc. wish i could do it myself


- ryan437 - 2011-03-14

...


- Jason102 - 2011-03-14

jtucker1972 has developed a much more flexible preset system than what currently exists. The add-on configuration will allow for a certain number of the channels to have a playlist specified as opposed to needing the current strict naming scheme that is currently used. The user will still be able to use that same naming scheme in order to specify any number of channels beyond those in the configuration screen. Additionally, the new configurations custom channels will default to the current naming scheme, meaning that (with a few possible exceptions) any existing setup should work with the new system without any changes.


- jtucker1972 - 2011-03-14

ryan03rr Wrote:will the channel_x.xml with corresponding channel logo name format stay the same with all the new "playlist" work going on? i have a rather large system/network and once all my custom channels are built and pushed to all players on the network i would love not to change them for awhile (hopefully)..
finding free time to customize all these boxes is a huge pain.

Jason and I are still in discussion on how the final functionality will work. The goal would be that any changes would not impact existing channel setups. One option would be to have the preset channel script I've written scan the video and mixed directories for existing channels and if found, auto-update the "Custom" channels configuration with these channels. This way users could still use their existing channels and migrate to the other channels if/when they choose. The challenge is some users have more than 50 custom channels, so where do we set the limit on number of custom channels.

One of my goals for the preset channel functionality is to be able to fully configure PseudoTV without ever having to leave XBMC. No more manual renaming of files, etc.

Jason will have the final say in how my code gets merged into his official release.


- danz0l - 2011-03-14

I canot begin to express my admiration for both Jason and Jtucker on the work of this plugin. The is probably the only plugin currently in fulltime use in our house on 3 xbmc machines and everybody loves the "cable" like experiance.

What still concerns me is the new move to make it more friendly for newcomers and those with limited comprehension of smart playlists. I completely understand the move and 100% support it but i feel it may be a step in the wrong direction with genres and television networks being of different categories.

I discussed your plans last night with my wife and daughter (both use the XBMC and Pseudo extensively) and neither understood the concept of having to go to a networks category for a virtual NBC, whilst again having to move to another category for a mixed TV channel. They both voiced that it would simply be easier to go to films for films, and entertainment for entertainment. This i have to agree is still within my thinking of how the script should function and is far more akin to a cable, sat box experience.

I think ultimately it will confuse, rather than help, the end user, who, in all honesty, expects things a certain way. After all, with having to use genres, directors, network studios etc as categories, wouldnt it be fair to say that this then just becomes a smart playlist that is accessible from within XBMC itself ? I.e. you could just select the playlists for a certain genre, or director.

For me, the idea is to go on moods. So today i want to watch a film, i drill down into the film category, and there presenting in front of me are preset and custom channels i created playing a variety of different movies. Likewise i fancy education, down i go to the documentaries section and again select from a variety of custom and presets. Kids programs, unto childrens etc etc. For most end users this is what is expected in my experience.

Regarding the configuration side, i fully understand that logistically this causes a few complication, but lets face it, the end user experience superceeds setting up procedures (at least for me). As when configured its a fire and forget system.

Its like the idea of limiting custom channels to say 25. I see straight of the bat that you have no virtual networks aimed at UK. So BBC, ITV, etc will likely be created by the end user. Add to this a wealth of foreign language channels, Smaller network channels etc and you could easily create 25 virtual custom channels on networks alone. Its the flexibility that draws people to both Pseudo and smart playlists.

Some of our currently highly used custom channels in PSeudo are
  • The Twilight Zone
  • Pretanatural
  • Stargate TV
  • Startrek TV
  • Steven King Movies

I have plans for many more too like
  • Sunday Films
  • UK TV comedy
  • UK TV Movies


etc. And now i see how you managed networks, i can add those too.

So straight away there are two categories i could pop these in (if predefined)

Movies
  • Sunday Films
  • Steven King Movies
  • UK TV Movies

Entertainment
  • UK TV comedy
  • The Twilight Zone
  • Pretanatural
  • Stargate TV
  • Startrek TV
Now what i propose is a custom tag in the smartplaylists, say something like <Category>Entertainment</Category> which defines it belonging to the Entertainment category.

This way we can continue having the flexibility. You could even introduce an order option

<Channel Order>1</Channel Order>.

I'm not sure if it would hinder xbmc but i would imagine it would ignore those tags.

Then what you could do is continue the path you are heading with the presets and a toggle to turn of all presets in favour of a custom set of categories and channels for those who want to get their hands a little dirtier.

Just some suggestions ...............


- Jason102 - 2011-03-14

I think you may misunderstand what the upcoming changes actually do. In the previous release (or maybe it was 2 releases ago) I added the channel presets: if you had less than 20 configured channels, it would fill them in with packaged smart playlists. The coming update is merely an extension of this. Instead of using these existing playlists to fill out your channel line-up, the user is given some flexibility in what sort of "filler" they want to use.

The code that jtucker1972has written actually creates a set of smart playlists to use based on the addon configuration. Once that process is complete, they will be used in the same way as they currently are: to fill in and extend an existing channel setup. The actual PseudoTV experience will not change at all in this release. The idea of "groups" is just to give the user some control over what order these new generated presets will occur...they will not be noticed inside of the actual addon except in the order of the channel list itself.

When the user is updated to the new version, they won't have to actually configure anything to use this, some set of defaults will exist. They can choose, though, to pretty extensively configure what channels are auto-generated for them. Does this sound more reasonable?


- danz0l - 2011-03-14

Ah yes it does Jason, totally misunderstood the concept and assumed that on the user interface you would have these genres, tv networks etc selectable and drill down into them. Now i understand what your trying to do and yes, fantastic idea.

Going back to what i said though, what do you think about a latter addition including those features ? So we can define a frontend categories list ? I know it would mean extensive updates to the skins though so understand if its not something you have considered.


- jtucker1972 - 2011-03-14

danz0l Wrote:Its like the idea of limiting custom channels to say 25. I see straight of the bat that you have no virtual networks aimed at UK. So BBC, ITV, etc will likely be created by the end user. Add to this a wealth of foreign language channels, Smaller network channels etc and you could easily create 25 virtual custom channels on networks alone. Its the flexibility that draws people to both Pseudo and smart playlists.

Not because they can't be added, but because I am focused on getting the core preset code incorporated.

Think of it this way. Jason as built the core engine for PseudoTV. I created a channel management system to work with the core engine. The third piece is the content (channel information) which the community could help us out in creating. I've designed the code to where it is pretty straight forward to add new channels so they become presets without having to manually create the smartplaylists. Then everyone can enjoy the channel option.

I have no problem re-organizing the channels into different categories. I just need someone to go through the channels I've created and come up with a better grouping.

If you have other channels you would like to see then post them or send me a PM with the following information:

1. Channel Name
2. Rule (genre, tvshow, etc.)
3. Operator (is, isnot, contains, etc.)
4. Criteria (e.g. criteria1|criteria2|criteria3|etc.)

Limitations:

XBMC JSON does not support a studio rule, hence why we have to use a list of tv show titles to build the TV Network channels.


- danz0l - 2011-03-14

Sorry Jtucker i completely misunderstood where this was heading and Jason put me right. I'd be happy to help creating some of the UK TV network channels for presets and had a quick look at your code and it seems fairly straight forward to bolt on. Understanding the limitations of the network genre however and using wikipedia to grab shows is a great idea. However updates are gonna be problematic as new shows come out ? I guess its a case of keeping those channels as updated as possible with current information. I wonder if theres a better website than wikipedia to grab such info that, maybe, latter in development, we could capture with the plugin to maintain a fresh channel list.


- jtucker1972 - 2011-03-14

Jason102 Wrote:I think you may misunderstand what the upcoming changes actually do. In the previous release (or maybe it was 2 releases ago) I added the channel presets: if you had less than 20 configured channels, it would fill them in with packaged smart playlists. The coming update is merely an extension of this. Instead of using these existing playlists to fill out your channel line-up, the user is given some flexibility in what sort of "filler" they want to use.

The code that jtucker1972has written actually creates a set of smart playlists to use based on the addon configuration. Once that process is complete, they will be used in the same way as they currently are: to fill in and extend an existing channel setup. The actual PseudoTV experience will not change at all in this release. The idea of "groups" is just to give the user some control over what order these new generated presets will occur...they will not be noticed inside of the actual addon except in the order of the channel list itself.

When the user is updated to the new version, they won't have to actually configure anything to use this, some set of defaults will exist. They can choose, though, to pretty extensively configure what channels are auto-generated for them. Does this sound more reasonable?

Jason, when the current preset functionality fills in the channels, does it add them to the end or fill in the gaps?

Let's say we have Custom channels 1-10 for which 1,2,3,4,5,7,8 and 10 return shows. Does the preset fill in channels 6 and 9 and then add channels 11 through 20 or does it just add 12 channels after the custom ones have loaded?

I think the only difference in my original approach and your approach is that the Custom Channels would ALWAYS be the first category to appear in the EPG. Mine had it to where the user could specify where in the order the Custom channels appeared.

I guess you are viewing my addition as a preset replacement while I view it as channel creation automation. That is the reason why regardless of whether it is a "preset" channel or a "custom" channel, my code pulls them all in and based on the user group order, creates the Channel_1, Channel_2, etc. accordingly and stores them in the ~/userdata/addon_data/script.PseudoTV/presets folder so it doesn't overwrite any user's Channel_x.xsp files in their video playlists folder. No need to determine what is a Channel and what is a preset or whether the script needs to fill in channels. They are all just Channels. No different then if the user had manually created them. Here I thought I was going to make your job easier by just allowing the core engine to look in a new location for the Channel_x files.

I guess we all need to know how this will be incorporated and how the channels would appear in the EPG. My understanding of your approach is that it will look in the mixed and video playlist folders for any existing Channel_x.xsp files and load them first. Then "if the preset channels" button is enabled, it will look in the "presets" folder where I am creating the Channel_x.xsp files and load them. Is this correct?

I guess I just haven't understood why if I am able to pull in the existing Channel_x.xsp files from the video and mixed playlist folders, why there would need to be a distinction between Channel and Preset and why there would need to be a preset channel option anymore.


- jtucker1972 - 2011-03-14

danz0l Wrote:Sorry Jtucker i completely misunderstood where this was heading and Jason put me right. I'd be happy to help creating some of the UK TV network channels for presets and had a quick look at your code and it seems fairly straight forward to bolt on. Understanding the limitations of the network genre however and using wikipedia to grab shows is a great idea. However updates are gonna be problematic as new shows come out ? I guess its a case of keeping those channels as updated as possible with current information. I wonder if theres a better website than wikipedia to grab such info that, maybe, latter in development, we could capture with the plugin to maintain a fresh channel list.

That is where the repository comes in and the auto-updates in XBMC. As channel content gets updated they can go in as minor release changes and pushed out.


- danz0l - 2011-03-14

jtucker1972 Wrote:That is where the repository comes in and the auto-updates in XBMC. As channel content gets updated they can go in as minor release changes and pushed out.

OK understood, hadnt considered that, however still requires a manual update on channels before a push which would be so much better automated (mind you, sooner than later i can see smartplaylists having network operator code so would automate then anyways).

i think i have a handle on your code includes for the network playlists i.e.

Code:
if ADDON_SETTINGS.getSetting('BBC') == "true":
            name = 'BBC'
            type = 'episodes'
            rule = 'tvshow'
            operator1 = 'is'
            # setup array of tv shows
            criterialist = ''
            criterias = []
            criterias.append("Mongrels")
            criterias.append("Monkey Dust")
            criterias.append("Monty Python's Flying Circus")
            criterias.append("The Morecambe and Wise Show")
            criterias.append("Most Annoying People of 2008")
            criterias.append("Moviedrome")
            criterias.append("Mr Tumble")
            criterias.append("The Munsters")
            criterias.append("The Murder Game")
            criterias.append("Murder Most Horrid")
            criterias.append("Murder, She Wrote")
            criterias.append("Music Makers")
            criterias.append("My Family")
            criterias.append("My Hero")
           for criteria in criterias:
                if criterialist == '':
                    criterialist = criteria
                else:
                    criterialist = criterialist + '|' + criteria
            criteria1 = criterialist
            operator2 = ''
            criteria2 = ''
            self.presetChannels.append(presetChannel(name, type, rule, operator1, operator2, criteria1, criteria2, limit, random, numepisodes, nummovies, unwatched, nospecials, resolution))

What amazes me though is so how wrong wikipedia is on what they include as BBC programmes. They seem to include a lot of american network stuff that indeed does get played on the channel but isn't native. Still looking for better sources.

Also will including lots of tv names to look up against be a slow process for xbmc ? Wikipedia lists 600+ for BBC alone.

Another thing to consider is these titles will need to match the TVDB or they wont be found.


- danz0l - 2011-03-14

Ah heres an idea. What about using TVDB straight away as the updater for the preset smart playlists for networks ?

Doing a search for BBC in its network tabs

http://thetvdb.com/index.php?seriesname=&fieldlocation=2&language=7&genre=&year=&network=bbc&zap2it_id=&tvcom_id=&imdb_id=&order=translation&searching=Search&tab=advancedsearch

Limited to 200 though but i'm sure something can be encoded from the API ? This will allow the presets to remain current and grab the appropiately named shows for comparison ?

If i can get past the 200 search limit i can build presets on network and genre, so, BBC Comedy TV would include

http://thetvdb.com/index.php?seriesname=&fieldlocation=2&language=7&genre=Comedy&year=&network=bbc&zap2it_id=&tvcom_id=&imdb_id=&order=translation&searching=Search&tab=advancedsearch