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

Punctuation glitch #3

Open
Ghostotw opened this issue Aug 28, 2024 · 5 comments
Open

Punctuation glitch #3

Ghostotw opened this issue Aug 28, 2024 · 5 comments

Comments

@Ghostotw
Copy link

I don't know if you're still working on this. Or if this is an issue, or just something I'm doing wrong.
I tried removing a comma from the middle of the title of a series episode and the preview showed it was going to put that title on every episode in the folder. When I put the comma back, the preview reverted to the correct titles. The series name and episode numbers were all correct. It just wanted to spam the same title across all episodes.

@Inspirateur
Copy link
Owner

Inspirateur commented Aug 29, 2024

Yes, I've noticed some cases where the program didn't work correctly as well, I'm going to look into it :)

@Inspirateur
Copy link
Owner

So I just finished reworking the regex extraction algorithm, and put it in its own crate (see https://crates.io/crates/auto-regex). Can you compile the newest version and try again ? If it doesn't work I'd like to take a look at the actual file names if possible :)

@Ghostotw
Copy link
Author

Ghostotw commented Sep 3, 2024

Looking at the info in the terminal, it's just making three capture groups. But it isn't treating the comma as one of the capture groups.
So whenever I try deleting any of the commas here:

Bewitched - S01E01 - I, Darrin, Take This Witch, Samantha

Every other file in the folder becomes:

Bewitched - S01E${1} - I, Darrin, Take This Witch, ${3}

Where ${3} is the last word in the name for that file and minus whatever comma I tried to delete.

[2024-09-03T17:19:51Z INFO srenamer] rule: (?i)^bewitched \- s01e(\d+) \- (.+) (.+)\.avi$ [2024-09-03T17:19:51Z INFO srenamer] rename: Bewitched - S01E${1} - ${2} ${3}.avi [2024-09-03T17:19:58Z INFO srenamer] rule: (?i)^bewitched \- s01e(\d+) \- (.+) (.+)\.avi$ [2024-09-03T17:19:58Z INFO srenamer] rename: Bewitched - S01E${1} - I, Darrin Take This Witch, ${3}.avi

@Inspirateur
Copy link
Owner

Mh I think I see what's happening, I'll do another pass on it :)

@Inspirateur
Copy link
Owner

Ok so it turns out this is very hard to "fix" as the program was not intended to allow modification of the "variable parts" in the titles, and the name of the episode is definitely a "variable part".

What would you expect the program to do to the other files if you take out a comma in the title ?

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