Sort by episode
Brought to you by:
jmaggard
Hi,
Would it be possible to add the ability to force_sort_criteria by season/episode?
Most nfo file generators create something like this: <?xml version="1.0" encoding="utf-8"?> <episodedetails> <title>Pilot</title> <runtime>2583</runtime> <aired>2015-11-08</aired> <rating>7.3</rating> <season>1</season> <episode>1</episode> [etc] </episodedetails>
It'd be greate to be able to force the sort criteria by season and episode instead of having all of the mixed.
Thanks!
Here is a simple hack that adds this feature. Use the force_sort_criteria=+upnp:originalTrackNumber to sort. Add the metadata using the xml tags:
Last edit: Shrimpkin 2016-01-20
Hi! I`am struggling with the same problem. This first patch is not working on some clients. In my case a SamsungTV. This one sorts everything back in alphabetic order, even if the patch is applied and database is rescanned.
I have added a hardcoded patch which works good for me, tested on a big mixed video file database. I`am not a programmer or anything else, so my c coding is maybe worse ;-)
The patch adds season and episode number to the name itself, if such info is present.
After applied patch and database rescan the episodes shoud be sorted by name in this way:
"S01E01 - Series"
rg
Last edit: Mario Lange 2016-01-28
There is code posted in the forums to modify titles with alt_title in upnpsoap.c:callback(). Simply modify to use video and samsung client. IMO, it is better to modify in callback than on scan since you will be able to limit title modification to clients that actually need it. Look in patches.
Hi, this patch also gve me error..
root@DietPi:/home/dietpi/minidlna-1.2.1# patch -p1 < episode-sorting.patch
patching file metadata.c
Hunk #1 succeeded at 237 with fuzz 2 (offset 9 lines).
Hunk #2 FAILED at 1555.
1 out of 2 hunks FAILED -- saving rejects to file metadata.c.rej
episode-sorting.patch from Shrimpkin
if you want to update patch can you please add "S" 1 and "E" 1 to be seen when browsing episodes.. thanks
This is implemented in master now. You can set season and episode in the nfo files, and sort by upnp:episodeNumber. We'll also try to glean the season and episode numbers from filenames if they're not set in an nfo file.
Also, check the upated man page for how to force sort on clients that do their own alphanumeric sorting.