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

titleDiff plugin #77

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

titleDiff plugin #77

wants to merge 3 commits into from

Conversation

o-fl0w
Copy link

@o-fl0w o-fl0w commented Sep 25, 2022

Plugin with a task. When ran tags all scenes where title differs from filename (with or without extension).

@bnkai bnkai added the plugin Plugins label Oct 12, 2022
Comment on lines 30 to 31
var filename = scenes[i].path.split(/.*[\/|\\]/)[1];
var filenameNoExt = filename.replace(/\.[^/.] $/, "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an extra check for future proofing here?
With the stashapp/stash#3006 PR there can be scenes with no files. For those the path is empty and thus you get Plugin returned error: TypeError: Cannot access member 'replace' of undefined and the plugin exits. For those cases i think just skipping the scene is ok

@scruffynerf scruffynerf self-assigned this Oct 20, 2023
@scruffynerf
Copy link
Contributor

@o-fl0w , you still around?

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

Successfully merging this pull request may close these issues.

3 participants