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

Extract file name; re.match only checks the start #1528

Closed
wants to merge 1 commit into from

Conversation

chazlarson
Copy link
Contributor

Description

re.match() only checks the beginning of the string, so something like:

'config/assets/3 1 2 Hours (2021) {imdb-tt13475394} {tmdb-847208}/Season01_background.jpg'

Wouldn't get stopped by the dimensional-asset-rename gate and would get renamed.

Now we grab just the filename [Season01_background.jpg] and do the re.match() on it.

I did this rather than use re.search() to guard against something like:

config/assets/That Movie About S01E04 of Friends (2021)/this-should-get-renamed.jpg

Issues Fixed or Closed

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code was submitted to the nightly branch of the repository.

@meisnate12
Copy link
Member

Added in a slightly different way here

@meisnate12 meisnate12 closed this Jul 24, 2023
@chazlarson chazlarson deleted the bug-1457 branch December 4, 2023 23:03
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

Successfully merging this pull request may close these issues.

2 participants