I never had this issue before. Naming scheme of the files seems OK. This task works well for all other files.
It fails due to my rename plugin. The filename is missing quality, but I am using an IF statement so I would not expect the crash.
move-series:
priority: 31
template:
- disable-seen-retry
- series-metainfo
- series-guessit
filesystem:
path: "/{? folder.root ?}{? folder.downseries ?}"
recursive: yes
retrieve: files
regexp: '.*\.(avi|mkv|mp4)$'
accept_all: yes
move:
to: "/{? folder.root ?}{? folder.series ?}{{tvdb_series_name|escape|replace(''', '')|pathscrub}}/S{{series_season|pad(2)}}/"
rename: "{{tvdb_series_name|escape|replace(''', '')|pathscrub}} - {{series_id}}{% if tvdb_ep_name|default(False) %} - {{tvdb_ep_name|pathscrub}}{% endif %}{% if quality|default(False) %} - [{{quality}}]{% endif %}"
along:
extensions:
- srt
- sub
subdirs:
- Subs
clean_source: 50
kodi_library:
action: scan
category: video
url: http://192.168.1.1
port: 8080
list_add:
- subtitle_list:
list: subtitles
path: "{{location}}"
remove_after: 7 days
exec:
on_exit:
phase: find "/{? folder.root ?}{? folder.downseries ?}"* -type d -empty -delete
osmc@RPi:~$ /home/osmc/flexget/bin/flexget --loglevel debug execute --tasks move-series
2018-01-30 11:57 DEBUG manager Figuring out config load paths
2018-01-30 11:57 DEBUG manager Adding virtualenv path
2018-01-30 11:57 DEBUG manager Found config: /home/osmc/flexget/config.yml
2018-01-30 11:57 DEBUG manager Config file /home/osmc/flexget/config.yml selected
2018-01-30 11:57 DEBUG manager sys.defaultencoding: utf-8
2018-01-30 11:57 DEBUG manager sys.getfilesystemencoding: ascii
2018-01-30 11:57 DEBUG manager flexget detected io encoding: ascii
2018-01-30 11:57 DEBUG manager os.path.supports_unicode_filenames: False
2018-01-30 11:57 WARNING manager Your locale declares ascii as the filesystem encoding. Any plugins reading filenames from disk will not work properly for filenames containing non-ascii characters. Make sure your locale env variables are set up correctly for the environment which is launching FlexGet.
There is a FlexGet process already running for this config, sending execution there.
2018-01-30 11:57 DEBUG manager Sending command to running FlexGet process: ['--loglevel', 'debug', 'execute', '--tasks', 'move-series']
2018-01-30 11:57 DEBUG cron_env Encoding utf-8 stored
2018-01-30 11:57 DEBUG util.simple_persistence setting key terminal_encoding value 'utf-8'
2018-01-30 11:57 DEBUG task move-series executing move-series
2018-01-30 11:57 DEBUG template move-series Merging template disable-seen-retry into task move-series
2018-01-30 11:57 DEBUG template move-series Merging template series-metainfo into task move-series
2018-01-30 11:57 DEBUG template move-series Merging template series-guessit into task move-series
2018-01-30 11:57 DEBUG template move-series Merging template global into task move-series
2018-01-30 11:57 DEBUG disable move-series Disabled built-in plugin(s): seen, seen_info_hash, retry_failed
2018-01-30 11:57 DEBUG exec move-series phase on_start not configured
2018-01-30 11:57 VERBOSE filesystem move-series Starting to scan folders.
2018-01-30 11:57 VERBOSE filesystem move-series Scanning folder /mnt/USBDRIVE/Downloads/tempseries/. Recursion is set to True.
2018-01-30 11:57 DEBUG filesystem move-series Scanning /mnt/USBDRIVE/Downloads/tempseries/
2018-01-30 11:57 DEBUG filesystem move-series Checking if /mnt/USBDRIVE/Downloads/tempseries/Chicago Med Season 2 Complete 720p HDTV x264 qualifies to be added as an entry.
2018-01-30 11:57 DEBUG filesystem move-series Checking if /mnt/USBDRIVE/Downloads/tempseries/Chicago Med Season 2 Complete 720p HDTV x264/Chicago Med S02E20 Generation Gap.mkv qualifies to be added as an entry.
2018-01-30 11:57 DEBUG filesystem move-series Checking if /mnt/USBDRIVE/Downloads/tempseries/Chicago Med Season 2 Complete 720p HDTV x264/Chicago Med S02E21 Deliver Us.mkv qualifies to be added as an entry.
2018-01-30 11:57 DEBUG filesystem move-series Checking if /mnt/USBDRIVE/Downloads/tempseries/Chicago Med Season 2 Complete 720p HDTV x264/Chicago Med S02E22 White Butterflies.mkv qualifies to be added as an entry.
2018-01-30 11:57 DEBUG filesystem move-series Checking if /mnt/USBDRIVE/Downloads/tempseries/Chicago Med Season 2 Complete 720p HDTV x264/Chicago Med S02E23 Love Hurts.mkv qualifies to be added as an entry.
2018-01-30 11:57 DEBUG exec move-series phase on_input not configured
2018-01-30 11:57 DEBUG backlog move-series 4 entries purged from backlog
2018-01-30 11:57 VERBOSE details move-series Produced 4 entries.
2018-01-30 11:57 DEBUG parser_guessit move-series Parsing series: `Chicago Med S02E20 Generation Gap` [options: {'name': None, 'identified_by': 'auto', 'allow_seasonless': False}]
2018-01-30 11:57 DEBUG parser_guessit move-series Parsing result: <GuessitParsedSerie(name=Chicago Med,id=20,season=2,episode=20,quality=unknown,proper=0,status=OK)> (in 57.078999999987445 ms)
2018-01-30 11:57 DEBUG parser move-series NAME SUCCESS: ^(?:(?:\[[^\[\]]*\])|(?:HD.720p?:)|(?:HD.1080p?:)|(?:HD.2160p?:))?(?:[^\w&]|_)*(Chicago(?:[^\w&]|_)*Med)(?:\b|_)(?:[^\w&]|_)* matched to Chicago Med S02E20 Generation Gap
2018-01-30 11:57 DEBUG parser_guessit move-series Parsing series: `Chicago Med S02E21 Deliver Us` [options: {'name': None, 'identified_by': 'auto', 'allow_seasonless': False}]
2018-01-30 11:57 DEBUG parser_guessit move-series Parsing result: <GuessitParsedSerie(name=Chicago Med (US),id=21,season=2,episode=21,quality=unknown,proper=0,status=OK)> (in 60.728999999980715 ms)
2018-01-30 11:57 DEBUG parser move-series FAIL: name regexps ['^(?:(?:\\[[^\\[\\]]*\\])|(?:HD.720p?:)|(?:HD.1080p?:)|(?:HD.2160p?:))?(?:[^\\w&]|_)*(Chicago(?:[^\\w&]|_)*Med(?:[^\\w&]|_)*Us)(?:\\b|_)(?:[^\\w&]|_)*'] do not match Chicago Med S02E21 Deliver Us
2018-01-30 11:57 CRITICAL task move-series BUG: Unhandled error in plugin metainfo_series: Series flagged invalid
2018-01-30 11:57 CRITICAL manager move-series An unexpected crash has occurred. Writing crash report to /home/osmc/flexget/crash_report.2018.01.30.115722665595.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.12.0
2018-01-30 11:57 DEBUG manager move-series Traceback:
Traceback (most recent call last):
File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/task.py", line 486, in __run_plugin
return method(*args, **kwargs)
File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/event.py", line 23, in __call__
return self.func(*args, **kwargs)
File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/metainfo/series.py", line 32, in on_task_metainfo
self.guess_entry(entry)
File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/metainfo/series.py", line 47, in guess_entry
populate_entry_fields(entry, parsed, config)
File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/filter/series.py", line 1302, in populate_entry_fields
if parser.identifier:
File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/parsers/parser_common.py", line 546, in identifier
return self.identifiers[0]
File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/parsers/parser_common.py", line 531, in identifiers
raise Exception('Series flagged invalid')
Exception: Series flagged invalid
2018-01-30 11:57 WARNING task move-series Aborting task (plugin: metainfo_series)
2018-01-30 11:57 DEBUG backlog move-series Remembering all entries to backlog because of task abort.
2018-01-30 11:57 DEBUG backlog move-series Saving Chicago Med S02E20 Generation Gap
2018-01-30 11:57 DEBUG backlog move-series Saving Chicago Med S02E21 Deliver Us
2018-01-30 11:57 DEBUG backlog move-series Saving Chicago Med S02E22 White Butterflies
2018-01-30 11:57 DEBUG backlog move-series Saving Chicago Med S02E23 Love Hurts
2018-01-30 11:57 DEBUG disable move-series Re-enabled builtin plugin(s): seen, seen_info_hash, retry_failed
Even when I add 720p
to the filename it fails:
2018-01-30 12:19 DEBUG parser_guessit move-series Parsing series: `Chicago Med S02E20 Generation Gap - 720p` [options: {'name': None, 'identified_by': 'auto', 'allow_seasonless': False}]
2018-01-30 12:19 DEBUG parser_guessit move-series Parsing result: <GuessitParsedSerie(name=Chicago Med,id=20,season=2,episode=20,quality=720p,proper=0,status=OK)> (in 65.42100000001483 ms)
2018-01-30 12:19 DEBUG parser move-series NAME SUCCESS: ^(?:(?:\[[^\[\]]*\])|(?:HD.720p?:)|(?:HD.1080p?:)|(?:HD.2160p?:))?(?:[^\w&]|_)*(Chicago(?:[^\w&]|_)*Med)(?:\b|_)(?:[^\w&]|_)* matched to Chicago Med S02E20 Generation Gap - 720p
2018-01-30 12:19 DEBUG parser_guessit move-series Parsing series: `Chicago Med S02E21 Deliver Us - 720p` [options: {'name': None, 'identified_by': 'auto', 'allow_seasonless': False}]
2018-01-30 12:19 DEBUG parser_guessit move-series Parsing result: <GuessitParsedSerie(name=Chicago Med (US),id=21,season=2,episode=21,quality=720p,proper=0,status=OK)> (in 70.03700000001345 ms)
2018-01-30 12:19 DEBUG parser move-series FAIL: name regexps ['^(?:(?:\\[[^\\[\\]]*\\])|(?:HD.720p?:)|(?:HD.1080p?:)|(?:HD.2160p?:))?(?:[^\\w&]|_)*(Chicago(?:[^\\w&]|_)*Med(?:[^\\w&]|_)*Us)(?:\\b|_)(?:[^\\w&]|_)*'] do not match Chicago Med S02E21 Deliver Us - 720p
2018-01-30 12:19 CRITICAL task move-series BUG: Unhandled error in plugin metainfo_series: Series flagged invalid