Kodi Community Forum
Req Collapse duplicate items in library - 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: Req Collapse duplicate items in library (/showthread.php?tid=174503)



Collapse duplicate items in library - verysoftpaper - 2013-09-28

When multiple files of the same movie are scanned, of different resolutions for example, currently the movie appears multiple times in the library.

This request is so that movie gets presented only once, instead of appearing multiple times side by side
When the movie is selected to play, a dialog should appear which allows one of the versions to be chosen.

This feature is working already on PLEX.


RE: Collapse duplicate items in library - artrafael - 2013-09-29

Maybe create your own movie sets (wiki) to group together these duplicate movies?


RE: Collapse duplicate items in library - verysoftpaper - 2013-09-29

Can that be automatic?


RE: Collapse duplicate items in library - topfs2 - 2013-09-29

This is a wanted feature and I'm sure that a pull request providing this would be merged (given that the feature is written nicely and complies with our coding standards)


RE: Collapse duplicate items in library - jmarshall - 2013-09-30

I don't think that (abusing) the moviesets feature is the way to go, but it does provide a small workaround - what you don't get is the information content at the set level (just fanart, and some aggregate info).

Given various new features coming in, what is needed is a 1:N relationship between metadata items (movies/episodes/shows) and the media files on disk.

Unfortunately it's not as easy as it sounds, as there's quite a few places where we assume we know the real path of a movie, and use it directly. These need eliminating, as a movie may represent multiple items on disk. In some cases, just using the first path found will probably suffice, in others you need to use all paths, in others you don't need the path at all, thus there's a reasonable amount of care needed in this, and even with that, there's likely that a few things might break in the process.

i.e. this is something I spent a few hours looking at. I'll spend a few more hours figuring out where we rely on underlying paths, and document what the requirements of each of those spots is and push it up to a branch. I doubt I'll have time to get any changes made, but you never know.

Cheers,
Jonathan


RE: Collapse duplicate items in library - Hedda - 2013-10-01

Will the new improved Database Layout being work on for GSOC 2013 make implementing this simpler? http://forum.xbmc.org/showthread.php?tid=165929

And this other unified library view project for GSOC 2013 also seems somewhat related? http://forum.xbmc.org/showthread.php?tid=165024


RE: Collapse duplicate items in library - jmarshall - 2013-10-01

No, it won't make it simpler to implement, but they are another reason why it needs to be done. The "new features coming in" I was referring to was in particular the second.

My post was referring to changes required outside of the database in order to get this working: i.e. we need to remove the assumption that given a videodb:// item, you also have the path to the file. In the multiple-files-per-item case, we at worse have multiple paths (so how does one choose the right one) and ideally have no path (as retrieving multiple paths from the database is not efficient via a single query).

There's around 100 places in the code where we currently assume we have the path. The goal is to eliminate as much of that as possible.