ZeroQI / Absolute-Series-Scanner

Seasons, absolute mode, Subfolders...
1.01k stars 155 forks source link

Scanner not producing logs for all series #188

Closed sven-7 closed 6 years ago

sven-7 commented 6 years ago

Hi @ZeroQI -- I went looking for 'The Seven Deadly Sins' (using tvdb4 here) logs and could not find them. I deleted the logs and re-scanned several times, but they did not appear. From my count, I'm getting logs from 456 series (912 total logs for filelist and scanner logs), but I have 499 series in my library.

I'm not seeing any pattern based off of how I have it scanning. I'm seeing anidb, tvdb, tvdb2, tvdb3, and tvdb4 series that have produced logs. Here are some of the missing ones I was able to pull out.

I'm missing 43 series worth of logs and that and all are series I have added or modified over the last several months -- seems to be about six months. The Seven Deadly Sins was affected by your tvdb4 policy change, so I had to change that. The others are ones I've Plex Danced, etc, but are still not showing up. Oddly enough, out of the last 45 series, only two are showing up in the logs (Golden Kamuy and That Time I Got Reincarnated as a Slime).

Let me know if you want me to run any tests.

Anime Series Logs.zip

ZeroQI commented 6 years ago

https://github.com/ZeroQI/Absolute-Series-Scanner/wiki/Batch-file-to-create-filelist.txt-and-dummy-library-from-it copy bat file in the folder, run once, attach result file. with that, I can reproduce your folder and test Maybe your database is corrupted but if not, I need to reproduce the problem...

EndOfLine369 commented 6 years ago

@sven-7 are you perhaps running on Windows? I'm also almost done fixing the logging issues in HAMA.

sven-7 commented 6 years ago

@ZeroQI - will do. I’ll do that shortly.

@EndOfLine369 - yep. You guessed it.

EndOfLine369 commented 6 years ago

Scan one of the ones missing and look in the '...\AppData\Local\Plex Media Server\Logs\Plex Media Scanner.log' files. See if you see a mention of error. Possibly related to file path length issues. EX "IOError: "

sven-7 commented 6 years ago

@ZeroQI - here is the filelist. filelist.zip

@EndOfLine369 - nope. I do not see any blatant errors related to any of the shows I called out. No signs of any IOError's either. logs.zip

EndOfLine369 commented 6 years ago

@sven-7, that is way too many log updates for a single update rescan. Just update a single entry and rescan.

sven-7 commented 6 years ago

My bad. Here's what a single one looks like. Interestingly, the scanner finally generated a log for this one.

logs.zip

EndOfLine369 commented 6 years ago

So the scanner can correctly create the log files as you just proved. The issue seems to be potentially an issue in the os not creating the files at handle creation. not sure we can do anything about that

sven-7 commented 6 years ago

Understood. Looks like I can force a log to generate by changing the folder name. It will show up on the next scan and the scan after I change it back, then it seems to disappear again. Again, it only seems to be limited to the series/folders updated within the last 6 or so months.

I renamed my top-level folder on my harddrives (i.e. 'Series' to something like 'Series (A-F)') and it's re-scanning the entire library now. Going to see how that experiment works out.

Considering this closed, if it's OS based. I'll report back if I stumble on to anything.

EndOfLine369 commented 6 years ago

Looks like I can force a log to generate by changing the folder name. It will show up on the next scan

Ok. So it logs when it sees it as new folder and Plex says the folder needs to be scanned.

and the scan after I change it back,

And scans the folder again as it sees it as new and Plex says the folder needs to be scanned.

then it seems to disappear again.

The scanner does not remove any files. If the log is created then deleted, that is not the scanner removing the log file.

sven-7 commented 6 years ago

The scanner does not remove any files. If the log is created then deleted, that is not the scanner removing the log file.

Sorry - I'm the one deleting them. I deleted the file several times to see how things were generating from scratch.

Ok. So it logs when it sees it as new folder and Plex says the folder needs to be scanned.

On the initial run, it picked up all folders are series. After that, the scanner doesn't pick up anything. It only produces the "_root" filelist and scanners.

_Logs.zip

EDIT: When I add a new show in, it creates a log. It does not seem to be creating logs for shows already in the library after the first time.

sven-7 commented 6 years ago

Re-opening, marked as question.

ZeroQI commented 6 years ago

well yeah, that's the whole point... Plex scans only when the folder changes, it was a pain to develop so it caches the scan so to speak while grouping folders are scanned at every scan (no choice), unless they contain a single folder. If it crashes, it won't re-scan the folder without a perceived change from it and doesn't always give the line with the error so it was and is a royal pain in the neck to develop

sven-7 commented 6 years ago

I get the point of it.

I was just pointing out a difference in behavior. Prior, logs were generated for all series. Now they aren’t. No big deal - just was unexpected behavior. Generating for only the ones that change makes sense.

ZeroQI commented 6 years ago

the legacy version scans all every time under the root scanner call which i use to do the grouping folders calls ran manually from the root scanner call, as all series are grouped into the root folder plex series if i add on the natural plex scanner folder call

It is a designed and desired feature as i had corruption of the database scanning every time... It allows super fast scanning speed as well, and the scanner behaviour is undocumented. was so happy when it worked as expected...

if logs are created then code is correct. yes, if you delete logs, it will not recreate them if folders haven't changed Glad I could precise the behavior. Take care.

On Tue, Oct 23, 2018 at 10:20 PM sven-7 notifications@github.com wrote:

I get the point of it.

I was just pointing out a difference in behavior. Prior, logs were generated for all series. Now they aren’t. No big deal - just was unexpected behavior. Generating for only the ones that change makes sense.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ZeroQI/Absolute-Series-Scanner/issues/188#issuecomment-432424339, or mute the thread https://github.com/notifications/unsubscribe-auth/AE7LZXSqYSoqQMSvzHsA_Sqsdd9TDCBjks5un4grgaJpZM4X0B4v .

sven-7 commented 6 years ago

Okay, cool. That makes sense. The scanner seemed to have had some undocumented/unnoticeable issues, as you stated above, with a few series. Once I used the new ones, it seemed to have recognized and rescanned those. It’s also WAY faster. Knowing it’s not a bug, but intentional helps. I think the speed is a massive improvement.