Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update regex for nfo season matching #147

Merged
merged 3 commits into from Feb 25, 2023
Merged

Update regex for nfo season matching #147

merged 3 commits into from Feb 25, 2023

Conversation

rpungello
Copy link
Contributor

The current regex used for extracting season & episode numbers from a filename for NFO creation only works if you use titles at the end of the video filename (channel - s01e01 - title.mp4).

If you strip that off to cut down on excessively long filenames (and potential issues with special characters in video filenames), the regex won't match season/episode info as the trailing dash will be absent.
I've been trying to use "channel - s01e01.mp4" so the filenames are more manageable, and use NFO files to store the titles, which are then read by Jellyfin.

It seems like season & episode numbers would always be numeric, so this simplified regex should be more reliable, unless there's some scenario I'm unaware of. I suppose there could be fringe cases where this causes false matches, but that seems unlikely.

@Inrixia Inrixia changed the base branch from master to dev February 25, 2023 02:58
@Inrixia
Copy link
Owner

Inrixia commented Feb 25, 2023

Thanks, this is something I was already thinking about so saved me the trouble :)

@Inrixia Inrixia merged commit 3de023c into Inrixia:dev Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants