Jump to content

Guest Star Cleaner - Beta


ginjaninja

Recommended Posts

ginjaninja

image.png.4963be12e9dc9dbdc4531309ceeb7932.png

Purpose / Benefits

Reduces pointless clutter on people's bio page. Avoids showing multiples episodes a person has acted in when they are already credited at the series level.

Easy to see where a person has directed an episode of a series they act in.

Functionality

Removes guest stars and actors from episodes when they are also actors at the series level (match on server .Id) whilst ignoring 'legitimate' duplication for non acting roles e.g. Director.

Instructions for Use

image.png.5b2c272c78c4cff6b4d697e75915c85c.png

 

A scheduled task - scheduled in the usual manner at regular intervals, nightly works well for me.

image.png.91565c756ae41c693d548929327cc3ca.png

 

image.png.0bfe1ec8898b66cb87090d03f8a5270d.png

Brucey Bonus - identifies (in debug log) likely provider data errors where there is a person name match on the episode/series without an id match.

image.thumb.png.5e034d1dd7f4f8a8ee6b6553572f2dc5.png

Credit

A big shout out to @Cheesegeezer who provided the vast majority of the effort and expertise in this plugin, the base solution template, the configuration page, most of the code, the thumbnail, help with Git Hub and hours of support (almost everything :-)).

Download

Emby.GuestStarCleaner v0.1.0.1.zip

Emby.GuestStarCleaner v0.1.0.0.zip

Changes

v0.1.0.1 Corrected/Changed removal logic to remove duplicated Actors as well as duplicated Guest stars

Edited by ginjaninja
  • Like 6
Link to comment
Share on other sites

Cheesegeezer

Awesome mate, glad to see it released. 
 

Don’t sell yourself short Ginj, i showed you the concepts but you worked hard on this and added a tonne of extras and percevered with the learn so huge Kudos to you.

 

i hope this is one of many of your script conversions to plugins we see.

 

  • Thanks 1
Link to comment
Share on other sites

ginjaninja
8 hours ago, sydlexius said:

@ginjaninja, is there any plan (or way) to remove guests at the series level, and leave them at the episode level?

I am very  open to suggestions but im not understanding what you are trying to achieve.

At the series level; there is no "guest star / main actor" distinguishing mark (to my knowledge), so i am wondering how you would selectively cull people at the series level?

Link to comment
Share on other sites

sydlexius
7 hours ago, ginjaninja said:

I am very  open to suggestions but im not understanding what you are trying to achieve.

At the series level; there is no "guest star / main actor" distinguishing mark (to my knowledge), so i am wondering how you would selectively cull people at the series level?

That does pose a challenge.  The lack of metadata would send you down a road of trying to match on name/ID...but as you intimated, it's entirely possible that a director could guest star in an episode.  It would make no sense to cull the reference to them at the series-level in this scenario.  I'll ask again one day if the metadata situation ever changes! 😁

Link to comment
Share on other sites

ginjaninja
On 18/01/2023 at 17:44, sydlexius said:

That does pose a challenge.  The lack of metadata would send you down a road of trying to match on name/ID...but as you intimated, it's entirely possible that a director could guest star in an episode.  It would make no sense to cull the reference to them at the series-level in this scenario.  I'll ask again one day if the metadata situation ever changes! 😁

my server rebuild and your question prompted me to do some further testing.

I realised a mistake in my understanding, product description and function.

At the episode level there are persontypes  "Actor" and "Guest Star" (as well as directors, writers etc), at the series level there are not "Guest Stars" only "Actors" (as far as i can tell) (as well as directors, writers etc)

Anyways the original purpose of cleaning the bio page should have removed person type "Actor" from episodes duplicated with "Actor" at the series level not just person type "Guest Star". This has been corrected in v0.1.0.1

Because of the fundamental change test mode would be recommended again.

Unfortunately @sydlexius i don't think this changes the situation re: your request above...there is no Actor/Guest star distinction at the series level (as far as i can tell)

Emby.GuestStarCleaner v0.1.0.1.zip

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
gillmacca01

Everything has been working fine, until the last couple of days. Now I'm getting the following error:

Application path: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/system System.InvalidOperationException: System.InvalidOperationException: Nullable object must have a value. at System.Nullable`1.get_Value() at Emby.GuestStarCleaner.ScheduledTasks.PluginScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) Source: System.Private.CoreLib TargetSite: Void ThrowInvalidOperationException_InvalidOperation_NoValue()

Link to comment
Share on other sites

ginjaninja
16 hours ago, gillmacca01 said:

Everything has been working fine, until the last couple of days. Now I'm getting the following error:

Application path: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/system System.InvalidOperationException: System.InvalidOperationException: Nullable object must have a value. at System.Nullable`1.get_Value() at Emby.GuestStarCleaner.ScheduledTasks.PluginScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) Source: System.Private.CoreLib TargetSite: Void ThrowInvalidOperationException_InvalidOperation_NoValue()

So I suspect something has no value / members....eg. No series, No episodes, no guest stars, no actors, no name no role and i probably need to add some protection for that possibility.

Can you tell, from the debug logging, if the plugin is generally iterating through series and episodes and failing at a specific point...or not even getting started...

might give a clue where to start or what logging to add to track it down.

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

ginjaninja
2 hours ago, gillmacca01 said:

Attached latest server log with debugging turned on

embyserver.txt 7.68 MB · 0 downloads

Thanks for log, so its crashing on 

Spoiler

2023-03-01 06:51:52.374 Info Guest Star Cleaner: Getting Series and Episode Person Info: Jasper Carrott Beat The Carrott - Id:1566289 - /share/CACHEDEV7_DATA/TV Shows/TV/TV/Jasper Carrott, Beat The Carrott (1981)
2023-03-01 06:51:52.393 Error TaskManager: Error
    *** Error Report ***
    Version: 4.8.0.21
    Command line: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/system/EmbyServer.dll -programdata /share/CACHEDEV1_DATA/.qpkg/EmbyServer/programdata -ffdetect /share/CACHEDEV1_DATA/.qpkg/EmbyServer/bin/ffdetect -ffmpeg /share/CACHEDEV1_DATA/.qpkg/EmbyServer/bin/ffmpeg -ffprobe /share/CACHEDEV1_DATA/.qpkg/EmbyServer/bin/ffprobe -defaultdirectory /share/CACHEDEV1_DATA/Public -updatepackage emby-server-qnap_{version}_x86_64.qpkg -noautorunwebapp
    Operating system: Linux version 5.10.60-qnap (root@U16BuildServer116) (x86_64-QNAP-linux-gnu-gcc (toolchain config: [gcc-4.9.2 binutils-2.25 glibc-2.21]) 4.9.2, GNU ld
    Framework: .NET 6.0.8
    OS/Process: x64/x64
    Runtime: share/CACHEDEV1_DATA/.qpkg/EmbyServer/system/System.Private.CoreLib.dll
    Processor count: 4
    Data path: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/programdata
    Application path: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/system
    System.InvalidOperationException: System.InvalidOperationException: Nullable object must have a value.
       at System.Nullable`1.get_Value()
       at Emby.GuestStarCleaner.ScheduledTasks.PluginScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
       at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
    Source: System.Private.CoreLib
    TargetSite: Void ThrowInvalidOperationException_InvalidOperation_NoValue()

Jasper Carrott Beat The Carrott 

From TMDB, Looks like a show with 1 episode in 1 season, with some people at the show level and no people at the episode level - is that what you have? oddly this show doesnt crash for me but  its an unusual show in terms of its metadata, and i assuming that is relevant to the crash. Perhaps its having no people on the episode... although im surprised i havent come accross this myself if that was the cause.

does your metadata come from TMDB? no crew on the episode? Does the hypothesis around this show 'add up' as a cause in that its adding to library coincides with the issue? does the plugin always crash in the same place at this show?

Could you try temporarily remove the show from the db to see if the plugin moves on..are there any other shows causing a crash? from looking at the show's metadata in your library can you see anything null or empty about its metadata?

Link to comment
Share on other sites

Junglejim

Nice work mate, this is cool! I'm not sure how the emby catalog accepts plugins but this deserves a spot in there. 👍

  • Thanks 1
Link to comment
Share on other sites

gillmacca01

It still fails after removing the show, although I believe I may have other shows similar.

Will have to check debug log to eliminate the other shows

Link to comment
Share on other sites

Cheesegeezer
22 hours ago, Junglejim said:

Nice work mate, this is cool! I'm not sure how the emby catalog accepts plugins but this deserves a spot in there. 👍

Eric sets up 3rd Party devs on the admin site. 
 

but whole heartedly agree, Ginj has done great work with the plugin!!

  • Agree 1
  • Thanks 1
Link to comment
Share on other sites

ginjaninja
3 hours ago, gillmacca01 said:

It still fails after removing the show, although I believe I may have other shows similar.

Will have to check debug log to eliminate the other shows

Do you have a thoery what circumstance(s) cause the issue? once weve identified ill put a protection in against it.

Link to comment
Share on other sites

  • 1 month later...
Junglejim

Hi guys, any news on this plugin heading into the catalog?

I think it's great and run it every time I add a new series! 👍

Link to comment
Share on other sites

Cheesegeezer

I dont think Ginj has access yet to the catalog.

i could host it. But i think thats a decision for Ginj to make. I need to run it on the beta version 4.8.30 to ensure it works.

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...