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