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

Episode mathcing regex pattern unclear #1

Closed
Artish357 opened this issue Mar 25, 2020 · 2 comments
Closed

Episode mathcing regex pattern unclear #1

Artish357 opened this issue Mar 25, 2020 · 2 comments

Comments

@Artish357
Copy link

First thing I want to mention: this project is awesome!
But the documentation is a bit lacking outside of source code, so I ran into a wall while trying to organize my collection
I have a folder Nichijou, where files are labeled like Nichijou XX.mpv
:add Nichijou fails, because it can't parse episode names
If i rename them to Nichijou - XX.mpv, it works
How do I write a regex to parse this? I tried a couple things, and they didn't work.
Also, any chance of adding that regex as one of the default?

Thanks for your efforts!

@Acizza
Copy link
Owner

Acizza commented Mar 25, 2020

Hi!

I apologize for the lack of documentation. I plan on addressing it at some point once I have some more free time.

As for your issue, you should be able to use the following command to add Nichijou:
:add Nichijou matcher=".+{episode}"

The {episode} fragment is basically a wrapper around the regex pattern \d+. So, for example, the episode matcher pattern .+? - EP{episode} will be expanded internally to .+? - EP(\d+).

The default regex pattern to detect episodes tries to match as many formats as possible, but it is large enough now that changing it even a little bit tends to break one format or another (if you're curious, it is located here). I have plans to write an episode parser in pure Rust code, which should make it much easier to add new types of formats.

EDIT: I have updated the README to better explain how adding a series works. It also fully documents the add command and its various options.

@Artish357
Copy link
Author

Thanks, it worked!
README is also really helpful 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants