WIP Merging Duplicate Movies/TV Episodes
#16
(2015-04-07, 11:03)Montellese Wrote:
(2015-04-07, 09:36)rsanger Wrote: I will try to remove CFileItemList, I'll probably end up putting some extra fields into CFileItem to hold the paths(but not the full CFileItems). I don't know the code very well and wouldn't want to break things with this change.
I still don't see why you need all the paths in the CFileItem. You only really need them when you want to play/queue the item and then you can simply get all the paths that you need. The only disadvantage I can see with that approach is that it needs to be handled differently for video and music items.
Yes in the simplest case it is not needed i.e. If we deal with duplicates like movie sets do and always open a directory of all the choices it is not needed.
However we miss out on some niceties:
1. With this solution we don't get a stream quality indicator (without say searching for items in the database anyway at such point we might as well cache them against the item).
2. I also personally like the idea of being able to set this to automatically pick the "Best" and have give me that without having to open up an item. Which also allows for options to "Play from here" etc.
I do have a working version of both 1. and 2. this implemented currently, so if you find the time to give this a try it would be great (either the windows build or grab it from github).

You clearly have much more experience with the Kodi code than me and if you don't think this is worth pursuing or should be implemented differently let me know.

(2015-04-07, 11:03)Montellese Wrote:
(2015-04-07, 09:36)rsanger Wrote: I've noticed that the existing Context Menu->Manage->Edit Title already does this.

Yes but that will not work without adjustments as it will adjust the title of the movie but that will affect all versions because we only store that information once and link the different files to that information. So we'll need a way to store an additional version-specific title.

Hmmm... I just tried this with movies and TV-shows and it seems to be stored per item. My modifications have been based off Kodi master not your branch which had the database changes.

Thanks for all the help,
Richard
Reply
#17
(2015-04-07, 11:35)rsanger Wrote: Yes in the simplest case it is not needed i.e. If we deal with duplicates like movie sets do and always open a directory of all the choices it is not needed.
However we miss out on some niceties:
1. With this solution we don't get a stream quality indicator (without say searching for items in the database anyway at such point we might as well cache them against the item).
2. I also personally like the idea of being able to set this to automatically pick the "Best" and have give me that without having to open up an item. Which also allows for options to "Play from here" etc.
I do have a working version of both 1. and 2. this implemented currently, so if you find the time to give this a try it would be great (either the windows build or grab it from github).

You clearly have much more experience with the Kodi code than me and if you don't think this is worth pursuing or should be implemented differently let me know.
Concerning 1. are you refering to the flags displayed by the skin in the library view?
Concerning 2. that is still possible. You simply need to grab all paths and streamdetails when the user wants to play such an item. But I think I see the confusion. This is much easier done with my approach because there you can easily get all paths for a specific item from the database. With your approach you can't easily do that because the grouping is not mapped to the database.

(2015-04-07, 11:03)Montellese Wrote: Hmmm... I just tried this with movies and TV-shows and it seems to be stored per item. My modifications have been based off Kodi master not your branch which had the database changes.
Yes in that case it works but with my approach it won't without additional changes.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#18
(2015-04-07, 11:41)Montellese Wrote: Concerning 1. are you refering to the flags displayed by the skin in the library view?

Yes the flags displayed by the skin which are loaded by Kodi in the background.

(2015-04-07, 11:41)Montellese Wrote: Concerning 2. that is still possible. You simply need to grab all paths and streamdetails when the user wants to play such an item. But I think I see the confusion. This is much easier done with my approach because there you can easily get all paths for a specific item from the database. With your approach you can't easily do that because the grouping is not mapped to the database.

Ok in that case do you have any suggestions of the best place to hook into the play command to achieve correctly?
I've found my approach ends up fairly easy because it essentially treats each item separately and once we have them all we merge them all into a single item.

Thanks
Reply
#19
Sorry to bother but I wonder if there any new version of this fantastic mod available?
Just want to try it with official newly-released Kodi 15)
Reply
#20
Hey dron2000,

Here's a Windows build of the Kodi 15 release, I've simply merged these changes into the 15.0 release. After some very quick testing it seems all is working correctly. I've also updated this in my github, if you need other builds of it.

I've lost a bit of momentum with this, (getting busy with other things) however would still like to get this into Kodi at some point.
It's good to see others interested in this Smile
Reply
#21
Thank You very much.
I am glad to hear that You are looking continue this awesome project.
Reply
#22
If I'm running Kodi 14.2, what's the best version of this that I should use?
Reply
#23
This or something similar has to be implemented in future kodi builds. Necessary feature!
Reply
#24
I have been using this mod since Helix and was hoping that Jarvis would include this useful feature. But unfortunately there is no such change so far.
So I wonder if there is a new version of this awesome build for Jarvis. It would be fantastic.

Rsanger, thank You again for making KODi better
Reply
#25
It's been a while since I've looked at this, but I'll have another crack at it this week and merge the changes into Jarvis.
If I can get it far enough I'll try getting it merged in this release Smile
Reply
#26
(2015-10-10, 22:35)Magic815 Wrote: If I'm running Kodi 14.2, what's the best version of this that I should use?

Sorry for the slow reply.

There is a 14.1 windows build here, which *should* work with your existing database. Otherwise if you feel like updating try the 15.0 build (I think the patch applied is the same for both).

I'm going to try spend some more time on this and merge everything into the upcoming Jarvis (16.0), hopefully I can try get it accepted into the release.
Reply
#27
(2015-11-17, 13:15)rsanger Wrote: It's been a while since I've looked at this, but I'll have another crack at it this week and merge the changes into Jarvis.
If I can get it far enough I'll try getting it merged in this release Smile

For jarvis is too late..They're in beta so feature freeze.. maybe for k...
Reply
#28
(2015-11-17, 13:15)rsanger Wrote: It's been a while since I've looked at this, but I'll have another crack at it this week and merge the changes into Jarvis.
If I can get it far enough I'll try getting it merged in this release Smile
Thank You for reply. That will be great to continue use your mod in Jarvis)
Reply
#29
New windows build here (source).

Remember to backup your running configuration before trying, while this makes no additional (beyond those already in Jarvis) changes to the database, it never hurts.

As before the settings to control this live in Settings->Videos->Library->Group identical(movies/TV episodes) from different sources.

This updated version is based on Jarvis Beta2(ish) commit.

Let me know how this implementation looks - somethings still need to be tidied in the code, but the implementation is pretty much where I want it now.
  • When using 'Aways Ask' does it make sense display these as a set in the confluence skin or would it be better to show media quality? (It does make it easier to identify duplicates)
  • I've shortened how duplicate file paths are compared, now if the beginning is matching it is replaced with ellipses, do you like this?
  • Let me know of any inconsistencies in terms of style, naming etc.

The main change in this version is that it moves the grouping away from the database code moving it closer to where it is displayed which has fixed a lot of little issues:
  • This fixes an issue with grouped items being cached to disk (due to slow loading) rendering the option to enable and disable duplicates useless
  • Fixes some inconsistencies with the name displayed when sorting etc.
  • Fixes issues with web UI since these are now applied after
  • Fixes sorting order within TV shows
  • Possibly more efficient because movies sets and duplicates are merged at the same time
Reply
#30
Hello,

Only work in windows?

Someone know if is there a similar addon in mac?

Thanks in advance.
Reply

Logout Mark Read Team Forum Stats Members Help
Merging Duplicate Movies/TV Episodes1