ZeroQI / Hama.bundle

Plex HTTP Anidb Metadata Agent (HAMA)
GNU General Public License v3.0
1.21k stars 114 forks source link

Incorrect Mapping #41

Closed sven-7 closed 8 years ago

sven-7 commented 8 years ago

It looks like Escaflowne is mapping to "Escaflowne - The Movie" instead of just the show. It probably doesn't help that AniDB has the original show named "Tenkuu no Escaflowne" and the movie just "Escaflowne".

https://anidb.net/perl-bin/animedb.pl?show=anime&aid=184 https://anidb.net/perl-bin/animedb.pl?show=anime&aid=321

This is probably a separate issue, so break this out if you believe so. Some other shows that I've noticed issues with (I believe one of the recent fixes accounted for Tokyo Magnitude) have been doubling/all falling into one file (Plex recognizes it as one episode with XX amount of versions).

I manually overcame these issues by re-naming each series files simply "1.mkv" etc... and putting an anidb.id or tvdb.id file in the folder.

ZeroQI commented 8 years ago

I use anidb offline dump [http://anidb.net/api/anime-titles.xml.gz] download no more than once a day. Both the movie and anime share multiple times the same string so it is working as designed

Escaflowne Escaflowne Escaflowne escaflowne tv I cieli di Escaflowne La Visió de l`Escaflowne La Visión de Escaflowne La Visión de Escaflowne Tenkuu no Escaflowne TnE Vision d`Escaflowne Vision of Escaflowne Vision of Escaflowne VoE Видението за Ескафлоне Видение Эскафлона 天空のエスカフローネ
<anime aid="321">
    <title type="official" xml:lang="ko">천공의 에스카폴로네</title>
    <title xml:lang="ja" type="official">エスカフローネ</title>
    <title xml:lang="x-jat" type="main">Escaflowne</title>
    <title xml:lang="en" type="syn">Escaflowne: A Girl in Gaea</title>
    <title xml:lang="es" type="syn">Escaflowne: la película</title>
    <title type="official" xml:lang="pt">Escaflowne: O Filme</title>
    <title xml:lang="en" type="official">Escaflowne - The Movie</title>
    <title type="official" xml:lang="de">Escaflowne - The Movie</title>
    <title type="official" xml:lang="fr">Escaflowne - Une fille sur Gaia</title>
    <title xml:lang="lt" type="syn">Eskaflonė: Mergina iš Gajos</title>
    <title xml:lang="uk" type="syn">Ескафлон</title>
</anime>

To force the serie, use the anidb.id, or add " [anidb-184]" at the end of the serie folder name, or go in plex serie page, manually click on "..." > "Fix incorrect Match" and click on the right anidbid (it is indicated).

For all files into a single file, that is the scanner that is responsible. Please try the fix released in the last few days for the scanner. If it persists, please include the scanner log for the relevant portion. the readme says the location of such files.

EndOfLine369 commented 8 years ago

On items 2-4, please make sure to pull the latest version of ASS as I have committed multiple parsing fixes on May 1st.

(1) Escaflowne is mapping to "Escaflowne - The Movie" This looks to be expected behavior as as you stated it is matching against the main AniDB title.

The order of matching is: ) ### Check if a guid is specified "Show name [anidb-id]" ### ) ### AniDB Local exact search ### <== (this is where your 'Escaflowne' is being matched to the movie) ) ### AniDB local keyword search ### ) ### TVDB serie search ### *) ### TMDB movie search ###

image

image

(2) For 'Tokyo Magnitude 8.0', you are correct. I have fixed this in the scanner per this commit as it was mapping all to s1e8. https://github.com/ZeroQI/Absolute-Series-Scanner/commit/169aff3d686d71ccba1b90550d380c0ee785e280

(3) For 'Mobile Suit Gundam - The 08th MS Team' Please repull the ASS code and rescan. If the issue persists, please open up an ASS issue ticket with the filenames and logs.

(4) For 'Mobile Suit Gundam - 0080 War in the Pocket' Please repull the ASS code and rescan. If the issue persists, please open up an ASS issue ticket with the filenames and logs. This was probably fixed per this commit. https://github.com/ZeroQI/Absolute-Series-Scanner/commit/7ab801418c940ba571e228d160304b629d6fbe84 Please provide your file names/logs.

sven-7 commented 8 years ago

That makes sense with Escaflowne, due to the movie's main title. I figured it would work once adding an ID file, now it's working as expected, but just wanted to point this out.

As for items 2-4, I will rename them back and remove the ID files. I'll provide logs if anything imports incorrectly. I have the latest scanner and hama already installed. I ran into all these issues prior to last week, so I'm assuming the latest commit's have fixed this. Will report back.

EndOfLine369 commented 8 years ago

@ZeroQI, Should we look at adding in an additional matching section before "### AniDB Local exact search ###" or enhance this section? We could possibly add in an exact matching loop that actually uses your language preferences for the title first? So if language is set to 'en', it would try to match against <title type="official" xml:lang="en">Escaflowne - The Movie</title> and <title xml:lang="en" type="official">Escaflowne</title> first and thus match it against '184' instead of '321'.

    <anime aid="321">
        <title type="official" xml:lang="ko">천공의 에스카폴로네</title>
        <title xml:lang="ja" type="official">エスカフローネ</title>
        <title type="main" xml:lang="x-jat">Escaflowne</title>
        <title type="syn" xml:lang="en">Escaflowne: A Girl in Gaea</title>
        <title type="syn" xml:lang="es">Escaflowne: la película</title>
        <title type="official" xml:lang="pt">Escaflowne: O Filme</title>
        <title type="official" xml:lang="en">Escaflowne - The Movie</title>
        <title type="official" xml:lang="de">Escaflowne - The Movie</title>
        <title type="official" xml:lang="fr">Escaflowne - Une fille sur Gaia</title>
        <title type="syn" xml:lang="lt">Eskaflonė: Mergina iš Gajos</title>
        <title type="syn" xml:lang="uk">Ескафлон</title>
    </anime>
...
    <anime aid="184">
        <title xml:lang="es" type="short">Escaflowne</title>
        <title xml:lang="en" type="official">Escaflowne</title>
        <title xml:lang="de" type="syn">Escaflowne</title>
        <title type="short" xml:lang="x-jat">escaflowne tv</title>
        <title type="official" xml:lang="it">I cieli di Escaflowne</title>
        <title type="official" xml:lang="ca">La Visió de l`Escaflowne</title>
        <title type="official" xml:lang="es">La Visión de Escaflowne</title>
        <title type="official" xml:lang="es-LA">La Visión de Escaflowne</title>
        <title type="main" xml:lang="x-jat">Tenkuu no Escaflowne</title>
        <title xml:lang="x-jat" type="short">TnE</title>
        <title xml:lang="fr" type="official">Vision d`Escaflowne</title>
        <title xml:lang="de" type="official">Vision of Escaflowne</title>
        <title xml:lang="pl" type="official">Vision of Escaflowne</title>
        <title xml:lang="en" type="short">VoE</title>
        <title xml:lang="bg" type="syn">Видението за Ескафлоне</title>
        <title xml:lang="ru" type="syn">Видение Эскафлона</title>
        <title xml:lang="ja" type="official">天空のエスカフローネ</title>
    </anime>
sven-7 commented 8 years ago

Still have issues with items 2-4. Logs attached.

logs.zip

EndOfLine369 commented 8 years ago

(2) 'Tokyo Magnitude 8.0' I see no issues.

2016-05-03 10:55:49 =============================================================================================================================================================
2016-05-03 10:55:49 Scanner call - root: 'B:\Anime Series', path: 'Tokyo Magnitude', dirs: '0', files: '11'
2016-05-03 10:55:49 =============================================================================================================================================================
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e001 "Tokyo Magnitude 8.0 - 1 - Odaiba Sinks.mkv" "Odaiba Sinks" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e002 "Tokyo Magnitude 8.0 - 2 - Broken World.mkv" "Broken World" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e003 "Tokyo Magnitude 8.0 - 3 - Burning Bridge.mkv" "Burning Bridge" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e004 "Tokyo Magnitude 8.0 - 4 - Their Promise.mkv" "Their Promise" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e005 "Tokyo Magnitude 8.0 - 5 - The School's Lament.mkv" "The School's Lament" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e006 "Tokyo Magnitude 8.0 - 6 - Abandoning Choices.mkv" "Abandoning Choices" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e007 "Tokyo Magnitude 8.0 - 7 - Summer Evening Twilight.mkv" "Summer Evening Twilight" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e008 "Tokyo Magnitude 8.0 - 8 - Pure White Morning.mkv" "Pure White Morning" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e009 "Tokyo Magnitude 8.0 - 9 - Goodbye to Today.mkv" "Goodbye to Today" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e010 "Tokyo Magnitude 8.0 - 10 - Hey, Big Sister.mkv" "Hey, Big Sister" 
2016-05-03 10:55:49 "Tokyo Magnitude" s0001e011 "Tokyo Magnitude 8.0 - 11 - To Yuuki ....mkv" "To Yuuki" 

(3) 'Mobile Suit Gundam - The 08th MS Team' I see no issues.

2016-05-03 10:55:06 Scanner call - root: 'A:\Anime Series', path: 'Mobile Suit Gundam The 08th MS Team', dirs: '0', files: '12'
2016-05-03 10:55:06 =============================================================================================================================================================
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e001 "Mobile Suit Gundam The 08th MS Team - 1 - War for Two.mkv" "War for Two" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e002 "Mobile Suit Gundam The 08th MS Team - 2 - Gundams in the Jungle.mkv" "Gundams in the Jungle" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e003 "Mobile Suit Gundam The 08th MS Team - 3 - The Time Limit on Trust.mkv" "The Time Limit on Trust" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e004 "Mobile Suit Gundam The 08th MS Team - 4 - The Demon Overhead.mkv" "The Demon Overhead" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e005 "Mobile Suit Gundam The 08th MS Team - 5 - The Broken Order to Stand By.mkv" "The Broken Order to Stand By" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e006 "Mobile Suit Gundam The 08th MS Team - 6 - Battle Line on Burning Sand.mkv" "Battle Line on Burning Sand" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e007 "Mobile Suit Gundam The 08th MS Team - 7 - Reunion.mkv" "Reunion" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e008 "Mobile Suit Gundam The 08th MS Team - 8 - Duty and Ideals.mkv" "Duty and Ideals" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e009 "Mobile Suit Gundam The 08th MS Team - 9 - Front Line.mkv" "Front Line" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e010 "Mobile Suit Gundam The 08th MS Team - 10 - The Shuddering Mountain Part I.mkv" "The Shuddering Mountain Part I" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e011 "Mobile Suit Gundam The 08th MS Team - 11 - The Shuddering Mountain Part II.mkv" "The Shuddering Mountain Part II" 
2016-05-03 10:55:06 "Mobile Suit Gundam The 08th MS Team" s0001e012 "Mobile Suit Gundam The 08th MS Team - 12 - Last Resort.mkv" "Last Resort" 

(4) 'Mobile Suit Gundam - 0080 War in the Pocket' Is in issue. All as ep80. Will check.

2016-05-03 10:55:07 Scanner call - root: 'A:\Anime Series', path: 'Mobile Suit Gundam 0080 - War in the Pocket', dirs: '0', files: '6'
2016-05-03 10:55:07 =============================================================================================================================================================
2016-05-03 10:55:07 "Mobile Suit Gundam 0080 - War in the Pocket" s0000e080 "Mobile Suit Gundam 0080 War in the Pocket - 1 - How Many Miles to the Battlefield.mkv" "War in the Pocket - 1 - How Many Miles to the Battlefield" 
2016-05-03 10:55:07 "Mobile Suit Gundam 0080 - War in the Pocket" s0000e080 "Mobile Suit Gundam 0080 War in the Pocket - 2 - Reflection In a Brown Eye.mkv" "War in the Pocket - 2 - Reflection In a Brown Eye" 
2016-05-03 10:55:07 "Mobile Suit Gundam 0080 - War in the Pocket" s0000e080 "Mobile Suit Gundam 0080 War in the Pocket - 3 - And At the End of the Rainbow.mkv" "War in the Pocket - 3 - And At the End of the Rainbow" 
2016-05-03 10:55:07 "Mobile Suit Gundam 0080 - War in the Pocket" s0000e080 "Mobile Suit Gundam 0080 War in the Pocket - 4 - Over the River and Through the Woods.mkv" "War in the Pocket - 4 - Over the River and Through the Woods" 
2016-05-03 10:55:07 "Mobile Suit Gundam 0080 - War in the Pocket" s0000e080 "Mobile Suit Gundam 0080 War in the Pocket - 5 - Say It Ain't So, Bernie!.mkv" "War in the Pocket - 5 - Say It Ain't So, Bernie!" 
2016-05-03 10:55:07 "Mobile Suit Gundam 0080 - War in the Pocket" s0000e080 "Mobile Suit Gundam 0080 War in the Pocket - 6 - War In the Pocket.mkv" "War in the Pocket - 6 - War In the Pocket" 
EndOfLine369 commented 8 years ago

(4) Is actually expected behavior as any 4digit number <1900 is split in half (season|episode) EX: "0080" -> "s00e80" Will have to see if there is anything we can do here for this series.

sven-7 commented 8 years ago

(2) Tokyo Magnitude didn't match automatically. Worked after I did a manual match.

(3) 08th MS Team is missing half of the episodes.

screen shot 2016-05-03 at 12 02 41 pm screen shot 2016-05-03 at 12 04 22 pm

(4) 0080:

screen shot 2016-05-03 at 12 02 26 pm

ZeroQI commented 8 years ago

@EndOfLine369: Have created a pull request to re-write the remapping function so it's substantially shorter, but nothing linked to this bug report. Please have a look. is your nick on Plex forums End0fL1ne? maybe: . removing the folder name from the file names ("if ep.lower().startswith(folder_show.lower()): ep, folder_use = ep[len(folder_show):].lstrip(), True " should have triggered in this case) . 4 digits starting with 0 not to be split in half ? . checking if present multiple times in folder?

EndOfLine369 commented 8 years ago

For . removing the folder name from the file names The folder name does not match the files. Missing the '- ' in the filenames so was not triggered. Folder = 'Mobile Suit Gundam 0080 - War in the Pocket' Files = 'Mobile Suit Gundam 0080 War in the Pocket'

I think we should probably clean in the test. I think that would catch this issue.

FROM:
if ep.lower().startswith(folder_show.lower()): ep, folder_use = ep[len(folder_show):].lstrip(), True
TO:
if clean_string(ep).lower().startswith(clean_string(folder_show).lower()): 
  ep, folder_use = clean_string(ep)[len(clean_string(folder_show)):].lstrip(), True

For . 4 digits starting with 0 not to be split in half ?, I don't think we need to change.

For . checking if present multiple times in folder?, It is checking if present only after hitting the 4digit tests. Might need to move the 4digit tests after the multiple times check.

ZeroQI commented 8 years ago

@EndOfLine369: Well documented answer, missa like it. Moving the 4 digit test after multiple check + clean the test seem great. Did you had a look at my butchering of your code in the commit pending?

EndOfLine369 commented 8 years ago

Was indeed a butcher :wink:. Will need to read it over more to fully get the updates. I'll comment on it one way or another for you to know. My id is the same as here in Plex of 'EndOfLine369'.

So from this ticket, I see three possible things:

  1. HAMA: Having language pref be used in the search function (could solve the Escaflowne mapping issue)
  2. ASS: String cleaning needed in removal test of foldername from filename (could solve 'Mobile Suit Gundam 0080 - War in the Pocket' != 'Mobile Suit Gundam 0080 War in the Pocket')
  3. ASS: Move the 4digit tests after the multiple times check (could solve when there is a legit 4digit number in the series name)

I'll look at these today and if time/energy allows, i'll get the commit updates in today as well. Testing is always lengthy for ASS as I always force a rescan of every file in my plex to note when things move around either correctly or incorrectly by watching Plex events.

sven-7 commented 8 years ago

(2) I can confirm after renaming the folder, 0080 corrected on the next library scan.

I can't figure out what is happening with 08th MS Team, however. ASS has it properly scanning, but when I look at HAMA, it looks like it thinks there is a season 0.

hama log.zip

EndOfLine369 commented 8 years ago

In your Hama log, it is only seeing those 6 episodes and only a season 1. Try renaming the folder that contains all of the files. It will see them as brand new files in adding to plex instead of just reading already added files. I suspect there might be something incorrectly being reused in your Plex media database.

2016-05-03 13:25:28,476 (16c8) :  DEBUG (logkit:13) - Update() - AniDB title: 'Mobile Suit Gundam: The 08th MS Team', original title: 'Kidou Senshi Gundam: Dai 08 MS Shoutai', metadata.title 'Mobile Suit Gundam: The 08th MS Team'*
2016-05-03 13:25:28,477 (16c8) :  DEBUG (logkit:13) - Update() - AniDB Start Date: '1996-01-25'
2016-05-03 13:25:28,477 (16c8) :  DEBUG (logkit:13) - update() - AniDB Ratings:    '7.66'*
2016-05-03 13:25:28,486 (16c8) :  DEBUG (logkit:13) - AniDB Genres (Weight): [('Mecha', 600), ('Future', 600), ('Military', 600), ('War', 400), ('Action', 400), ('Romance', 200), ('Anti-War', 200), ('Comedy', 100), ('Space', 100), ('Slapstick', 100), ('Ecchi', 100), ('Shounen', 0)]*
2016-05-03 13:25:28,487 (16c8) :  DEBUG (logkit:13) - anidbCollectionMapping() - anidbid '217' is part of movie collection: Mobile Suit Gundam Collection', related_anime_list: '['715', '1425']', 
2016-05-03 13:25:28,487 (16c8) :  DEBUG (logkit:13) - AniDB Creator data: Yatate Hajime is a writer, Tomino Yoshiyuki is a writer, Kanda Takeyuki is a director, Shimaiya Tetsu is a director, Iida Umanosuke is a director, Sugiura Kouji is a director, Mori Kunihiro is a director, 
2016-05-03 13:25:28,489 (16c8) :  DEBUG (logkit:13) - Update() - AniDB Poster, url: 'http://img7.anidb.net/pics/anime/83838.jpg'
2016-05-03 13:25:28,489 (16c8) :  DEBUG (logkit:13) - metadata_download() - url: 'http://img7.anidb.net/pics/anime/83838.jpg', num: '99', filename: 'AniDB/83838.jpg'*
2016-05-03 13:25:28,490 (16c8) :  DEBUG (logkit:13) - Update() - AniDB episode title: 'The Shuddering Mountain (Part 1)'*
2016-05-03 13:25:28,490 (16c8) :  DEBUG (logkit:13) - Update() - AniDB AirDate '1998-07-25'*
2016-05-03 13:25:28,490 (16c8) :  DEBUG (logkit:13) - Update() - AniDB duration: '1500000'*
2016-05-03 13:25:28,490 (16c8) :  DEBUG (logkit:13) - metadata_download() - url: 'http://thetvdb.com/banners/episodes/80784/340687.jpg', num: '1', filename: 'TVDB/episodes/340687.jpg'*
2016-05-03 13:25:28,492 (16c8) :  DEBUG (logkit:13) - TVDB mapping episode summary - anidb_ep: 's1e10', tvdb_ep: 's1e10', season: '1', epNumVal: '10', defaulttvdbseason: '1', title: 'The Shuddering Mountain (Part 1)', summary: 'The Federal Forces begin a massive assault on the'
2016-05-03 13:25:28,493 (16c8) :  DEBUG (logkit:13) - Update() - AniDB episode title: 'Front Line'*
2016-05-03 13:25:28,493 (16c8) :  DEBUG (logkit:13) - Update() - AniDB AirDate '1998-02-25'*
2016-05-03 13:25:28,493 (16c8) :  DEBUG (logkit:13) - Update() - AniDB duration: '1500000'*
2016-05-03 13:25:28,493 (16c8) :  DEBUG (logkit:13) - metadata_download() - url: 'http://thetvdb.com/banners/episodes/80784/340686.jpg', num: '1', filename: 'TVDB/episodes/340686.jpg'*
2016-05-03 13:25:28,493 (16c8) :  DEBUG (logkit:13) - TVDB mapping episode summary - anidb_ep: 's1e9', tvdb_ep: 's1e9', season: '1', epNumVal: '9', defaulttvdbseason: '1', title: 'Front Line', summary: 'On a Big Tray land battleship, several Federation'
2016-05-03 13:25:28,494 (16c8) :  DEBUG (logkit:13) - Update() - AniDB episode title: 'Duty and Ideals'*
2016-05-03 13:25:28,494 (16c8) :  DEBUG (logkit:13) - Update() - AniDB AirDate '1997-12-28'*
2016-05-03 13:25:28,494 (16c8) :  DEBUG (logkit:13) - Update() - AniDB duration: '1500000'*
2016-05-03 13:25:28,496 (16c8) :  DEBUG (logkit:13) - metadata_download() - url: 'http://thetvdb.com/banners/episodes/80784/340685.jpg', num: '1', filename: 'TVDB/episodes/340685.jpg'*
2016-05-03 13:25:28,496 (16c8) :  DEBUG (logkit:13) - TVDB mapping episode summary - anidb_ep: 's1e8', tvdb_ep: 's1e8', season: '1', epNumVal: '8', defaulttvdbseason: '1', title: 'Duty and Ideals', summary: 'Shiro is court-martialed under suspicion of being'
2016-05-03 13:25:28,496 (16c8) :  DEBUG (logkit:13) - Update() - AniDB episode title: 'Last Resort'*
2016-05-03 13:25:28,496 (16c8) :  DEBUG (logkit:13) - Update() - AniDB AirDate '1999-07-25'*
2016-05-03 13:25:28,496 (16c8) :  DEBUG (logkit:13) - Update() - AniDB duration: '1800000'*
2016-05-03 13:25:28,497 (16c8) :  DEBUG (logkit:13) - metadata_download() - url: 'http://thetvdb.com/banners/episodes/80784/340689.jpg', num: '1', filename: 'TVDB/episodes/340689.jpg'*
2016-05-03 13:25:28,497 (16c8) :  DEBUG (logkit:13) - TVDB mapping episode summary - anidb_ep: 's1e12', tvdb_ep: 's1e12', season: '1', epNumVal: '12', defaulttvdbseason: '1', title: 'Last Resort', summary: 'On Christmas Eve UC 0079, a Musai battleship is at'
2016-05-03 13:25:28,499 (16c8) :  DEBUG (logkit:13) - Update() - AniDB episode title: 'Reunion'*
2016-05-03 13:25:28,499 (16c8) :  DEBUG (logkit:13) - Update() - AniDB AirDate '1997-10-25'*
2016-05-03 13:25:28,499 (16c8) :  DEBUG (logkit:13) - Update() - AniDB duration: '1500000'*
2016-05-03 13:25:28,500 (16c8) :  DEBUG (logkit:13) - metadata_download() - url: 'http://thetvdb.com/banners/episodes/80784/340684.jpg', num: '1', filename: 'TVDB/episodes/340684.jpg'*
2016-05-03 13:25:28,500 (16c8) :  DEBUG (logkit:13) - TVDB mapping episode summary - anidb_ep: 's1e7', tvdb_ep: 's1e7', season: '1', epNumVal: '7', defaulttvdbseason: '1', title: 'Reunion', summary: 'In Europe, Zeon forces retreat when the Federation'
2016-05-03 13:25:28,500 (16c8) :  DEBUG (logkit:13) - Update() - AniDB episode title: 'The Shuddering Mountain (Part 2)'*
2016-05-03 13:25:28,500 (16c8) :  DEBUG (logkit:13) - Update() - AniDB AirDate '1999-04-25'*
2016-05-03 13:25:28,502 (16c8) :  DEBUG (logkit:13) - Update() - AniDB duration: '1500000'*
2016-05-03 13:25:28,502 (16c8) :  DEBUG (logkit:13) - metadata_download() - url: 'http://thetvdb.com/banners/episodes/80784/340688.jpg', num: '1', filename: 'TVDB/episodes/340688.jpg'*
2016-05-03 13:25:28,503 (16c8) :  DEBUG (logkit:13) - TVDB mapping episode summary - anidb_ep: 's1e11', tvdb_ep: 's1e11', season: '1', epNumVal: '11', defaulttvdbseason: '1', title: 'The Shuddering Mountain (Part 2)', summary: 'Before the Apsalus III launches, Ginias looks at i'
2016-05-03 13:25:28,503 (16c8) :  DEBUG (logkit:13) - Update() - AniDB specials title - Season: '0', epNum.text: 'C1', epNumVal: '101', ep_title: 'Opening'
2016-05-03 13:25:28,503 (16c8) :  DEBUG (logkit:13) - Update() - AniDB specials title - Season: '0', epNum.text: 'C2', epNumVal: '151', ep_title: 'Ending'
2016-05-03 13:25:28,503 (16c8) :  DEBUG (logkit:13) - Update() - DURATION: 9300000, numEpisodes: 6
sven-7 commented 8 years ago

I removed the "the" from the folder line to have it rescan and the same thing happened. When I watch the library as it scans, I see show split up into four shows. The first contains episodes 1-6, then each show contains 2 after that (7-8; 9-10; 11-12). When it finishes scanning, it combines and 1-6 disappear. This time, it only combined and had four episodes remaining.

screen shot 2016-05-03 at 1 51 30 pm screen shot 2016-05-03 at 1 53 53 pm

08th ms.zip

EndOfLine369 commented 8 years ago

Ok, thanks for the more info. I'll review and get back to you. Looks like you like Gundam :wink:

sven-7 commented 8 years ago

I admit...it's a bit of a problem... :satisfied:

EndOfLine369 commented 8 years ago

@sven-7, I am unable to replicate your issue. Try one more thing. Move the Gundam folder outside of your library folder, re-scan to get them removed from Plex, put the folder back into your library folder, re-scan.

Files:

/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 3 - The Time Limit on Trust.mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 4 - Demon Overhead.mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 7 - Reunion.mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 2 - Gundams in the Jungle.mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 8 - Duty and Ideals.mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 9 - Front Line.mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 6 - Battle Line on the Burning Sand.mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 12 - Last Resort.mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 10 - The Shuddering Mountain (Part 1).mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 11 - The Shuddering Mountain (Part 2).mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 1 - War for Two.mkv
/share/Anime2/t1/Mobile Suit Gundam 08th MS Team/Mobile Suit Gundam The 08th MS Team - 5 - The Broken Order to Standby.mkv

Log:

2016-05-03 13:45:53 Scanner call - root: '/share/Anime2/t1', path: 'Mobile Suit Gundam 08th MS Team', dirs: '0', files: '12'
2016-05-03 13:45:53 =============================================================================================================================================================
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e001 "Mobile Suit Gundam The 08th MS Team - 1 - War for Two.mkv" "War for Two"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e002 "Mobile Suit Gundam The 08th MS Team - 2 - Gundams in the Jungle.mkv" "Gundams in the Jungle"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e003 "Mobile Suit Gundam The 08th MS Team - 3 - The Time Limit on Trust.mkv" "The Time Limit on Trust"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e004 "Mobile Suit Gundam The 08th MS Team - 4 - Demon Overhead.mkv" "Demon Overhead"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e005 "Mobile Suit Gundam The 08th MS Team - 5 - The Broken Order to Standby.mkv" "The Broken Order to Standby"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e006 "Mobile Suit Gundam The 08th MS Team - 6 - Battle Line on the Burning Sand.mkv" "Battle Line on the Burning Sand"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e007 "Mobile Suit Gundam The 08th MS Team - 7 - Reunion.mkv" "Reunion"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e008 "Mobile Suit Gundam The 08th MS Team - 8 - Duty and Ideals.mkv" "Duty and Ideals"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e009 "Mobile Suit Gundam The 08th MS Team - 9 - Front Line.mkv" "Front Line"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e010 "Mobile Suit Gundam The 08th MS Team - 10 - The Shuddering Mountain (Part 1).mkv" "The Shuddering Mountain (Part 1)"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e011 "Mobile Suit Gundam The 08th MS Team - 11 - The Shuddering Mountain (Part 2).mkv" "The Shuddering Mountain (Part 2)"
2016-05-03 13:45:53 "Mobile Suit Gundam 08th MS Team" s0001e012 "Mobile Suit Gundam The 08th MS Team - 12 - Last Resort.mkv" "Last Resort"
2016-05-03 13:45:53 -------------------------------------------------------------------------------------------------------------------------------------------------------------

Plex: image

image

EndOfLine369 commented 8 years ago

Also make sure that your URL session is refreshed. As I have see in the past myself that Metadata has been updated but not visible in my url view. Once I closed the tab and opened a new one for a fresh session, it actually showed it correctly.

sven-7 commented 8 years ago

Yeah, after removing it earlier, that didn't work. This time I removed it (I also optimized, cleaned bundles, emptied trash in Plex) and restarted Plex. Seems to have imported correctly this time -- bizarre is all I can really say.

EndOfLine369 commented 8 years ago

Good to hear that it was Plex and not ASS/HAMA. So with that item closed out, just leaves these:

  1. HAMA: Having language pref be used in the search function (could solve the Escaflowne mapping issue)
  2. ASS: String cleaning needed in removal test of foldername from filename (could solve 'Mobile Suit Gundam 0080 - War in the Pocket' != 'Mobile Suit Gundam 0080 War in the Pocket')
  3. ASS: Move the 4digit tests after the multiple times check (could solve when there is a legit 4digit number in the series name)

And as mentioned, i'll get to them when I can today/tomorrow.

ZeroQI commented 8 years ago

Perfect :D

sven-7 commented 8 years ago

Yes, I'm glad it was that as well. Thanks for the assistance.

Do you want me to open separate tickets for the remaining issues?

sven-7 commented 8 years ago

Via the super handy duplicates feature @EndOfLine369 pointed out, I found a bunch of inconsistencies in my library. Here is one that seems to be "duplicating" but is probably getting misread in the Scanner or HAMA -- but thought I'd post it here as we're talking about inconsistent mapping.

Both are showing up as episode 9.

screen shot 2016-05-05 at 5 16 38 pm
sven-7 commented 8 years ago
screen shot 2016-05-05 at 5 35 20 pm
ZeroQI commented 8 years ago

episode number is choosen by the scanner need to see why it skipped the first number

EndOfLine369 commented 8 years ago

@sven-7, please make sure that those files are just not old placements from old scanner code (rename folder & rescan). If they get readded as same, please provide the list of files in the folders.

sven-7 commented 8 years ago

Logs.zip

EndOfLine369 commented 8 years ago

I don't see either "Ghost in the Shell" or "Love Hina" in your logs.

ZeroQI commented 8 years ago

I think that's the issue with scanners, it doesn't call back the folder if no changes occurred (took me a lot of attempts to achieve), but if it crashed while running, then the library is missing these folders in plex and either you add something to the folders or re-create the library to solve...

I can see the files are in the folder you gave us logs for. You may have a crash in the normal plex scanner log, or If not re-create the library and share logs again please

sven-7 commented 8 years ago

This might have been a Plex issue again. I removed both series, scanned, added both back, scanned again and now they're acting the same. I'm not sure if it's just because the scanner had been ignoring them due to no changes and the new scanners had yet to really see them or what. It's kind of bizarre.

I can get my logs up later, but both series seem to have imported correctly this time.

ZeroQI commented 8 years ago

That is what made the scanner development a nightmare for me. If you change which folder call you add series in, or it it ever crashes, you can re-create the library... I spent multiple times hours fixing a error already corrected...

sven-7 commented 8 years ago

I'll make that a default troubleshooting method for me when I run into weird issues like this. Remove the series, make sure it's fully being scanned by the latest scanner. I can see how this is a huge nightmare.

EndOfLine369 commented 8 years ago

I've had some time this week to work on this but also wanted to get the other code update ZeroQI and I were working on commited first. That has been merged so fingers crossed this will get fully tested this weekend. Item 3 was easy but item 2 is trickier.

miracle152004 commented 8 years ago

Hi,

I think I have a similar problem with "11 Eyes". After Reading this thread I updated to the latest version of the scanner, but still no luck, even after doing the cleanup mentioned above.

Here the logfiles:

2016-05-07 20:26:28 Scanner call - root: 'Q:\Anime', path: '11 Eyes', dirs: '0', files: '13' 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-01[E-D].mkv" "11" "Eyes-01" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-02[E-D].mkv" "11" "Eyes-02" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-03[E-D].mkv" "11" "Eyes-03" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-04[E-D].mkv" "11" "Eyes-04" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-05[E-D].mkv" "11" "Eyes-05" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-06[E-D].mkv" "11" "Eyes-06" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-07[E-D].mkv" "11" "Eyes-07" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-08[E-D].mkv" "11" "Eyes-08" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-09[E-D].mkv" "11" "Eyes-09" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-10[E-D].mkv" "11" "Eyes-10" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-11[E-D].mkv" "11" "Eyes-11" 2016-05-07 20:26:28 "11 Eyes" s0001e011 "11_Eyes-12[E-D].mkv" "11" "Eyes-12" 2016-05-07 20:26:28 "11 Eyes" s0000e001 "11_Eyes-S01[E-D].mkv" "6"

Here the files in the folder:

24.07.2011 21:44 356.219.199 11_Eyes-02[E-D].mkv 24.07.2011 21:44 356.244.535 11_Eyes-03[E-D].mkv 24.07.2011 21:43 355.769.170 11_Eyes-04[E-D].mkv 24.07.2011 21:44 356.271.749 11_Eyes-05[E-D].mkv 24.07.2011 21:44 356.342.990 11_Eyes-06[E-D].mkv 24.07.2011 21:43 356.032.432 11_Eyes-07[E-D].mkv 24.07.2011 21:44 356.050.714 11_Eyes-08[E-D].mkv 24.07.2011 21:44 356.275.913 11_Eyes-09[E-D].mkv 24.07.2011 21:44 356.052.313 11_Eyes-10[E-D].mkv 24.07.2011 21:44 355.894.138 11_Eyes-11[E-D].mkv 24.07.2011 21:43 356.425.295 11_Eyes-12[E-D].mkv 24.07.2011 21:44 356.434.321 11_Eyes-S01[E-D].mkv 24.07.2011 20:39 355.974.390 11_Eyes-01[E-D].mkv

Could you please take a look.

Thanks.

EndOfLine369 commented 8 years ago

I am able to replicate your issue. It seems like it is the same as reported above as "11Eyes" != "11 Eyes". but maybe not as clean should have handled the ''. But would think it would split the "Eyes-01" into "01"......strange.

EndOfLine369 commented 8 years ago

Ok, current status:

1) HAMA: Having language pref be used in the search function (will solve the Escaflowne mapping issue) Pending 2) ASS: String cleaning needed in removal test of foldername from filename (will solve 'Mobile Suit Gundam 0080 - War in the Pocket' != 'Mobile Suit Gundam 0080 War in the Pocket') Solution Codded. Thorough Testing Pending. 3) ASS: Move the 4digit tests after the multiple times check (will solve when there is a legit 4digit number in the series name 'Mobile Suit Gundam 0080 - War in the Pocket') Solution Codded. Thorough Testing Pending. 4) ASS: Issue in filename show cut off where it was leaving dashes (will solve '11_Eyes-02[E-D]' being trimmed incorrectly to '-02[E-D]' when folder name is '11 Eyes') Solution Codded. Thorough Testing Pending.

Do not add any more parsing issues onto this thread.

EndOfLine369 commented 8 years ago

Please test and reply back. https://gist.github.com/EndOfLine369/20159a2480502f0839fc

EndOfLine369 commented 8 years ago

Item 1 above for HAMA above is a wip as I am still working on understanding the 'search' piece of the code that I have not touched before.

sven-7 commented 8 years ago

Tested the issues that I was having for items 2 and 3 -- seems like the scanner is having no problem with both issues pertaining to Mobile Suit Gundam - 0080 War in the Pocket.

miracle152004 commented 8 years ago

Hi, tested the issue with 11 eyes. This works for me.

EndOfLine369 commented 8 years ago

ASS changes have been applied to the master.

@sven-7 For HAMA search update, I think this enhancement will have to be put on the back burner. I'm still trying to understand the code (its moving slow :frowning:). To correct the Escaflowne mismatch, you can either use the 'Fix incorrect match' in Plex, add in the anidb id into the foldername, or in an anidb.id file.

sven-7 commented 8 years ago

@EndOfLine369 No worries! I've already gone ahead and did the manual .id file to that folder for the time being, so this is a definite back-burner item as I haven't seen it happen elsewhere. Thanks for your work!

EndOfLine369 commented 8 years ago

Cool. Closing out this ticket then.