You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kurakon is not being matched to the correct anilist id by the matcher:
I added logging to the code:
sin3point14@devm-manas-wsl:~/github/seanime$ git --no-pager diff internal/library/scanner/matcher.go
diff --git a/internal/library/scanner/matcher.go b/internal/library/scanner/matcher.go
index fd833075..546335f0 100644
--- a/internal/library/scanner/matcher.go
+++ b/internal/library/scanner/matcher.go
@@ -3,10 +3,6 @@ package scanner
import (
"errors"
"fmt"
- "github.com/rs/zerolog"
- "github.com/samber/lo"
- lop "github.com/samber/lo/parallel"
- "github.com/sourcegraph/conc/pool"
"math"
"seanime/internal/api/anilist"
"seanime/internal/library/anime"
@@ -14,6 +10,11 @@ import (
"seanime/internal/util"
"seanime/internal/util/comparison"
"time"
+
+ "github.com/rs/zerolog"
+ "github.com/samber/lo"
+ lop "github.com/samber/lo/parallel"
+ "github.com/sourcegraph/conc/pool"
)
type Matcher struct {
@@ -312,6 +313,11 @@ func (m *Matcher) validateMatches() {
// with the media titles and un-matches the local files that have a lower rating.
// This is done to try and filter out wrong matches.
func (m *Matcher) validateMatchGroup(mediaId int, lfs []*anime.LocalFile) {
+ log := false
+ if mediaId == 178462 {
+ log = true
+ fmt.Println("LESSGO")
+ }
media, found := m.MediaContainer.GetMediaFromId(mediaId)
if !found {
@@ -325,6 +331,15 @@ func (m *Matcher) validateMatchGroup(mediaId int, lfs []*anime.LocalFile) {
titles := media.GetAllTitles()
+ if log {
+ for _, lf := range lfs {
+ fmt.Printf("1 %+v\n", lf)
+ }
+ for _, title := range titles {
+ fmt.Printf("2 %s\n", *title)
+ }
+ }
+
// Compare all files' parsed title with the media title
// Get the highest rating that will be used to un-match lower rated files
p := pool.NewWithResults[float64]()
@@ -335,6 +350,10 @@ func (m *Matcher) validateMatchGroup(mediaId int, lfs []*anime.LocalFile) {
return 0
}
compRes, ok := comparison.FindBestMatchWithSorensenDice(&t, titles)
+ if log {
+ fmt.Printf("3 %s", t)
+ fmt.Printf("4 %+v %+v %+v %+v", *compRes.OriginalValue, compRes.Rating, *compRes.Value, ok)
+ }
if ok {
return compRes.Rating
}
output:
Feb 21 14:20:39 the-beast seanime[3891585]: LESSGO
Feb 21 14:20:39 the-beast seanime[3891585]: 1 &{Path:/data/seanime/library/Class no Daikirai na Joshi to Kekkon Suru Koto ni Natta/[Erai-raws] Kurakon - 05 [1080p CR WEBRip HEVC EAC3][MultiSub][B43EBCBD].mkv Name:[Erai-raws] Kurakon - 05 [1080p CR WEBRip HEVC EAC3][MultiSub][B43EBCBD].mkv ParsedData:0xc000bfe000 ParsedFolderData:[0xc0006de410] Metadata:0xc001699020 Locked:false Ignored:false MediaId:178462}
Feb 21 14:20:39 the-beast seanime[3891585]: 1 &{Path:/data/seanime/library/Class no Daikirai na Joshi to Kekkon Suru Koto ni Natta/[Erai-raws] Kurakon - 06 [1080p CR WEBRip HEVC EAC3][MultiSub][9476AA2E].mkv Name:[Erai-raws] Kurakon - 06 [1080p CR WEBRip HEVC EAC3][MultiSub][9476AA2E].mkv ParsedData:0xc0006de4e0 ParsedFolderData:[0xc002d72ea0] Metadata:0xc00228e030 Locked:false Ignored:false MediaId:178462}
Feb 21 14:20:39 the-beast seanime[3891585]: 1 &{Path:/data/seanime/library/Class no Daikirai na Joshi to Kekkon Suru Koto ni Natta/[SubsPlease] Class no Daikirai na Joshi to Kekkon suru Koto ni Natta - 07 (1080p) [BE9638C1].mkv Name:[SubsPlease] Class no Daikirai na Joshi to Kekkon suru Koto ni Natta - 07 (1080p) [BE9638C1].mkv ParsedData:0xc0026d9930 ParsedFolderData:[0xc0026d9a00] Metadata:0xc00052db60 Locked:false Ignored:false MediaId:178462}
Feb 21 14:20:39 the-beast seanime[3891585]: 2 Class no Daikirai na Joshi to Kekkon Suru Koto ni Natta.
Feb 21 14:20:39 the-beast seanime[3891585]: 2 I'm Getting Married to a Girl I Hate in My Class
Feb 21 14:20:39 the-beast seanime[3891585]: 3 Kurakon4 Kurakon 0.13114754098360656 Class no Daikirai na Joshi to Kekkon Suru Koto ni Natta. true3 Class no Daikirai na Joshi to Kekkon suru Koto ni Natta4 Class no Daikirai na Joshi to Kekkon suru Koto ni Natta 0.9908256880733946 Class no Daikirai na Joshi to Kekkon Suru Koto ni Natta. true3 Kurakon4 Kurakon 0.13114754098360656 Class no Daikirai na Joshi to Kekkon Suru Koto ni Natta. true
Interestingly for the "2" logged lines we see Class no Daikirai na Joshi to Kekkon Suru Koto ni Natta. and I'm Getting Married to a Girl I Hate in My Class however no Kurakon, which is shown in the TITLE field in the screenshot. Hence, we get a super low match score for the ep titles with Kurakon.
(There is also the issue that the TITLE block doesn't show I'm Getting Married to a Girl I Hate in My Class but I didn't dig into that)
Expected Behavior
The match for ep titled with Kurakon should succeed.
The following diff fixes the issue but I didn't put up a PR since I don't know why that Filter was there in the first place
There is also the issue that the TITLE block doesn't show I'm Getting Married to a Girl I Hate in My Class but I didn't dig into that
The first 5 fields in the scan summary show the results of the file path parser, not related to the matcher.
Regarding comparison.ValueContainsSeason(*s) it's done because AniList often adds a bunch of random synonyms, also in different languages, with various lengths (like KnY etc.) and I think it's safer to keep it that way but I'm willing to add an advance option in the settings to override the filter.
The safer solution would be to completely remove validateMatches since it rarely rejects stuff. Even in your case, locking all other files but the ones named "Kurakon" and refreshing would solve the issue (probably).
Checklist
Bug Severity
Low
Bug Area
Anime Library
Bug Description / Steps to Reproduce
Kurakon
is not being matched to the correct anilist id by the matcher:I added logging to the code:
output:
Interestingly for the "2" logged lines we see
Class no Daikirai na Joshi to Kekkon Suru Koto ni Natta.
andI'm Getting Married to a Girl I Hate in My Class
however noKurakon
, which is shown in theTITLE
field in the screenshot. Hence, we get a super low match score for the ep titles withKurakon
.(There is also the issue that the
TITLE
block doesn't showI'm Getting Married to a Girl I Hate in My Class
but I didn't dig into that)Expected Behavior
The match for ep titled with
Kurakon
should succeed.The following diff fixes the issue but I didn't put up a PR since I don't know why that
Filter
was there in the first placeScreenshots
No response
Logs
Already showed the logs above ^
Debugging Checklist
App Version
v2.7.4
Operating System
Linux
The text was updated successfully, but these errors were encountered: