bennettpeter / android-MythTV-Leanfront

:tv: MythTV Android TV frontend
GNU General Public License v3.0
45 stars 9 forks source link

Sort Feature for Season/Episode #87

Closed jfabernathy closed 9 months ago

jfabernathy commented 9 months ago

Feature request:

I have a couple of complete series that were originally recorded as reruns over a period of several years until I have the complete collection. I ran comm flag on them and then manually edited using mythfrontend to fix all the commercial breaks. I then transcoded them all to mv4 H.264 using my own version of a Mythtv Forum script call sendTVtoNAS.sh

These series are now in my "Videos" storage directory so Leanfront sees them. Below is a short partial list of what the files look like. The sendTVtoNAS fixed the titles so the Season and Episode is in the title.

'The Big Bang Theory - s4e10 - The Alien Parasite Hypothesis.m4v'
'The Big Bang Theory - s4e11 - The Justice League Recombination.m4v'
'The Big Bang Theory - s4e12 - The Bus Pants Utilization.m4v'
'The Big Bang Theory - s4e13 - The Love Car Displacement.m4v'
'The Big Bang Theory - s4e14 - The Thespian Catalyst.m4v'
'The Big Bang Theory - s4e15 - The Benefactor Factor.m4v'
'The Big Bang Theory - s4e16 - The Cohabitation Formulation.m4v'
'The Big Bang Theory - s4e17 - The Toast Derivation.m4v'
'The Big Bang Theory - s4e18 - The Prestidigitation Approximation.m4v'
'The Big Bang Theory - s4e19 - The Zarnecki Incursion.m4v'
'The Big Bang Theory - s4e1 - The Robotic Manipulation.m4v'
'The Big Bang Theory - s4e20 - The Herb Garden Germination.m4v'
'The Big Bang Theory - s4e21 - The Agreement Dissection.m4v'
'The Big Bang Theory - s4e22 - The Wildebeest Implementation.m4v'
'The Big Bang Theory - s4e23 - The Engagement Reaction.m4v'
'The Big Bang Theory - s4e2 - The Cruciferous Vegetable Amplification.m4v'
'The Big Bang Theory - s4e3 - The Zazzy Substitution.m4v'
'The Big Bang Theory - s4e4 - The Hot Troll Deviation.m4v'
'The Big Bang Theory - s4e5 - The Desperation Emanation.m4v'
'The Big Bang Theory - s4e6 - The Irish Pub Formulation.m4v'
'The Big Bang Theory - s4e7 - The Apology Insufficiency.m4v'
'The Big Bang Theory - s4e8 - The 21-Second Excitation.m4v'
'The Big Bang Theory - s4e9 - The Boyfriend Complexity.m4v'
'The Big Bang Theory - s5e10 - The Flaming Spittoon Acquisition.m4v'

Currently the way these 200+ recordings are listed in Leanfront is hard to navigate. The list starts with: Season 10, 11, 12, 1, 2, 3, .....

Within a season, the episodes are 10, 11, 12, 13, 14, 15, 16, .17. 18. 19, 1, 20, 21, 22, 23, 24, 2, 3, 4, 5, ......

Using mythfrontend to view these same videos shows them is correct season 1 to 12 and the episodes are in the 1-24 correct order.

Kodi also shows them correctly ordered.

I'm guessing I could also rename the s4e4 to s04e04.?

bennettpeter commented 9 months ago

Leanfront sorts using the metadata from the database. It sorts by Release date. If there is no Release Date it sorts by season and episode. If there is no season and episode it sorts by file name.

Go to the web app and look if the season and episode are filled in, and if the release date is filled in.

When you add videos if it looks up the metadata it will fill season, episode, and release date correctly.

If it is not filling them in

jfabernathy commented 9 months ago

So I went to the webapp since this is a V34 master system. All but one of the videos under 'The Big Bang Theory' has Season/Episode and release date. The one exception had only the Season/episode, no release date. In fact if I use mythfrontend, watch video, the one exception has no metadata except season and episode; no banner or description. I switched to TheTVDatabaseV4 and Perform metadata update after video scan is enabled.

Since I have Season/episode and release date for all but one of my videos what else do I do?

bennettpeter commented 9 months ago

Sorry, my apologies, you are right. It is sorting by file name.

I got it confused with the rules for recordings.

There may be some reason I had to sort by file name. I will look into it.

In the meantime you will have to put leading zeroes into your season and episode numbers.

jfabernathy commented 9 months ago

The Web app sort by file name has the season and episode in the right order. s1e1 us before s10e1. Leanfront seems to sort differently

jfabernathy commented 9 months ago

BTW, your method of moving a video out of the normal Videos directory, then scanvideo allowed me to fix the offending video without a Release date. When I moved it back in and run scanvideo, it fixed that.

jfabernathy commented 9 months ago

So on Videos the sort must be Filename only and not release date. the Web App shows I have Season/episode info as well as release date for all recordings. There is also a subtitle.

However, I fixed my problem by renaming all files so the season/episode were all 2 digits.

jfabernathy commented 9 months ago

I've been thinking more about this sort feature request. The category in question is the Videos. I'll attach 2 screenshots showing the Web App Video tab view of this particular TV series that I converted to m4v and saved all 278 episodes. One screenshot shows the release date sort ascending and the other descending.

You'll also see that the Subtitle and season/episode is in the database. So now that I've fixed my file names Leanfront shows a correct ascending list by release date or season/episode since they are the same in this case.

If there is a service API that can retrieve either season/episode or release date it should be able to sort the shows without a care about the filename?? maybe??

One thing that mythfrontend and Kodi do that I like is breaking the list with sub categories on Seasons. This would allow you to get to a season more directly.

Screenshot from 2024-02-01 08-58-25 Screenshot from 2024-02-01 08-59-17

bennettpeter commented 9 months ago

I can't see how mythfrontend separates seasons. Here is a video directory with season 3 and season 4 together with no separation. You can separate series and seasons by using sub-directories. I use 1 directory per series but you can have one directory per season if you prefer. Screenshot_2024-02-02_20-27-12

jfabernathy commented 9 months ago

I maybe confusing mythfrontend with Kodi

jfabernathy commented 9 months ago

I double checked It's Kodi that automatically separates the seasons without needing a separate directory per season.

bennettpeter commented 9 months ago

Fixed in v0-481-g2f4a197-m1.2.1-2-gc3114cd837