ZeroQI / Absolute-Series-Scanner

Seasons, absolute mode, Subfolders...
999 stars 155 forks source link

Multi-Episode files are causing scanner errors. #493

Closed Rikiki87 closed 2 months ago

Rikiki87 commented 3 months ago

Platform

Operating system and version: Archlinux Plex version: 1.40.2.8395

Expected Behavior

Multi-episode files should be parsed properly or at least not cause the scanner to fail.

Current Behavior

Series folder containing multi-episodes files get parsed improperly and throw an error. Those series either do not get added to the library at all or are missing those episodes.

Removing those episodes from the folder allow the rest of the series to be scanned properly.

Steps to Reproduce

  1. Have a series folder with at least one episode matching the following naming format: Gintama.E001-002.SDTV.-Ygg.mkv Mushi-Shi.S00E03-04.Bluray-1080p.x265-Sonarr.mkv
  2. The show either does not show up (in the case of gintama) or is missing episodes (in the case of mushi-shi)

There is no log file being created by ASS for those directories, no errors are being thrown in the "_root_.scanner.log" file but we can see the following in the Plex Media Scanner.log file:

May 21, 2024 14:46:44.020 [132988951527168] DEBUG - Performing a scan with 'Absolute Series Scanner' (language: fr virtual: 0).
May 21, 2024 14:46:44.020 [132988951527168] DEBUG -   * Scanning /data/Anime
May 21, 2024 14:46:44.020 [132988951527168] DEBUG - Scanner: Processing directory /data/Anime (parent: no)
May 21, 2024 14:46:44.027 [132988951527168] DEBUG - Skipping over directory '', as nothing has changed; removing 0 media items from map.
May 21, 2024 14:46:47.308 [132988951527168] DEBUG - Scanner: Processing directory /data/Anime/Mushi Shi [tvdb5-79214] (parent: yes)
May 21, 2024 14:46:47.325 [132988951527168] DEBUG - Directory had 49 files, database had 48 files, can't skip.
May 21, 2024 14:46:47.364 [132988951527168] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/Absolute Series Scanner.py", line 1144, in Scan
    season, ep = int(match.group('year')), '{}-{}-{}'.format(match.group('year'), match.group('month'), match.group('day'))
TypeError: int() argument must be a string or a number, not 'NoneType'
May 21, 2024 14:46:47.365 [132988951527168] DEBUG - [HCl#3] HTTP requesting PUT http://127.0.0.1:32400/activities/6002e82b-9b34-4043-b5fd-9f43f29ef8a3?percentComplete=%2B0%2E368029743&subtitle=Mushi%20Shi%20%5Btvdb5-79214%5D
May 21, 2024 14:46:47.365 [132988922419968] DEBUG - [HttpClient/HCl#3] HTTP/1.1 (0.0s) 200 response from PUT http://127.0.0.1:32400/activities/6002e82b-9b34-4043-b5fd-9f43f29ef8a3?percentComplete=%2B0%2E368029743&subtitle=Mushi%20Shi%20%5Btvdb5-79214%5D (reused)
May 21, 2024 14:46:47.365 [132988951527168] ERROR - We got an error scanning in /data/Anime
May 21, 2024 14:46:50.830 [132988951527168] DEBUG - Scanner: Processing directory /data/Anime/Gintama (2006) [tvdb2-79895] (parent: yes)
May 21, 2024 14:46:50.916 [132988951527168] DEBUG - Directory had 373 files, database had 0 files, can't skip.
May 21, 2024 14:46:51.076 [132988951527168] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/Absolute Series Scanner.py", line 1144, in Scan
    season, ep = int(match.group('year')), '{}-{}-{}'.format(match.group('year'), match.group('month'), match.group('day'))
TypeError: int() argument must be a string or a number, not 'NoneType'
May 21, 2024 14:46:51.077 [132988951527168] DEBUG - [HCl#1e4] HTTP requesting PUT http://127.0.0.1:32400/activities/6002e82b-9b34-4043-b5fd-9f43f29ef8a3?percentComplete=%2B0%2E368029743&subtitle=Gintama%20%282006%29%20%5Btvdb2-79895%5D
May 21, 2024 14:46:51.078 [132988922419968] DEBUG - [HttpClient/HCl#1e4] HTTP/1.1 (0.0s) 200 response from PUT http://127.0.0.1:32400/activities/6002e82b-9b34-4043-b5fd-9f43f29ef8a3?percentComplete=%2B0%2E368029743&subtitle=Gintama%20%282006%29%20%5Btvdb2-79895%5D (reused)
May 21, 2024 14:46:51.078 [132988951527168] ERROR - We got an error scanning in /data/Anime
May 21, 2024 14:46:51.864 [132988951527168] WARN - Scanning the location /data/Anime did not complete
May 21, 2024 14:46:51.864 [132988951527168] DEBUG - [HCl#261] HTTP requesting PUT http://127.0.0.1:32400/activities/6002e82b-9b34-4043-b5fd-9f43f29ef8a3?percentComplete=99.000000
May 21, 2024 14:46:51.865 [132988922419968] DEBUG - [HttpClient/HCl#261] HTTP/1.1 (0.0s) 200 response from PUT http://127.0.0.1:32400/activities/6002e82b-9b34-4043-b5fd-9f43f29ef8a3?percentComplete=99.000000 (reused)
May 21, 2024 14:46:51.865 [132988951527168] DEBUG - Since it was an incomplete scan, we are not going to whack missing media.
Rikiki87 commented 2 months ago

Appears to have been fixed, thanks!