Jump to content
MikePlanet

Automatic version grouping for movies

Recommended Posts

MikePlanet

... as I was tired of manually grouping all my movie versions into groups after each recreation of the db, I created a plugin to help with that. 

The use case is having movies, that belong together spread around and not being able to easily match the emby naming conventions, but still having the desire to present them as one item with multiple versions.

The plugin works similar to the auto boxsets, but does the "movie versions grouping" - it will group all movies based on their TMDB id into one item, regardless of where they're placed and how they're named.

I made that for myself - however, if anybody is interested, attached is a plugin that solves this issue.

Attached version is for current 3.6.0.49 beta Server, do NOT use it with stable release!

Plugin is alpha state, you should only use it, if you are willing to backup your db (there is no way to revert the changes otherwise!) and manually put the dll in the server plugin directory.

Do not use it in your production environment before having tested in a test environment that you're fine with what it does - seriously! ;-).

Note: There is a known bug in the web GUI presentation which is described here, which needs to be fixed on emby side. 

 

Edit: the mentioned display bug in BoxSets is fixed in Emby now, thanks Luke.

AutoCollections-for3-6-0-49-betaServer.zip

AutoCollections-for3-6-0-75-betaServer.zip

AutoCollections-for-4.1.0.15-betaServer.zip

AutoCollections-for-4.2.0.17-betaServer.zip

Edited by MikePlanet
  • Like 17

Share this post


Link to post
Share on other sites
jaketame

Mike,

 

Looks like a good plugin...

 

What do you need for testing results to move forward to make it more stable?

What versions of Beta are supported?

Can you apply the plugin to a specific library or does it affect all libraries?

 

Thanks!

Share this post


Link to post
Share on other sites
MikePlanet

regarding more stable: I use it regulary (means it is installed - it does all it's magic in the background) and it works for me - for me personally it is stable enough ;-)

versions: emby server version 3.6.0.49+ - as this one had breaking changes for the plugin. Former versions need an older version of the plugin.

Re specific library: no, it will do the grouping for all movies based on their tmdb-id, regardless of their location.

If you add a movie to your library, it will check, if the movie already exists and group it with the existin one(s) - if there is already a collection, it will add it.

Edited by MikePlanet

Share this post


Link to post
Share on other sites
jaketame

Thats great thanks.

 

Where are logs incase of issues?

 

I'm running latest beta so no issues there.... I will install and report back.

 

Thanks

Share this post


Link to post
Share on other sites
MikePlanet

Where are logs incase of issues?

 

Log entries are written in the emby server log - as most plugins do

Share this post


Link to post
Share on other sites
jaketame

Just deployed this and worked instantly :) Will test within app now.

Share this post


Link to post
Share on other sites
BarryAmerika

I have installed this in Emby Version 3.6.0.76 beta - does anybody know if it still works with newer version? I can see the plugin but movies are not being grouped.

Share this post


Link to post
Share on other sites
MikePlanet

I have installed this in Emby Version 3.6.0.76 beta - does anybody know if it still works with newer version? I can see the plugin but movies are not being grouped.

 

It needs an update since beta 75, I uploaded a newer version to first post.

  • Like 1

Share this post


Link to post
Share on other sites
jaketame

@@Luke - Can we get something like this built in to span cross-directories for movies? Similar to TV Shows?

Share this post


Link to post
Share on other sites
Luke

It's possible for the future. thanks.

Share this post


Link to post
Share on other sites
raidz

Looks like this doesn't work in the newest version:

*** Error Report ***
	Version: 4.2.0.1
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
	Operating system: Unix 4.20.10.6
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 4
	Program data path: /var/lib/emby
	Application directory: /opt/emby-server/system
	System.MissingMethodException: System.MissingMethodException: Method not found: 'Int32 MediaBrowser.Controller.Entities.Video.get_MediaSourceCount()'.
	   at AutoCollections.Plugin.<>c.<UpdateCollection>b__24_0(Video i)
	   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
	   at AutoCollections.Plugin.UpdateCollection(IGrouping`2 collection)
	   at AutoCollections.Plugin.CreateAllCollections(IProgress`1 progress, CancellationToken cancellationToken)
	Source: AutoCollections
	TargetSite: Boolean <UpdateCollection>b__24_0(MediaBrowser.Controller.Entities.Video)

Possible for you to fix this op?

 

Thanks!

Share this post


Link to post
Share on other sites
MikePlanet

Looks like this doesn't work in the newest version:

*** Error Report ***
	Version: 4.2.0.1
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
	Operating system: Unix 4.20.10.6
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 4
	Program data path: /var/lib/emby
	Application directory: /opt/emby-server/system
	System.MissingMethodException: System.MissingMethodException: Method not found: 'Int32 MediaBrowser.Controller.Entities.Video.get_MediaSourceCount()'.
	   at AutoCollections.Plugin.<>c.<UpdateCollection>b__24_0(Video i)
	   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
	   at AutoCollections.Plugin.UpdateCollection(IGrouping`2 collection)
	   at AutoCollections.Plugin.CreateAllCollections(IProgress`1 progress, CancellationToken cancellationToken)
	Source: AutoCollections
	TargetSite: Boolean <UpdateCollection>b__24_0(MediaBrowser.Controller.Entities.Video)

Possible for you to fix this op?

 

Thanks!

I have attached an updated version to the first post, that I use with current 4.3.0.1 Server.

Edited by MikePlanet
  • Like 1

Share this post


Link to post
Share on other sites
raidz

I have attached an updated version to the first post, that I use with current 4.3.0.1 Server.

 

Thank you, much appreciated!

Share this post


Link to post
Share on other sites
rapteev

Hi

Just want to thank you.

Great plugin.

Share this post


Link to post
Share on other sites
jaketame

Hey Mike - Did you have the latest .dll available? The one in the first posted mark 4.1.0.15 doesn't work with Beta 4.2.0.18

2019-06-21 20:23:36.191 Error App: Error sending web socket message Sessions
*** Error Report ***
Version: 4.2.0.18
Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
Operating system: Unix 4.18.0.21
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///system/System.Private.CoreLib.dll
Processor count: 8
Program data path: /config
Application directory: /system
System.ObjectDisposedException: System.ObjectDisposedException: The CancellationTokenSource has been disposed.
   at System.Threading.CancellationTokenSource.ThrowObjectDisposedException()
   at System.Threading.CancellationTokenSource.get_Token()
   at MediaBrowser.Controller.Net.BasePeriodicWebSocketListener`2.SendData(Tuple`3 tuple)
Source: System.Private.CoreLib
TargetSite: Void ThrowObjectDisposedException()
Edited by jaketame

Share this post


Link to post
Share on other sites
jhalttu

Hi... Where Do I put this DLL on my QNAP?

Share this post


Link to post
Share on other sites
Happy2Play

Hi... Where Do I put this DLL on my QNAP?

 

Your log will tell you near the top.

 

From logs found in QNAP section

Program data path: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/programdata



/share/CACHEDEV1_DATA/.qpkg/EmbyServer/programdata/plugins
Edited by Happy2Play

Share this post


Link to post
Share on other sites
jhalttu

yeah... then I have to learn how to use putty/ftp, ie.. hehe. 

Share this post


Link to post
Share on other sites
jhalttu

I was not hard..

Just installed Putty

And used this command:

 

addshare EMBY "/share/CACHEDEV1_DATA/.qpkg/EmbyServer/programdata" -uw:admin

 

Then went to fileshare on Qnap and found new created EMBY folder.. Uploaded that .DLL ínside EMBY/Plug-ins/ folder..

REstarted EMBY...

 

IT works... I got rid of all copies of films and they are found under film as different versions

 

  5d0e9a337a6d7_Sieppaa.png

Edited by jhalttu
  • Like 1

Share this post


Link to post
Share on other sites
MikePlanet

 

Hey Mike - Did you have the latest .dll available? The one in the first posted mark 4.1.0.15 doesn't work with Beta 4.2.0.18

2019-06-21 20:23:36.191 Error App: Error sending web socket message Sessions
*** Error Report ***
Version: 4.2.0.18
Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
Operating system: Unix 4.18.0.21
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///system/System.Private.CoreLib.dll
Processor count: 8
Program data path: /config
Application directory: /system
System.ObjectDisposedException: System.ObjectDisposedException: The CancellationTokenSource has been disposed.
   at System.Threading.CancellationTokenSource.ThrowObjectDisposedException()
   at System.Threading.CancellationTokenSource.get_Token()
   at MediaBrowser.Controller.Net.BasePeriodicWebSocketListener`2.SendData(Tuple`3 tuple)
Source: System.Private.CoreLib
TargetSite: Void ThrowObjectDisposedException()

... I don't think the exception is related to the plugin; however, I updated the first post with a version that is compatible with current beta server.

Edited by MikePlanet

Share this post


Link to post
Share on other sites
Luke

Yes that's why it's important to make sure to attach complete log files rather than snippets. Thanks.

Share this post


Link to post
Share on other sites
jaketame

Thanks, sorry for not including all the logs!

  • Like 1

Share this post


Link to post
Share on other sites
Noustaa

Hello everyone,

Mike this plugins is a greaaaaaaaat idea omg ! THATS WHAT I NEEEEEED !

Please guys can someone tells me if it is working with current version ? (4.2.1.0) 

 

This feature should definitely be added as a native feature in emby! HUGE +1 !

  • Like 1

Share this post


Link to post
Share on other sites
jhr1948

@@MikePlanet I agree, just what I needed.  Going to try it out, just curious, will it ever be available for official releases?  Going to install beta to check it out.

 

Also, i'm new to Emby, but it seems there are numerous betas.  Do you know if your latest plugin (4.2.0.17) works with the latest Emby beta server?

Edited by jhr1948

Share this post


Link to post
Share on other sites
jhr1948

So I'm answering my own question, the latest AutoCollections is working with the most current beta.

 

@@Luke, Do you think Emby can ever integrate this natively?  It works well, the only issue I see is that it if i have  4K and 1080p version of a file, it groups those with together even though I have created 2 separate libraries in Emby: 4K and Movies (1080p/720p).  So in my 4k library all versions show up as options (1080p) and in my Movies Llibrary, all versions (including 4k) show up as options.

 

Not complaining, this cleaned up my library 10 fold

 

 

Thanks for your work @@MikePlanet

Edited by jhr1948

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...