Jump to content

metadata cache purge feature / force update metadata


Riezel

Recommended Posts

Riezel

i've been got some issue atm (recently, i think after upgrade to 4.8.1.0, previously is fine in 4.7 i think, kinda forget)

like this for example
image.png.3519122d42f7e08d0da5d27d79bc42f0.png

this happens with auto organize grabbed the wrong ones
for example the episode 6 was detected as multiple files, EP6 - EP8, hence it got ,TBA,TBA
episode 7 was way worse, it got ~ E179 or something 🤣 (filename from filebot before imported to emby is something like "xxxxx 07 [179XXX].mkv") 

now, i've tried refresh meta data (already renamed the files to correct ones and delete the old nfo), but the nfo generated is still same, while check in tvdb online it was normal without issue
this happens in lot of series i have, sure you can do manage each one by one case, but if this happens to hundred or thousand files, it's become a hassle

i've tried server restart, check internal emby var folder (even tried to rename metadata folder, to attempt purge them) but still not working, hence my conclusion must be, this is from the database level, and its somehow got "cached", is it possible to fetch them online or a way to purge the metadata cached in database or even add feature like "force refresh metadata" ?

emby version 4.8.1.0

 

Link to comment
Share on other sites

Hi, what metadata fetchers are enabled on the library, and in what order?

Link to comment
Share on other sites

Riezel
5 minutes ago, Luke said:

Hi, what metadata fetchers are enabled on the library, and in what order?

image.png.a05226d829608af396e643bb6974b641.png

 

Library is in mixed content

Edited by Riezel
Link to comment
Share on other sites

do the episodes have a tvdb id in the metadata editor? If so, are they correct?

Link to comment
Share on other sites

Riezel
2 minutes ago, Luke said:

do the episodes have a tvdb id in the metadata editor? If so, are they correct?

yep, all good
image.png.e1344e0264f748b6c335275e2f75d57b.png

https://thetvdb.com/series/tsukimichi-moonlit-fantasy/episodes/10180829
^ when pressing that button

metadata in tvdb is fine, but on my emby it's kinda cached no matter what i do
i also attached the nfo generated by emby (i didnt edit this file directly, nor i did lock the metadata)

* also correction, it was until E3897 (due the hash code similar to emby file naming)

image.png.58eb02ab08bf49cd67fa5a15fb62879e.png

S02E07 - [SubsPlease] Tsuki ga Michibiku Isekai Douchuu S2 - 07 (1080p) [E03897F1].nfo

Link to comment
Share on other sites

Happy2Play

@Lukelooks like multi-episode but without end episode per other topics.

Have not tested but will guess the naming scheme. S02 - 07 being seen as Episodes 2 - 7?

image.png.d7f74e4e8f145103a9f434fc4821312d.png

Link to comment
Share on other sites

3 hours ago, Happy2Play said:

@Lukelooks like multi-episode but without end episode per other topics.

Have not tested but will guess the naming scheme. S02 - 07 being seen as Episodes 2 - 7?

image.png.d7f74e4e8f145103a9f434fc4821312d.png

I don't think so, no. The fact that the overview is blank tells me that maybe it's not getting any tvdb metadata at all.

@Riezelas a test, if you remove the anidb plugin, then restart the server and refresh metadata on the episode, does that resolve it?

Link to comment
Share on other sites

Riezel
4 hours ago, Happy2Play said:

@Lukelooks like multi-episode but without end episode per other topics.

Have not tested but will guess the naming scheme. S02 - 07 being seen as Episodes 2 - 7?

image.png.d7f74e4e8f145103a9f434fc4821312d.png

no, i've been configuring it that way so it wont missmatch like that, also i've been using that kind of naming type since 2 years ago 🤣
image.png.31ec61c4ee0f89e3df27ebbb87b3747f.png

 

14 minutes ago, Luke said:

I don't think so, no. The fact that the overview is blank tells me that maybe it's not getting any tvdb metadata at all.

@Riezelas a test, if you remove the anidb plugin, then restart the server and refresh metadata on the episode, does that resolve it?

i just woke up, sorry
and it seems the overview is filled now probably due some other plugins (although the title still has TBA things)
image.thumb.png.89e62435869912feaa87ec14191957e2.png

image.png.d4b045f4ff676d16d96c6f093c23c10e.png


i also tested disabled anidb and try to refresh meta data + replace all including image, seems the title as well didnt changed
i attached the log as well, seems there is no hit to tvdb except the cover only

also, i just tried auto organize (manual input season and episode via auto organize), seems it has another TBA things in my new added files (you can ignore overview, since there is no overview atm even in the tvdb online, but has lot of TBA there)
image.thumb.png.e88dce10af66e9c0ef96fc1ed6de6a0b.png

image.thumb.png.697137053bd7873f4263417944221246.png

 

embyserver (2).txt

Link to comment
Share on other sites

Riezel

since my speculation is about "caching"
i turned on this in the library in case it's help (although it is from my understanding only cache the cover / picture, not the metadata)
image.png.7335fa30d36028a26b71205acd06dce3.png

also the affected TBA on title currently on my emby
image.thumb.png.65fce754f83ef7b785144c816e8ef610.png

Link to comment
Share on other sites

Happy2Play

But naming interpretation has changed and brackets can potentially be irrelevant.

But just guessing as "S02E07 - [SubsPlease] Tsuki ga Michibiku Isekai Douchuu S2 - 07 (1080p) [E03897F1]" is this episode 7 thru 3897?

But @Lukewould have to potentially run tests against it.

But as I suspected is happening multi-episode.

S02E06 - [SubsPlease] Tsuki ga Michibiku Isekai Douchuu S2 - 06 (1080p) [605EA3E8]

image.png.f1434243fa873cade2f9908d185cdc95.png

image.png.cbe87fba10fcec8eac83decdb0962d98.png

Edited by Happy2Play
  • Thanks 1
Link to comment
Share on other sites

Riezel
1 minute ago, Happy2Play said:

But naming interpretation has changed and brackets can potentially be irrelevant.

But just guessing as "S02E07 - [SubsPlease] Tsuki ga Michibiku Isekai Douchuu S2 - 07 (1080p) [E03897F1]" is this episode 7 thru 3897?

But @Lukewould have to potentially run tests against it.

But as I suspected is happening.

image.png.f1434243fa873cade2f9908d185cdc95.png

image.png.cbe87fba10fcec8eac83decdb0962d98.png

yeah this is what happened in the first place (first try), hence the lot of TBA, but i already tried renaming it manually
AH i got it, just realized now

@Lukeit seems the meta data still read the file naming instead of the manual set from auto organize? (especially title)
for example, episode 6

S02E06 - xxxxxxxxxx S2 - 06 xxxx [605EA3E8]
hence 6 - 8. Title episode 6 metadata, title episode 7 metadata, title episode 8 metadata

i think this only happens recently tho, the old way seems fine, CMIIW 

Link to comment
Share on other sites

8 minutes ago, Happy2Play said:

But naming interpretation has changed and brackets can potentially be irrelevant.

But just guessing as "S02E07 - [SubsPlease] Tsuki ga Michibiku Isekai Douchuu S2 - 07 (1080p) [E03897F1]" is this episode 7 thru 3897?

But @Lukewould have to potentially run tests against it.

But as I suspected is happening multi-episode.

S02E06 - [SubsPlease] Tsuki ga Michibiku Isekai Douchuu S2 - 06 (1080p) [605EA3E8]

image.png.f1434243fa873cade2f9908d185cdc95.png

image.png.cbe87fba10fcec8eac83decdb0962d98.png

Ah yes you are correct. 3897 becomes the ending episode number.

Link to comment
Share on other sites

Riezel
7 minutes ago, Luke said:

Ah yes you are correct. 3897 becomes the ending episode number.

can we limit the naming detection (as option maybe) ?
for example, it only limit to the first 2 or 3 words it's found (from left to right) instead the whole name (the red area only, for example) to avoid this things happens
S02E07 - [SubsPlease] Tsuki ga Michibiku Isekai Douchuu S2 - 07 (1080p) [E03897F1]

or just back to old naming check (as option, so everyone still can use the new one)

Edited by Riezel
Link to comment
Share on other sites

Revenent

Just chiming in, having the same issue.  And to add on, it also causes library refreshes and scans to grind to a halt, as it tries to grab metadata for all the episodes, regardless of whether they exist or not.

In my case, it was trying to find metadata for 25,000+ episodes, basically stalling the scan for hours.

Link to comment
Share on other sites

Riezel
8 minutes ago, Revenent said:

Just chiming in, having the same issue.  And to add on, it also causes library refreshes and scans to grind to a halt, as it tries to grab metadata for all the episodes, regardless of whether they exist or not.

In my case, it was trying to find metadata for 25,000+ episodes, basically stalling the scan for hours.

as for temporary solutions (still waiting for proper fix), i made a small script to rename all my files (well i only do the 2024 and ahead for now)
if your in linux OS, here is the script

for file in *; do [[ -f $file ]] || continue; delim=$(echo $file | grep -o "\[" | wc -l); if [[ $((delim)) < 3 ]]; then tcount=2; else tcount=2; fi; ext=$(echo $file | awk -F . '{print $NF}'); base=$(echo ${file%.*}); new_name=$(cut -d '[' -f 1-$tcount <<< "$base" | sed 's/[[:blank:]]*$//'); mv "$file" "$new_name"."$ext"; done

what it did, is removing the red section, so it only keep the blue only (asuming the problem is  inside " [ ] " (mostly checksum hash)

[Fanrelease] Title Show - 01 (720p) [AB2990CC][X265][BD][Multi-Sub].mkv 

use the script in root of your files folder (make sure to test it first before execute) (it also rename all .nfo and thumbnail files), just refresh the series afterward (scan and refresh metadata)
my output later will be like this, so no misleading metadata due some of checksum hash have "E0xxx" 
image.png.40eaf8fa2ab2375f90e4a44610e82983.png

 

Link to comment
Share on other sites

OK we have a fix and it will be on the beta channel this week. Thanks guys.

Link to comment
Share on other sites

Revenent
7 hours ago, Luke said:

OK we have a fix and it will be on the beta channel this week. Thanks guys.

Thanks!  Will this be backported to a 4.8 release or will it only be available in the 4.9 release?

Link to comment
Share on other sites

1 minute ago, Revenent said:

Thanks!  Will this be backported to a 4.8 release or will it only be available in the 4.9 release?

Yes, but it's unlikely to make 4.8.2. I think it needs to sit in the beta channel for a bit to see if it produces any negative side effects.  So maybe some update after that.

Link to comment
Share on other sites

adminExitium

Same issue as reported here? 

It will definitely help to go through the list in the shared link once and see if any current regexes used for matching need to be expanded upon or improved because Sonarr, being meant for media management, has gone through a lot of revisions and testing for such stuff.

  • Thanks 1
Link to comment
Share on other sites

Revenent
On 2/24/2024 at 10:56 PM, Riezel said:

as for temporary solutions (still waiting for proper fix), i made a small script to rename all my files (well i only do the 2024 and ahead for now)
if your in linux OS, here is the script

for file in *; do [[ -f $file ]] || continue; delim=$(echo $file | grep -o "\[" | wc -l); if [[ $((delim)) < 3 ]]; then tcount=2; else tcount=2; fi; ext=$(echo $file | awk -F . '{print $NF}'); base=$(echo ${file%.*}); new_name=$(cut -d '[' -f 1-$tcount <<< "$base" | sed 's/[[:blank:]]*$//'); mv "$file" "$new_name"."$ext"; done

what it did, is removing the red section, so it only keep the blue only (asuming the problem is  inside " [ ] " (mostly checksum hash)

[Fanrelease] Title Show - 01 (720p) [AB2990CC][X265][BD][Multi-Sub].mkv 

use the script in root of your files folder (make sure to test it first before execute) (it also rename all .nfo and thumbnail files), just refresh the series afterward (scan and refresh metadata)
my output later will be like this, so no misleading metadata due some of checksum hash have "E0xxx" 
image.png.40eaf8fa2ab2375f90e4a44610e82983.png

 

Thanks!  I wrote something similar in PowerShell (on a Windows box) that replaces the E in the CRC with a Greek Epsilon.  It looks the same visually, but it doesn't trigger the multi-episode logic.  And then I'll just write a script that finds all occurrences of the Epsilon and rename it back to an E when the fix goes in.

param (
    [Parameter(Mandatory = $true)]
    [string] $RootPath,

    [Parameter(Mandatory = $false)]
    [switch] $WhatIf
)

$files = (Get-ChildItem -Path $RootPath -Recurse) | Where-Object { $_.Name -match ".*(?<crc>[A-Fa-f0-9]{8}).*" -and $Matches.crc -match ".*[Ee].*" }

foreach ($file in $files)
{
    $file.FullName -match ".*(?<crc>[A-Fa-f0-9]{8}).*" | Out-Null
    $crcSection = $Matches.crc
    $newCrcSection = $crcSection -ireplace "E", "Ε"
    $newName = $file.Name -replace $crcSection, $newCrcSection

    if ($WhatIf)
    {
        Write-Host $("[WHATIF] Renaming " + $file.FullName + " to " + $newName)
    }
    else
    {
        Write-Host $("Renaming " + $file.Name + " to " + $newName)
        Rename-Item -Path $file.FullName -NewName $newName
    }
}

 

Link to comment
Share on other sites

Happy2Play

Looks to be resolved in 4.9.0.8 performing my same test as above.

image.png.faf0353faeccecb7ca3bd8626c586af8.png

  • Thanks 1
Link to comment
Share on other sites

Revenent

Not fixed yet in the 4.8.3.0.  Guess we'll have to wait a bit longer.

Link to comment
Share on other sites

Riezel
3 minutes ago, Revenent said:

Not fixed yet in the 4.8.3.0.  Guess we'll have to wait a bit longer.

it probably will be in 4.9

4.8.x until 4.9.0 probably scheduled for other bug / feature i think
so yeah, it will be a bit longer, probably month or more, so just use your temp measure for now

Link to comment
Share on other sites

Happy2Play

Doesn't appear so but was this supposed to be in 4.8.3.0?  @Luke

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