{"action":"created","issue":{"url":"https://api.github.com/repos/MediaBrowser/Emby.Naming/issues/4","labels_url":"https://api.github.com/repos/MediaBrowser/Emby.Naming/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/MediaBrowser/Emby.Naming/issues/4/comments","events_url":"https://api.github.com/repos/MediaBrowser/Emby.Naming/issues/4/events","html_url":"https://github.com/MediaBrowser/Emby.Naming/pull/4","id":107532763,"number":4,"title":"Fix incorrect parsing of ending episode numbers","user":{"login":"softworkz","id":4985349,"avatar_url":"https://avatars.githubusercontent.com/u/4985349?v=3","gravatar_id":"","url":"https://api.github.com/users/softworkz","html_url":"https://github.com/softworkz","followers_url":"https://api.github.com/users/softworkz/followers","following_url":"https://api.github.com/users/softworkz/following{/other_user}","gists_url":"https://api.github.com/users/softworkz/gists{/gist_id}","starred_url":"https://api.github.com/users/softworkz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softworkz/subscriptions","organizations_url":"https://api.github.com/users/softworkz/orgs","repos_url":"https://api.github.com/users/softworkz/repos","events_url":"https://api.github.com/users/softworkz/events{/privacy}","received_events_url":"https://api.github.com/users/softworkz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-21T15:05:38Z","updated_at":"2015-09-21T15:23:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MediaBrowser/Emby.Naming/pulls/4","html_url":"https://github.com/MediaBrowser/Emby.Naming/pull/4","diff_url":"https://github.com/MediaBrowser/Emby.Naming/pull/4.diff","patch_url":"https://github.com/MediaBrowser/Emby.Naming/pull/4.patch"},"body":"When files are named like \"series-s09e14-1080p.mkv\" the resolution\r\nindicator was erroneously parsed as ending episode number"},"comment":{"url":"https://api.github.com/repos/MediaBrowser/Emby.Naming/issues/comments/142014188","html_url":"https://github.com/MediaBrowser/Emby.Naming/pull/4#issuecomment-142014188","issue_url":"https://api.github.com/repos/MediaBrowser/Emby.Naming/issues/4","id":142014188,"user":{"login":"softworkz","id":4985349,"avatar_url":"https://avatars.githubusercontent.com/u/4985349?v=3","gravatar_id":"","url":"https://api.github.com/users/softworkz","html_url":"https://github.com/softworkz","followers_url":"https://api.github.com/users/softworkz/followers","following_url":"https://api.github.com/users/softworkz/following{/other_user}","gists_url":"https://api.github.com/users/softworkz/gists{/gist_id}","starred_url":"https://api.github.com/users/softworkz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softworkz/subscriptions","organizations_url":"https://api.github.com/users/softworkz/orgs","repos_url":"https://api.github.com/users/softworkz/repos","events_url":"https://api.github.com/users/softworkz/events{/privacy}","received_events_url":"https://api.github.com/users/softworkz/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T15:23:42Z","updated_at":"2015-09-21T15:23:42Z","body":"Yeah, I understand the intention of leaving these things configurable.\r\nBut pure regex parsing has its limitations: Even if (and I'm not sure if at all) these special cases I am trying to fix could be handled by regular expressions:\r\n\r\n- It would have to be included in all multi-episode expressions\r\n- These would become awfully overloaded\r\n- Even less people would understand them \r\n\r\nOn the other hand: My change will work with any RegEx expression that someone might configure.\r\nIt is rather some kind of plausibility check for the ending episode number:\r\n\r\n- If the parsed ending episode substring is followed by another digit, I think it is safe to assume that whatever number was parsed via RegEx is wrong anyway\r\n- If the parsed ending episode substring is followed by 'p' or 'i': OK, this assumption is perhaps a bit less stable. But we should keep in mind that we are not authoring a perfectly generic parser, but instead we are still dealing with series episode names. An I think in this case the 'p'/'i' assumption will not do any harm or interfere with the actual RegEx parsing\r\n\r\nWhat do you think?\r\n\r\n"}}