Jump to content

Automatic version grouping for movies


MikePlanet

Recommended Posts

Happy2Play
2 minutes ago, bblick said:

Gooood afternoon!

When you say that this plug-in works by identifying the IMDB id, does it need to be in the filename or does the plug-in scrape for information?

When I run the plug-in, it doesn't seem to do anything at all... I still have to manually group all my versions. I ask because I don't have the ID in the filenames of any of my movies.

It uses the Server gotten metadata as this is done in the database.

Which plugin are you using?

Can you go over a specific example.

Link to comment
Share on other sites

I believe I'm using Auto Movie Version Collections 1.0.0.4.

Another weird issue is that when I go in and manually run the plug-in it will UNgroup things I've previously grouped.

As for examples, I have multiple versions of the dark knight trilogy and upon running "batman begins" is broken out of group after it was passed over in a previous run and I manually grouped afterwards. 

--update--

Checking in the metadata manager, it appears the ID's are the same for these movies.  Where can I find log output for the plug-in? I have a couple john wick movies with multiple versions right now that when I run the plug-in they remain untouched. The plug-in is not set to "ignore if movie is locked" and the other movies that I've had to re-group numerous times still appear to be grouped this time...

Edited by bblick
update
Link to comment
Share on other sites

Happy2Play
13 minutes ago, bblick said:

Where can I find log output for the plug-in? 

In the server log.

You will probably get better results from v1.0.0.0 (4.6.0.22) zip on first page.  

But have not seen any items get ungrouped that were grouped but specific example for @Cheesegeezerwould be needed.

Link to comment
Share on other sites

Forgive me, but I can't figure out if there's a way to search threads on this forum...

It looks like I'm getting permission denied errors when trying to run AutoCollections. What's weird is that when it attempts to read info on certain items, it separates them from the grouping they're already in.

It's only finding 7 of the movies I have with multiple versions, then when it attempts (and fails) to "regroup" them it ends up separating about 5 of the 7.

I've attached the relevant server log section.

embyserver.txt

Link to comment
Share on other sites

Happy2Play
30 minutes ago, bblick said:

Forgive me, but I can't figure out if there's a way to search threads on this forum...

It looks like I'm getting permission denied errors when trying to run AutoCollections. What's weird is that when it attempts to read info on certain items, it separates them from the grouping they're already in.

It's only finding 7 of the movies I have with multiple versions, then when it attempts (and fails) to "regroup" them it ends up separating about 5 of the 7.

I've attached the relevant server log section.

embyserver.txt 77.9 kB · 0 downloads

Looks like you potentially have corrupt nfo files and no permissions to save/update them.

But @Cheesegeezerwill have to comment more on the plugin side.

Last resort you downgrade to original version (4.6.0.22) in first post.  But don't believe that will have any bearing on nfo reading errors or permissions issues.

  • Agree 1
Link to comment
Share on other sites

Cheesegeezer
On 23/11/2022 at 02:48, Happy2Play said:

Looks like you potentially have corrupt nfo files and no permissions to save/update them.

But @Cheesegeezerwill have to comment more on the plugin side.

Last resort you downgrade to original version (4.6.0.22) in first post.  But don't believe that will have any bearing on nfo reading errors or permissions issues.

Just had a look at the log.  And agree.

@bblick  Are you using TinyMediaManager?  Although they conform to the standards laid out by XBMC (Kodi) - I have raised some tickets with their xml formatting because it DOES NOT actually confirm to xml standards.

However the big worry is why your files are not accessable.

If you can send the Batman Begins nfo, i can take a look at it.

 

 

Edited by Cheesegeezer
Link to comment
Share on other sites

GrimReaper

Your Batman NFOs are not only TMM made, you have some other software writing there. 

Bumblebee and District 9 are, and you have 

<lockdata>true</lockdata>

that prevents any metadata change. You can change that in TMM settings and rewrite NFOs subsequently (right click>Enhanced editing). 

Edited by GrimReaper
  • Like 1
  • Agree 1
Link to comment
Share on other sites

Cheesegeezer
14 minutes ago, bblick said:

I am indeed using TMM... I've attached the nfo file here along with 2 other movies who's versions don't seem to want to group. 

NFO Files.zip 26.56 kB · 1 download

Thanks for the upload and have to agree with Grimmy's comments.

TMM cause a lot of problems with Emby Metadata, however if you have multiple softwares writing to the NFO they will become fragmented and impossible for software writers to cover all bases.  As i understand it, Emby should conform to the XBMC standards laid out for their NFO's, however they don't.  Someone correct me here, if i'm wrong.

 

2 minutes ago, GrimReaper said:

Your Batman NFOs are not only TMM made, you have some other software writing there. 

Bumblebee and District 9 are, and you have 

<lockdata>true</lockdata>

that prevents any metadata change. You can change that in TMT settings and rewrite NFOs subsequently (right click>Enhanced editing). 

Cheers fella :D 

  • Like 1
Link to comment
Share on other sites

GrimReaper
5 minutes ago, Cheesegeezer said:

TMM cause a lot of problems with Emby Metadat

I'll have to disagree there as TMM is very strict (and current) in conforming to Kodi standards/convention - main problem is it's sh*itload full of options that users often disregard or set improperly hence issues arising. As far as Emby goes, with proper TMM setup issues are practically non-existent (and beleive me, I've learned that the hard way, unfortunately). 🥴

  • Like 2
Link to comment
Share on other sites

Interesting!

I'm not sure what other software could be writing to these nfo files. I only use TMM and I'm pretty sure I turned everything Emby does in relation to metadata off... I'll take a look and see if unlocking/rewriting does the trick here.

  • Thanks 1
Link to comment
Share on other sites

Cheesegeezer
53 minutes ago, GrimReaper said:

I'll have to disagree there as TMM is very strict (and current) in conforming to Kodi standards/convention - main problem is it's sh*itload full of options that users often disregard or set improperly hence issues arising. As far as Emby goes, with proper TMM setup issues are practically non-existent (and beleive me, I've learned that the hard way, unfortunately). 🥴

No worries, however it doesn't conform to multiepisodes Kodi Formats.  In a way this is a good thing.  Especially for my Intros Backup Plugin, however the people that use TMM are goosed because there are 2 root elements in the xml which throws an error, when trying to read it.

 

  • Like 1
Link to comment
Share on other sites

GrimReaper
19 minutes ago, Cheesegeezer said:

however it doesn't conform to multiepisodes Kodi

Nope, Emby doesn't, and there's long standing thread about it here on forums, but at least TMM started to write <episodenumberend> for Emby users' sake, so it does mitigate it a bit. Though IMHO it's Emby who's at fault here (and I know @Happy2Play will wholeheartedly disagree with me as it'd break his setup otherwise 😉). 

Edited by GrimReaper
  • Haha 3
Link to comment
Share on other sites

So I did actually have TMM adding "locked" to the NFO, but the motivation here was to prevent emby from making any metadata changes. I also thought that this was what the "ignore if movie is locked" toggle was for in Auto Group?

I can turn this off and rewrite the nfos that are having issues. The logs seem to imply that access to the file itself is denied, this wouldn't seem like something resulting from an xml element inside the file, but that's just a guess.

As far as multiepisodes issue, how are we left goosed.... i don't want to be goosed!

Link to comment
Share on other sites

Cheesegeezer
3 minutes ago, bblick said:

 

As far as multiepisodes issue, how are we left goosed.... i don't want to be goosed!

Just for the intros Backup plugin... I can't handle the malformed XML for multiepisode, which means i can read or write to these nfo files... anyways this is off topic for this thread.

Check out the Intros  Backup plugin thread for more info

Link to comment
Share on other sites

No worries, I'll take a peek.

As for the assumption I made regarding "Ignore if movie is locked," was I understanding that correctly?

Was my assumption also correct regarding the <locked> tag preventing file access all together to the plugin?

Edited by bblick
Link to comment
Share on other sites

Happy2Play
3 hours ago, GrimReaper said:

(and I know @Happy2Play will wholeheartedly disagree with me as it'd break his setup otherwise 😉)

Not really as xml metadata would not change.  But in the end comes back to reverse compatibility or force users to rewrite existing metadata.

  • Like 1
Link to comment
Share on other sites

I rewrote all the nfo files without the lock on them, but am now getting this after reboot and rerun of emby and plugin:

 

2022-11-28 14:39:36.509 Info Auto Movie Version Collections: Executing Automatic Collections creation.  Searching distinct movies with separated versions, DoNotChangeLockedMovies = 'False'
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: Found 0 of 0 movies that have multiple versions ...
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: Searching distinct tmdb movies ...
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: Searching distinct imdb movies ...
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: Found 0 tmdb and 0 imdb version movie lists, merging them to process ...
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: No movies with multiple ungrouped versions found, we're done!
Link to comment
Share on other sites

Happy2Play
41 minutes ago, bblick said:
I rewrote all the nfo files without the lock on them, but am now getting this after reboot and rerun of emby and plugin:

 

2022-11-28 14:39:36.509 Info Auto Movie Version Collections: Executing Automatic Collections creation.  Searching distinct movies with separated versions, DoNotChangeLockedMovies = 'False'
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: Found 0 of 0 movies that have multiple versions ...
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: Searching distinct tmdb movies ...
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: Searching distinct imdb movies ...
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: Found 0 tmdb and 0 imdb version movie lists, merging them to process ...
2022-11-28 14:39:36.550 Info Auto Movie Version Collections: No movies with multiple ungrouped versions found, we're done!

What plugin version number? 

If you changed DoNotChangeLockedMovies = 'False' to true does it work as I believe this is broken in .4 version?

Link to comment
Share on other sites

When I re-enable that toggle and manually run, it crashes emby as it appears to attempt to run the task twice at the same time.

 

System.InvalidOperationException: System.InvalidOperationException: Cannot execute a Task that is already running
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.<>c__DisplayClass68_0.<<Execute>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.Execute(TaskOptions options)
   at AutoCollections.AutoCollections.Api.AutoGroupRefreshRequest.Post(ExecuteSpotlightUpdateRequest request)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
Source: Emby.Server.Implementations
TargetSite: Void MoveNext()
Edited by bblick
Link to comment
Share on other sites

After bouncing Emby following the crash, this time it appears the setting change (changing DoNotIgnore back to True) has stuck. I re-ran manually and it appears to have worked as expected. All versions now grouped!

Thanks to all for working through it with me!! I'm excited to try out more of these plug-ins, some look really useful. 

  • Like 2
Link to comment
Share on other sites

Happy2Play

See first post for update

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 @Cheesegeezer know how the testing goes.

Edited by Happy2Play
Posted on behalf of dev
  • Like 2
Link to comment
Share on other sites

Cheesegeezer
1 hour ago, bblick said:

After bouncing Emby following the crash, this time it appears the setting change (changing DoNotIgnore back to True) has stuck. I re-ran manually and it appears to have worked as expected. All versions now grouped!

Thanks to all for working through it with me!! I'm excited to try out more of these plug-ins, some look really useful. 

Follow @chef he is truly a legend, his plugins are invaluable. From home automation to top picks and new releases to the original IntroSkip plugin that the core has adopted but not developed. He’s for sure a keeper to follow!! 

  • Agree 1
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...