Skip to content

NoGenericFilenames plugin#2255

Closed
Sphirye wants to merge 20 commits into
Vendicated:mainfrom
Sphirye:no-generic-filenames-plugin
Closed

NoGenericFilenames plugin#2255
Sphirye wants to merge 20 commits into
Vendicated:mainfrom
Sphirye:no-generic-filenames-plugin

Conversation

@Sphirye
Copy link
Copy Markdown

@Sphirye Sphirye commented Mar 12, 2024

NoGenericFilenames

A plugin that prevents you from saving generic filenames as "image.png" or "video.mp4" so you dont have to deal with these annoying overwrite confirmation popups again.

image

Usage

It really just requires to enable the plugin, it will automatically rename the posible cases with a timestamp.

Options

Captura desde 2024-03-13 18-22-15

@Sphirye Sphirye marked this pull request as draft March 12, 2024 22:55
Comment thread src/plugins/noGenericFilenames/index.ts Outdated
Comment thread src/plugins/noGenericFilenames/index.ts Outdated
Comment thread src/plugins/noGenericFilenames/index.ts Outdated
Copy link
Copy Markdown
Contributor

@Kyuuhachi Kyuuhachi left a comment

Choose a reason for hiding this comment

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

I'm pretty sure this plugin should have .desktop or .discordDesktop suffix, since it's only applicable in Electron.

Comment thread src/plugins/noGenericFilenames/index.ts Outdated
Comment thread src/plugins/noGenericFilenames/index.ts Outdated
Comment thread src/plugins/noGenericFilenames/index.ts Outdated
Comment thread src/plugins/noGenericFilenames/index.ts Outdated
Comment thread src/plugins/noGenericFilenames/index.ts Outdated

patches: [
{
find: 'id:"save-image"',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why patch the context menu rather than the saveImage file it calls? Find string "Save image method called outside native app" perhaps.

Comment thread src/plugins/noGenericFilenames/index.ts Outdated
replacement: [
{
match: /(?<=SAVE_IMAGE_MENU_ITEM,)action:/,
replace: "action:()=>$self.saveImage(arguments[0]),"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will leave a stray action: ()=>..., A }. Won't cause any issues now, but if that variable happens to be named id in the next build, that wouldn't be very fun.

Copy link
Copy Markdown
Author

@Sphirye Sphirye Mar 27, 2024

Choose a reason for hiding this comment

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

Resuming this soon, im stuck resolving these (hopefully last) two issues

@Sphirye
Copy link
Copy Markdown
Author

Sphirye commented Mar 13, 2024

#2255 (comment)
#2255 (comment)

@Kyuuhachi May i ask for more details on both of these? I'm not sure about what you mean by that find string thing

@Kyuuhachi
Copy link
Copy Markdown
Contributor

Would be more convenient to discuss that over in #plugin-development if that's ok with you.

@Vendicated
Copy link
Copy Markdown
Owner

honestly I don't think this really solves the issue it's trying to solve. timestamp name is still as generic as unknown.png. it'd be better to just name files properly yourself. this is also quite niche anyway

thank you anyway

@Vendicated Vendicated closed this Sep 4, 2025
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.

6 participants