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

dimensional_asset_rename renaming formatted assets #1457

Closed
polklabs opened this issue May 31, 2023 · 2 comments
Closed

dimensional_asset_rename renaming formatted assets #1457

polklabs opened this issue May 31, 2023 · 2 comments
Assignees
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet

Comments

@polklabs
Copy link

Version Number

1.19.0

What branch are you on?

master

Describe the Bug

When dimensional_asset_rename is true PMM will rename any file in the asset folder even if it is already formatted to another purpose.

Example:

assets > Obi-Wan Kenobi > Season01.jpg will be renamed to poster.jpg even though it has a valid asset name.

Assets with valid names should be ignored with dimensional_asset_rename is on:

  • Season##.ext
  • Season##_background.ext
  • S##E##.ext
  • S##E##_background.ext

This allows me/user to keep the Plex assigned poster but override season posters or episode posters, while also not having to rename posters.ext when adding to asset directory.

This can be solved by just turning dimensional_asset_rename off and taking a few seconds to rename the file

Relevant Collection/Overlay/Playlist Definition

libraries:                                 
  TV Shows:
    ...
    operations:
      assets_for_all: true
settings:
  dimensional_asset_rename: true

Logs

No response

@polklabs polklabs added bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet labels May 31, 2023
@chazlarson
Copy link
Contributor

chazlarson commented Jul 22, 2023

The code is attempting to skip things with valid asset names:

                if file.lower().endswith((".png", ".jpg", ".jpeg", "webp")) and not re.match(r"s\d+e\d+|season\d+", file.lower()):

That's the gate it has to go through to get to the rename code.

Which does seem to catch these names:
image

This:

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

gets through the filter, though, when it shouldn't.

Some logic error there.

@meisnate12
Copy link
Member

fixed in nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet
Projects
None yet
Development

No branches or pull requests

3 participants