Kodi Community Forum
Movie Sets Collection Grouping for Video Database Library Custom Sort Order Filters? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Movie Sets Collection Grouping for Video Database Library Custom Sort Order Filters? (/showthread.php?tid=14476)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


- joelmeans - 2009-08-28

Code:
<sets>
  <set>Alien Collection</set>
  <set>Predator Collection</set>
  <set order="4">Another Set</set>
</sets>

Okay, I just submitted a pair of patches to implement set support using the above format. The only difference is that you must include the "order" attribute. (Really, I didn't test what would happen if you left it out. It will probably just sort alphabetically, but I would think you would want it in there anyway). One patch does the database and .nfo stuff, the other adds a "Sets" group to the movie overview screen.

How I would like to see this work eventually is to have an option to view sets instead of the constituent movies listed in the "Titles" view. So, for example, instead of this:

Code:
Good Will Hunting
The Green Mile
Gross Anatomy
Harry Potter and the Sorcerer's Stone
Harry Potter and the Chamber of Secrets
Harry Potter and the Prisoner of Azkaban
Harry Potter and the Goblet of Fire
Heat
The Holiday
Hoot

you would have this:

Code:
Good Will Hunting
The Green Mile
Gross Anatomy
Harry Potter (Set)
Heat
The Holiday
Hoot

and clicking on "Harry Potter (Set)" would take you to a listing with:

Code:
Harry Potter and the Sorcerer's Stone
Harry Potter and the Chamber of Secrets
Harry Potter and the Prisoner of Azkaban
Harry Potter and the Goblet of Fire

I am open to other suggestions for this. It will not be easy to implement with the way the views currently work. So don't expect this to be done quickly unless a dev with greater knowledge than me knows a simple way to do it and wants to.

Anyway, the patches can be found here: http://trac.xbmc.org/ticket/7106, for those brave enough to try it out. And if you do, please report any bugs in the trac ticket.

Thanks,
Joel


- indy5 - 2009-08-28

joelmeans Wrote:[CODE]<sets>


Anyway, the patches can be found here: http://trac.xbmc.org/ticket/7106, for those brave enough to try it out. And if you do, please report any bugs in the trac ticket.

Thanks,
Joel

Would we need a skin to support this?

Can't wait for this to be implemented!


- joelmeans - 2009-08-28

indy5 Wrote:Would we need a skin to support this?

Can't wait for this to be implemented!

No, it will work with the current skins (at least it works with PM3-HD). If you really can't wait, grab a copy of the SVN trunk and the patches and go to town!


- jmarshall - 2009-08-29

Right, carrying on from discussion in the trac ticket, the order attribute complicates the code quite a bit.

Is this essential? I can't think of any case where the order would change between multiple sets that contain the same movie, thus using the sortorder for the movie would do just as well.

To summarize:

1. We already support reordering via the <sorttitle> tag.
2. Most movies will be in zero or one sets only, whereby <sorttitle> suffices.
3. The few movies that may be in more than one set are likely to be ordered in the same way in all of those sets (i.e. ordered by the year of release for instance).

Thus, no need for the order attribute, and "sets" can be treated in the same way as "genres", "directors", "writers", "studios", "tags", and the multitude of other arbitrary ways of grouping things that you may wish to come up with.

This will also allow trivial addition of the "sets" to the listings of movies (so when you highlight "Goldeneye" it'll tell you it's part of the James Bond set.)

If we further restrict it to just a single set per movie (which covers 99.9% of the usage cases) then automatic "stacking" of sets when listing your movies is also very easy to accomplish, though this is doable in the case of multiple sets per movie as well (but IMO is far messier from an aesthetic point of view.)

Cheers,
Jonathan


- openricky - 2009-08-29

just to play devil's advocate here: wouldn't AVP be "sort order 5" in the aliens set and "sort order 3" in the predator set?


- jmarshall - 2009-08-29

The sort number is inconsequential. The question is, do the movies in those two sets sort differently?

One presumes that both series sort in the order in which the movies were released, thus using either <year> or the <sorttitle> tag will do the trick.

Ofcourse, there's a question of whether you even want them sorted by "set order" when viewing a set anyway (in a large set such as the James Bond movies, one may wish it sorted by title at that point to allow ease of finding the one you want).


- joelmeans - 2009-08-29

jmarshall Wrote:One presumes that both series sort in the order in which the movies were released, thus using either <year> or the <sorttitle> tag will do the trick.

Ofcourse, there's a question of whether you even want them sorted by "set order" when viewing a set anyway (in a large set such as the James Bond movies, one may wish it sorted by title at that point to allow ease of finding the one you want).

Could we make it selectable which way the sorting is done? For most sets, by year is great, but for Star Wars, it becomes a problem. For most sets, by sorttitle is great, but for AVP it becomes a problem. And you are right about the James Bond set. I can see wanting those in alphabetical order rather than chronological. As it is, in the "Titles" section, you can sort by name, year, or rating. We could allow sorting of sets by name (sorttitle) or year.


- jmarshall - 2009-08-29

Once you click on a set, you're in a different path from the library, so different sorting modes can be applied - this is what the GUIViewState class handles. You just grab the params based on the path, which gives you that the setid has been specified, and make sure sort by year and sort by title are the main options (you can probably set the default to year if you think that makes sense.)

The user can then choose the sort method for themselves.

Cheers,
Jonathan


- joelmeans - 2009-08-29

I have a busy weekend, but I will see about doing it this way when I get a chance.
Joel


- blacklist - 2009-08-29

Not to hijack this idea, because I'm very excited about the implementation - but could the ability to edit these movie "sets" also lead to the ability to edit things like genres (including adding custom genre's) directly from the interface?


- jmarshall - 2009-08-30

No, that has nothing to do with this. There is no editing available as of now.

Obviously if and when editing is added, it'll be available for everything. This is a larger undertaking, however, as skins would all need updating.

Cheers,
Jonathan


- joelmeans - 2009-09-01

Alright. I uploaded new patches which drop the set order parameter*. Sorting is now done by year (default) or name (sorttitle if it exists, title otherwise). This should cover any situation fine. I also cleaned up a little code which added an extra unnecessary query for every movie in a collection. (That what happens when I copy and modify code without really checking to see what it doesRolleyes). Anyway, these new patches are much simpler and cleaner. Hopefully, they will be worthy of inclusion in SVN.
Joel

* Note that .nfo files with the "order" attribute will still work fine. It is just ignored. But xbmc will not write the "order" attribute to new .nfo files when exporting your library.


- indy5 - 2009-09-17

Any news on this patch being completed? Just looking forward to it.


- indy5 - 2009-09-24

Now that the patch is in svn, what would have to take place to have grouping somehow added to the Title view, so we can see the sets listed among individual movie titles.

Thanks for any insight.


- jmarshall - 2009-09-24

A patch.