mirror of
https://github.com/imputnet/cobalt.git
synced 2026-05-22 14:24:23 -05:00
custom filename templates #420
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ascpixi on GitHub (Sep 7, 2024).
describe the feature you'd like to see
A custom filename format feature would be useful for e.g. those that like to have a consistent naming scheme when archiving videos or audio. For example, if cobalt were to support an arbitrary JavaScript snippet, one could specify the following template:
...where the variables are defined as follows:
...cobalt would download the file as
[YOUTUBE] Rick Astley - Never Gonna Give You Up (Official Music Video) (dQw4w9WgXcQ).mp4. As audio and video files have different parameters, the user would be able to specify a different template for videos and audio.As I have not contributed to cobalt, I'm not sure if
evalwould be a security risk (I don't know if the filename is determined client-side or server-side). If it is, a simple token replacement would also be great, e.g.[$service] $name ($id), where cobalt would simply do:@KwiatekMiki commented on GitHub (Sep 7, 2024):
#228
@ascpixi commented on GitHub (Sep 7, 2024):
Ah, I see, thanks. Closing as a duplicate.