Kodi Community Forum

Full Version: Why can't tags be used to create episode smart playlists?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
The fact we can't create episode playlists using the tv show tag seems like an glaring oversight to me. I'd like to use it for creating PseudoTV channels. Is there any chance this could make it into one of the Gotham fix releases?
I hope so too. I would like to see tags on episodes and the ability to create a smart playlist of episodes based on the TV show tag. Much like you can create an episode SmartList based on genre which comes from the TV show, so too would I like to see this for tvshow tags. It looks pretty easy at the source code level, so I may knock up a patch this weekend (note that I am new to xbmc so I can't say if my patch would be welcomed).
Episode-level tags don't have support yet, but I think this is simply because no one has had time to specifically work on it yet. I'm looking forward to it as well. If camh is able to work something up then I would say that we'd be very interested in at least looking at it. The dev who worked on tags has been very busy, so I'm sure any help would be welcome and encouraged.
Just to be clear, there are two aspects here:

1) Tags on episodes, which would be to add "episode" to the taglinks table allowing you to tag individual episodes. It should be a straight extension of the way tags work right now. It extends the schema conceptually, but not actually due to how tags are linked.

2) Supporting a TVShowTag field for episode playlists. This is just a change to the playlist code to add the code to generate the where clause for this. This requires no schema changes - it uses existing indexes and columns.

My intention was to see how hard it would be to do the second of these. I had been thinking of the first as it seems a natural extension of the way tags are currently implemented, but more importantly I wanted to ensure that supporting TVShowTag would not conflict with the first feature if it were to be added.

Anyway, the database side of both looks easy. I have no clue about the UI side though.
Quick update before I go out for the evening:

I have a patch that allows episode smart playlists to filter on tv show tags. It is against gotham 13.1 at the moment (that's what I needed for my rpi openelec build), but I will also merge into head.

Tomorrow (Sunday) I'll get my github repository sorted out so I can upload the change there.
Nice!
I didn't get around to merging into head, but here it is for anyone who wants it against 13.1 and 13.2 (unreleased):

https://github.com/camh-/xbmc/tree/13.1/tvshow-tags
https://github.com/camh-/xbmc/tree/13.2/tvshow-tags
Awesome thanks! Whats the code review process? Are we likely to see this in an official release any time soon? Or will I have to keep making my own builds?
This obviously is not going to make it into any 13.X version. I tried running it against head but had other problems unrelated to the patch - I could not get my library to load properly so until I can figure out what I did wrong, I can't submit the patch for head.

The 13.1/13.2 patch applies mostly cleanly to head except for a strings.po conflict. I'm happy for anyone to take it and submit it to head. Otherwise I'll soon get around to getting it sorted out properly and work through the submission procedures.
i have been looking for something very similar, it's to put the "episode aired after date" in the TV Show smart playlist. can this be done? it would change my life, seriously.
(2014-08-13, 02:13)TheBuz Wrote: [ -> ]i have been looking for something very similar, it's to put the "episode aired after date" in the TV Show smart playlist. can this be done? it would change my life, seriously.

That's already supported; just match items on the "First aired" field and it will allow you to specify "after" and a date.
(2014-08-13, 04:40)sialivi Wrote: [ -> ]
(2014-08-13, 02:13)TheBuz Wrote: [ -> ]i have been looking for something very similar, it's to put the "episode aired after date" in the TV Show smart playlist. can this be done? it would change my life, seriously.

That's already supported; just match items on the "First aired" field and it will allow you to specify "after" and a date.

Looking at the code (I don't have a running instance of xbmc in front of me), it looks like you can only use First aired in an episode smart playlist, not a tv show smart playlist.

It looks doable without much trouble, except that the right way to do it would mean a schema change. The "tvshowview" view ("tvshowview" and "tvshowcounts" in v14-helix) would need to be extended to add an aggregation of the first aired date of each episode for the tv show. The aggregation would be the latest first aired date of any episode of that show. The earliest date should already exist in the tvshow table (c05) since tvshow also has a first aired field, and I expect that it corresponds the earliest first aired date of all the episodes of the show.

Naming the view field needs some thought. It is not strictly "last aired", more "latest first aired". But that's a bit cumbersome. Maybe "last aired" is the best name even if not technically accurate.

TheBuz, can you more completely describe your use case? Better to make sure what is wanted and why to evaluate whether it is worth adding.
(2014-08-13, 05:59)camh Wrote: [ -> ]
(2014-08-13, 04:40)sialivi Wrote: [ -> ]
(2014-08-13, 02:13)TheBuz Wrote: [ -> ]i have been looking for something very similar, it's to put the "episode aired after date" in the TV Show smart playlist. can this be done? it would change my life, seriously.

That's already supported; just match items on the "First aired" field and it will allow you to specify "after" and a date.

Looking at the code (I don't have a running instance of xbmc in front of me), it looks like you can only use First aired in an episode smart playlist, not a tv show smart playlist.

It looks doable without much trouble, except that the right way to do it would mean a schema change. The "tvshowview" view ("tvshowview" and "tvshowcounts" in v14-helix) would need to be extended to add an aggregation of the first aired date of each episode for the tv show. The aggregation would be the latest first aired date of any episode of that show. The earliest date should already exist in the tvshow table (c05) since tvshow also has a first aired field, and I expect that it corresponds the earliest first aired date of all the episodes of the show.

Naming the view field needs some thought. It is not strictly "last aired", more "latest first aired". But that's a bit cumbersome. Maybe "last aired" is the best name even if not technically accurate.

TheBuz, can you more completely describe your use case? Better to make sure what is wanted and why to evaluate whether it is worth adding.


Thanks For replying.

it may only seem like a small thing to others, But. All of my TV Shows i'm currently watching download automatically via RSS. So i have a Episode playlist called "Current TV" with the parameters:

-View count less than 1
-First Aired after 01-01-2014

Which works until i add a full season or two to the library, Which means i have to scroll through 24 or 48 episodes of a show until i get to a TV Show that's currently airing. And there is no way to "group" these TV shows unless they are in "TV Show Playlist" rather than a "Episode Playlist"

i have attached some images,

Current problem:
Image Image Image

Ideal outcome (TV Shows that have new episodes, which have a play count less than 1, that have aired after 01-01-14):

Image
(2014-08-13, 10:16)TheBuz Wrote: [ -> ]So i have a Episode playlist called "Current TV" with the parameters:

-View count less than 1
-First Aired after 01-01-2014

Which works until i add a full season or two to the library, Which means i have to scroll through 24 or 48 episodes of a show until i get to a TV Show that's currently airing. And there is no way to "group" these TV shows unless they are in "TV Show Playlist" rather than a "Episode Playlist"

That sounds very similar to my use case for which I implemented the patch in this thread.

If I acquire a new show for which I am not up-to-date, I do not want that to show up in my "New Shows" playlist. I only want to see episodes that are recent for shows that I do not have a back-catalog to work through.

With my tv shows tag patch, I can tag tv shows as "Active", and set up the episode playlist as:
- View count less than 1
- Has the TV Show tag of "Active".

or maybe:
- View count less than one
- Does not have the TV show tag of "Catching up"
- Not aired in the last X days (90 or 180 for X, I think)

When I am up-to-date on a show (or it is a new show), I can put tag that TV show with "Active" and it will show up on my new episode playlist. Or I inverse tag shows I am catching up on with "Catching up" so it does not show up as a new live episode. The X days is just so I don't have to tag old shows that finished sometime ago if I decide I want to watch them.

My other use case is to also tag shows as being only for me or my partner so I can set up more targeted "new shows" playlists for unshared content that we do not watch together.

Maybe you can use my patch in this way?
(2014-08-13, 11:57)camh Wrote: [ -> ]
(2014-08-13, 10:16)TheBuz Wrote: [ -> ]So i have a Episode playlist called "Current TV" with the parameters:

-View count less than 1
-First Aired after 01-01-2014

Which works until i add a full season or two to the library, Which means i have to scroll through 24 or 48 episodes of a show until i get to a TV Show that's currently airing. And there is no way to "group" these TV shows unless they are in "TV Show Playlist" rather than a "Episode Playlist"

That sounds very similar to my use case for which I implemented the patch in this thread.

If I acquire a new show for which I am not up-to-date, I do not want that to show up in my "New Shows" playlist. I only want to see episodes that are recent for shows that I do not have a back-catalog to work through.

With my tv shows tag patch, I can tag tv shows as "Active", and set up the episode playlist as:
- View count less than 1
- Has the TV Show tag of "Active".

or maybe:
- View count less than one
- Does not have the TV show tag of "Catching up"
- Not aired in the last X days (90 or 180 for X, I think)

When I am up-to-date on a show (or it is a new show), I can put tag that TV show with "Active" and it will show up on my new episode playlist. Or I inverse tag shows I am catching up on with "Catching up" so it does not show up as a new live episode. The X days is just so I don't have to tag old shows that finished sometime ago if I decide I want to watch them.

My other use case is to also tag shows as being only for me or my partner so I can set up more targeted "new shows" playlists for unshared content that we do not watch together.

Maybe you can use my patch in this way?


Thanks for your tips, and your time. I suppose i am trying automate everything and being really picky.

With my RSS Downloads, i can choose "Add new episodes to RSS" ideally i would like that to be the only step, rather than adding a tag in XBMC as well (as i may forget, if i add to the show to RSS while i'm out, and if the show isn't in my library yet)

i can't use the reverse :
- View count less than one
- Does not have the TV show tag of "Catching up"
- Not aired in the last X days (90 or 180 for X, I think)


because i would like the back-catalog of shows to remain on there as it reminds me to watch them. and -Not aired in the last X days can only be done on episodes not TV Shows.

i suppose i am trying to create the "My Shows" from TiVo. it's really frustrating Sad
Pages: 1 2