Jump to content

Automatic version grouping for movies


MikePlanet

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 (4.6.0.10 and before)

4.6.4.0 and above (does not require beta server as version number has been surpassed)

AutoCollections-for-4.6.0.22-betaServer.zip

Note:  Original version will cause issue with other new plugins like Top Picks.

 

New update thanks to @Cheesegeezer

Looks like we've managed to update the plugin, to be current Emby Server 4.7.7 (minimum)

Some Changes to be aware of

  1. Automatic Library scan and updates are disabled, too many things are triggering library scans at the moment and entering into an endless loop which will crash the server. 
  2. Moved to a Scheduled task now.
  3. Fully Locked item Metadata can be ignored in the Plugin Settings for grouping.  (Partial field may have worked before but you need to Lock the item itself now)
  4. ".strm" files are ignored from any processing
  5. New plugin Graphics with a big nod to MikePlanet
  6. This is always Mikes plugin and the work he has done is fantastic.  - We only did essential maintenance to keep this alive for you peeps.

AutoCollections_1.0.0.4.zip

 

V1.0.0.5

  1. Removed Top Pick Items from the available item list
  2. re introduced the auto scanning... this will take place 1 min after an item event is detected
  3. re introduced auto run after a library scan
  4. tested against top pick plugin and there is no endless looping... but please test
  5. fixed the locked items bug.

Good luck and let me know how the testing goes.

AutoCollections.v1.0.0.5.zip

Edited by GrimReaper
Formatting
  • Like 29
  • Thanks 3
Link to comment
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!

Link to comment
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
Link to comment
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

Link to comment
Share on other sites

MikePlanet

Where are logs incase of issues?

 

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

Link to comment
Share on other sites

  • 2 months later...
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.

Link to comment
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
Link to comment
Share on other sites

  • 5 weeks later...
  • 3 months later...
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!

Link to comment
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
Link to comment
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!

Link to comment
Share on other sites

  • 1 month later...
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...
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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 months later...
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
Link to comment
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
Link to comment
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
Link to comment
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...