So this is a pretty simple bug. Episode not found in file scan due to the name of the episode. I have followed recommended naming convention.
File name: Marvel's Agents of S.H.I.E.L.D. - S01E02 - 0-8-4 - 720p WEB-DL.mkv
I suspect it is the use of the dashes that causes the issue. When I remove the episode name (0-8-4) from the file it is identified correctly. Logs below.
Branch/Commit: Master / e1af3a8af8dacccfb9c7adf45f08090a68875af2
OS: Windows-2012ServerR2-6.3.9600
What you did: Re-Scan Files on TV Show
What happened: Episode not found
What you expected: Episode to be found
Logs:
2017-05-07 11:01:45 INFO SHOWQUEUE-REFRESH :: 263365: No episode number found in D:\TV Shows\Marvel's Agents of S.H.I.E.L.D\Season 1\Marvel's Agents of S.H.I.E.L.D. - S01E02 - 0-8-4 - 720p WEB-DL.mkv, ignoring it
2017-05-07 11:01:45 INFO SHOWQUEUE-REFRESH :: 263365: parse_result: S01 [ABD: False] [ANIME: False] [whichReg: [u'season_only']]
2017-05-07 11:01:41 INFO SHOWQUEUE-REFRESH :: Performing refresh on Marvel's Agents of S.H.I.E.L.D.
It's most likely certainly related to the dashes in the episode name like you mentioned.
Due to the dashes, the parser is confused and nothing could be found...
Can I advise you another naming pattern which should not give any problems?
I use it for all my series and didn't have an issue yet:

I did some debugging and I found out that there is something in the code that causes the 'no match' result.
@miigotu @sharkykh
Any idea why this is done?
https://github.com/SickRage/SickRage/blob/develop/sickbeard/name_parser/parser.py#L149
Because the 'no_season' regex parses more than 4 extra_ep_num values, the matches are cleared and nothing could be found. I just tested it myself by putting the value to > 10 and now it parses with success.
What's the purpose of this check? Perhaps this can even be removed?
PS: using this naming pattern:

@h3llrais3r Yeah I asked @miigotu about this some time ago: https://github.com/SickRage/SickRage/issues/2925#issuecomment-280966290
I just tested it myself by putting the value to > 10 and now it parses with success.
@h3llrais3r I think SR parses it as extra episodes... then it's gonna add them to the database and maybe cause some issues?
Ok, I saw the reasons, but shouldn't it be better to just skip that regex than to clear the matches and break the loop?
EDIT: like this?
if 'extra_ep_num' in named_groups and match.group('extra_ep_num'):
tmp_episodes = range(ep_num, self._convert_number(match.group('extra_ep_num')) + 1)
if len(tmp_episodes) > 4:
continue
else:
tmp_episodes = [ep_num]
Is it not simpler and more fool-proof to do a query like: *X(S|s)##(E|e)##X*
example: XS01e01X
Where X is the same character on both sides of S01e01. This seems better to me.
@TheRealNoob
It's not that simple... all regexes are used when parsing... and the best one is chosen.
See https://github.com/SickRage/SickRage/blob/develop/sickbeard/name_parser/regexes.py
Due to the scenario explained above, it clears the results an nothing can be found.
I'm not expecting that changes be made to accomodate a single episode, but I think it must be possible. Especially considering I am following the recommended naming convention.
Can you show me your settings than and also where you got those recommended naming convention?
IMHO it's never a good idea to put spaces and dashes in names, certainly not for media files.
That's why I always use the pattern with the dots.
EDIT: and again like I explained above, it should normally work, the reason why it isn't working is due to the regex that thinks it's more than 4 episodes.
I'll have to check with the other collaborators if we can find a way to fix this. (I suggested a fix above, but we still need to wait for feedback of @miigotu)
It's Sickrage's default naming convention, and Plex's recommended.
Season %S/%SN - S%0SE%0E - %EN - %QN
EDIT: I should point out if not already obvious, the episode name in question is "0-8-4".
@h3llrais3r add that show, add a file for that episode, and try your suggested changes. There is absolutely a better way to fix the >10 episodes problem, the code was just added to prevent mass wrong parses added to the db, so it definitely can be improved.
I just switched to SickRage and when I imported my library, I ran into the same problem with this episode, as well. But let me add to the frenzy.
2017-05-09 19:19:52 INFO SHOWQUEUE-REFRESH :: 78804: No episode number found in /share/Multimedia/Serien/Doctor Who (2005)/Season 00/Doctor Who (2005) - S00E61-E65 - Pond Life - SDTV.avi, ignoring it
2017-05-09 19:19:52 INFO SHOWQUEUE-REFRESH :: 78804: parse_result: S00 [ABD: False] [ANIME: False] [whichReg: [u'season_only']]
2017-05-09 19:19:47 INFO SHOWQUEUE-REFRESH :: Performing refresh on Doctor Who (2005)
I figured that there was a 4 episode limit. I tried a few different names, and it would catch it (incorrectly of course but correctly according to the name) when named for example
Doctor Who (2005) - S00E61E62E63E64 - Pond Life - SDTV.avi
but not when having a 5th episode added in any way.
Here's another:
72227: No episode number found in /share/Multimedia/Serien/Two and a Half Men (2003)/Season 11/Two and a Half Men - S11E21 - Dial 1-900-Mix-a-Lot - 720p HDTV.mkv, ignoring it
The seldom instance that it does not correctly match one file, is MUCh better than it incorrectly matching one like Two and a Half Men - S11E21 - Dial 1-900-Mix-a-Lot - 720p HDTV.mkv and creating 900 episodes in the show.
Well, no doubt about that! Still, wouldn't it be feasible to distinguish between <whitespace>-<whitespace> and <alphanum>-<alphanum> or something? That is, for splitting up the string or something before regexing season/episode numbering.
@h3llrais3r add that show, add a file for that episode, and try your suggested changes. There is absolutely a better way to fix the >10 episodes problem, the code was just added to prevent mass wrong parses added to the db, so it definitely can be improved.
@miigotu I have tested the proposed change locally and it works for that show. So basicly we are skipping that specific regex match, not all matches...
So we only remove https://github.com/SickRage/SickRage/blob/develop/sickbeard/name_parser/parser.py#L150
Postprocessing log:
Processing in folder C:\Temp\postprocessing
Processing C:\Temp\postprocessing
Processing folder C:\Temp\postprocessing
Processing C:\Temp\postprocessing\Marvel's Agents of S.H.I.E.L.D - S01E02 - 0-8-4 - 720p WEB-DL.mkv (None)
Retrieving episode object for 1x2
Snatch history had a quality in it, using that: 720p WEB-DL
Is ep a priority download: False
File C:\Temp\completed\Marvel's Agents of S.H.I.E.L.D\Marvel's Agents of S.H.I.E.L.D - S01E02 - 0-8-4 - 720p WEB-DL.mkv doesn't exist so there's no worries about replacing it
No associated files for C:\Temp\completed\Marvel's Agents of S.H.I.E.L.D\Marvel's Agents of S.H.I.E.L.D - S01E02 - 0-8-4 - 720p WEB-DL.mkv were found during this pass
Using original release name Marvel's Agents of S.H.I.E.L.D - S01E02 - 0-8-4 - 720p WEB-DL.mkv
Destination folder for this episode: C:\Temp\completed\Marvel's Agents of S.H.I.E.L.D
Moving file from C:\Temp\postprocessing\Marvel's Agents of S.H.I.E.L.D - S01E02 - 0-8-4 - 720p WEB-DL.mkv to C:\Temp\completed\Marvel's Agents of S.H.I.E.L.D\Marvel's Agents of S.H.I.E.L.D - S01E02 - 0-8-4 - 720p WEB-DL.mkv
Processing succeeded for C:\Temp\postprocessing\Marvel's Agents of S.H.I.E.L.D - S01E02 - 0-8-4 - 720p WEB-DL.mkv
Processing C:\Temp\postprocessing\Two and a Half Men - S11E21 - Dial 1-900-Mix-a-Lot - 720p HDTV.mkv (None)
Retrieving episode object for 11x21
Looking up quality for name postprocessing, got Unknown
Looking up quality for name Two and a Half Men - S11E21 - Dial 1-900-Mix-a-Lot - 720p HDTV.mkv, got Unknown
Guessing quality for name Two and a Half Men - S11E21 - Dial 1-900-Mix-a-Lot - 720p HDTV.mkv, got Unknown
Is ep a priority download: False
There is no existing file so there's no worries about replacing it
Using original release name Two and a Half Men - S11E21 - Dial 1-900-Mix-a-Lot - 720p HDTV.mkv
Destination folder for this episode: C:\Temp\completed\Two and a Half Men
Moving file from C:\Temp\postprocessing\Two and a Half Men - S11E21 - Dial 1-900-Mix-a-Lot - 720p HDTV.mkv to C:\Temp\completed\Two and a Half Men\Two and a Half Men - S11E21 - Dial 1-900-Mix-a-Lot - Unknown.mkv
Processing succeeded for C:\Temp\postprocessing\Two and a Half Men - S11E21 - Dial 1-900-Mix-a-Lot - 720p HDTV.mkv
Successfully processed
As you can see only 1 episode is added for both shows 馃槃
@h3llrais3r Don't you also need to change break to continue?
if len(tmp_episodes) > 4:
continue
I updated to the latest master. It did find my episode this time:
Marvel's Agents of S.H.I.E.L.D. - S01E02 - 0-8-4 - 720p WEB-DL.mkv
Thank you all for the great work you do :)
-TheRealNoob
Most helpful comment
I updated to the latest master. It did find my episode this time:
Marvel's Agents of S.H.I.E.L.D. - S01E02 - 0-8-4 - 720p WEB-DL.mkv
Thank you all for the great work you do :)
-TheRealNoob