Manually sort stacks (1 Viewer)

BennTech

Portal Member
February 8, 2008
18
2
Home Country
United States of America United States of America
I'm looking for a way to manually sort stacks. Sorting movies based on file name, e.g., movie.cd1.avi and movie.cd1.avi, works fine. However, I have some movies where I ripped the extras, which I usually keep in an Extras subfolder. When I add these extras to the movie, the files are played alphabetically, which may not be the desired order.

I know most of you will just say to rename the files, but that gets messy. For example, if I have "Movie.avi", I obviously have to rename all my other files to start with "Movie". Then what? If I make them something like "Movie - Deleted Scene 1.avi", the space sorts before the period ("Movie - ..." sorts before "Movie.avi"), so that won't work. Guess I'll have to name it "Movie.Deleted Scene 1.avi", but if my movie is "Movie.mkv", that still won't work because "Movie.Del..." sorts before "Movie.mkv". Ugh! WTF? Why can't I just tell MP how I want them sorted?

Anybody know of a way to do this without the messy filenaming?[DOUBLEPOST=1385087915][/DOUBLEPOST]IMHO, the best way to do this is to let the user specify the ordering in MediaPortal Configuration > Videos > Video Database > Editor > Files via some up & down buttons. Internally, this would require a new index to maintain the user-defined order. I haven't looked at the code, but I did poke around in VideoDatabaseV5.db3. Looks like the table files would need a new column, e.g., iOrder, to keep track of stack ordering. Then MediaPortal itself would need to load this and use it to sort stacks. For backwards compatibility, if this field is blank, just sort using the traditional method (alphabetically). Seems like a relatively easy change, although it would require database modification. Would adding a single column to a table change the entire database to a new version, e.g., VideoDatabaseV6.db3? I dunno...MP developers?

And FYI, I have this working in XBMC with a crappy hack. In the XBMC video database, stacks are stored in a comma-delimited string in the form: "stack://X:\path\movie.cd1.avi , X:\path\movie.cd2.avi". I just edit the field and arrange the filenames how I want them (and even stack across directories which XBMC doesn't normally allow). Tedious and not for the average user. (Note XBMC's space then comma then space delimiter. This would likely never occur in a movie filename, but *could* and thus break stacking. In contrast, the MediaPortal's files table is a much better design, but unfortunately currently lacks any method for user-defined sorting.)

Anybody interested in user-defined stack sorting? Speak now! (BTW, I could probably help with the development...and while I'm there fix the damn tab ordering on those editor screens.)
 
Last edited:

Users who are viewing this thread

Top Bottom