2020-04-08, 05:38
Hi all, there is one more bit of trouble I'd like to try and cause everyone for the Matrix PVR interface. I don't have what I consider to be a good solution so before I waste people's time with a PR I'd like to waste your time explaining it to see if anyone agrees and has alternative ideas about it.
One of the problems I've had with the PVR interface since getting into this is the inherent sorting limitations of the Recorded TV interface. Today we can sort by Name, Date (actually Date/Time - more on that later), Duration, File, and optionally Size. The problem I have with these options is that none of them provide the ability to show a series in production order. Date works OK if the user is able to record the episodes of a series as they air, but for me, and a good portion of my PVR addon users, this really doesn't work in many cases.
For my PVR addon, I give the users a couple ways to combat this:
The first way, and the one I prefer, is an option "Use season/episode number as title for Recordings". My addon groups series into individual folders, so this works pretty well interface-wise and allows a Name sort to work. For example, in the folder "TV / Recordings / Bull" instead of a list item titled "Bull (Off the Rails)", the user will see "S04E18 (Off the Rails)". The primary downside to this, at least using Estuary skin, is that the Player interface will say "S04E18" instead of "Bull" like it should. The backend might not always have this information available as well, which can cause some undesirable funkiness.
The second way was added for folks that had a lot of programs without season/episode info or just didn't like the first way. This method replaces the recording date with the original air date, when available. Seemed like a fine idea when it was suggested to me, but it actually caused some unexpected problems (resolved, eventually), and I've grown to dislike it quite a bit. Other than programs lacking an original air date, my backend only provides a date not a date/time, so every recording will show up as if it recorded at midnight on that particular day if it works at all. My users like the option, but it's ugly and clearly appears as a hack. New users would probably think it's a defect, to be honest
Back in January I proposed a PR to add a sort method for Season/Episode (PR 17264), but that PR failed as @ksooo was spot-on with his analysis that adding a sort method for optional data cannot realistically be made to work. After getting the strFirstAired field added to PVR Recordings I've also spent a lot of time trying to make a similar sort for "First aired", but the same roadblock is there (it's an optional field and needs to stay that way), and I still wasn't satisfied with the end result.
I truly believe that the available sort methods aren't ideal for Recorded TV, and would really like to remove the weird hacks I have in place, so I would like to propose the following alternate "solution" to either get shot down once and for all, or more hopefully, turned into something viable I could contribute via a PR:
My opinion is that these changes would allow a PVR addon the flexibility to get Kodi to display the data in the best way possible based on what information the backend provides. Changing "Date" to %J omits the time component from the sort/display -- I believe that the time component is of little importance in this day and age, and this allows PVR addons to spoof the date if it wants to even if there is no time component available. Adding "Date/Time" gives the user the flexibility to go back to the way "Date" worked before. Adding "Year" provides the flexibility for the user to sort/view folders like "Movies" where the calendar date within the year is not necessarily important. If "Year" wasn't specified by the addon, the recordingTime year component can be used as a fallback.
I also think these changes would make sense for "Videos" in general and would probably attempt a PR at that level if anyone thinks this is at all viable. I don't see how displaying the time component of any video's date is all that interesting for the user, and the addition of "Year" seems like a nice add for all Video library items, since movies specifically are generally rolled up to that granularity.
Tagging @Fuzzard, @phunkyfish, and @emveepee in order to solicit their opinions and ideas -- thank you all!
One of the problems I've had with the PVR interface since getting into this is the inherent sorting limitations of the Recorded TV interface. Today we can sort by Name, Date (actually Date/Time - more on that later), Duration, File, and optionally Size. The problem I have with these options is that none of them provide the ability to show a series in production order. Date works OK if the user is able to record the episodes of a series as they air, but for me, and a good portion of my PVR addon users, this really doesn't work in many cases.
For my PVR addon, I give the users a couple ways to combat this:
The first way, and the one I prefer, is an option "Use season/episode number as title for Recordings". My addon groups series into individual folders, so this works pretty well interface-wise and allows a Name sort to work. For example, in the folder "TV / Recordings / Bull" instead of a list item titled "Bull (Off the Rails)", the user will see "S04E18 (Off the Rails)". The primary downside to this, at least using Estuary skin, is that the Player interface will say "S04E18" instead of "Bull" like it should. The backend might not always have this information available as well, which can cause some undesirable funkiness.
The second way was added for folks that had a lot of programs without season/episode info or just didn't like the first way. This method replaces the recording date with the original air date, when available. Seemed like a fine idea when it was suggested to me, but it actually caused some unexpected problems (resolved, eventually), and I've grown to dislike it quite a bit. Other than programs lacking an original air date, my backend only provides a date not a date/time, so every recording will show up as if it recorded at midnight on that particular day if it works at all. My users like the option, but it's ugly and clearly appears as a hack. New users would probably think it's a defect, to be honest
Back in January I proposed a PR to add a sort method for Season/Episode (PR 17264), but that PR failed as @ksooo was spot-on with his analysis that adding a sort method for optional data cannot realistically be made to work. After getting the strFirstAired field added to PVR Recordings I've also spent a lot of time trying to make a similar sort for "First aired", but the same roadblock is there (it's an optional field and needs to stay that way), and I still wasn't satisfied with the end result.
I truly believe that the available sort methods aren't ideal for Recorded TV, and would really like to remove the weird hacks I have in place, so I would like to propose the following alternate "solution" to either get shot down once and for all, or more hopefully, turned into something viable I could contribute via a PR:
- Change "Date" sort method to display just the date (%J - i.e. 2020.04.07) instead of the date/time, make this the default sort
- Add a "Date/Time" sort method to replace "Date" (%d - i.e. 2020.04.07 11:16:00PM)
- Add a "Year" sort method
My opinion is that these changes would allow a PVR addon the flexibility to get Kodi to display the data in the best way possible based on what information the backend provides. Changing "Date" to %J omits the time component from the sort/display -- I believe that the time component is of little importance in this day and age, and this allows PVR addons to spoof the date if it wants to even if there is no time component available. Adding "Date/Time" gives the user the flexibility to go back to the way "Date" worked before. Adding "Year" provides the flexibility for the user to sort/view folders like "Movies" where the calendar date within the year is not necessarily important. If "Year" wasn't specified by the addon, the recordingTime year component can be used as a fallback.
I also think these changes would make sense for "Videos" in general and would probably attempt a PR at that level if anyone thinks this is at all viable. I don't see how displaying the time component of any video's date is all that interesting for the user, and the addition of "Year" seems like a nice add for all Video library items, since movies specifically are generally rolled up to that granularity.
Tagging @Fuzzard, @phunkyfish, and @emveepee in order to solicit their opinions and ideas -- thank you all!