StefanLobbenmeier / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
1.54k stars 61 forks source link

release_date or uploaded_date in template filename #54

Open gddrx opened 1 year ago

gddrx commented 1 year ago

%(release_date)s_%(title).200s.%(ext)s

What is wrong in filename template?) Release date (or upload date) - not working currently, or i do something wrong ?

Date in files - absent

StefanLobbenmeier commented 1 year ago

Should work in general. Which url did you try it with, maybe that source did not provide a release date?

gddrx commented 1 year ago

Should work in general. Which url did you try it with, maybe that source did not provide a release date?

Strange. Now upload date - working. When I start topic did not work. Some kind of glitch, or glitch of my hands.

%(upload_date)s %(title).200s.%(ext)s - worked.


Can we change date format in template from YYYYMMDD to DDMMYYYY?)

StefanLobbenmeier commented 1 year ago

Glad it’s working now

Can we change date format in template from YYYYMMDD to DDMMYYYY?)

I won’t do that in general (the other order is actually much nicer for sorting), but it might be possible with some output template. Let me check

StefanLobbenmeier commented 1 year ago

Date/time Formatting: Date/time fields can be formatted according to strftime formatting by specifying it separated from the field name using a >. E.g. %(duration>%H-%M-%S)s, %(upload_date>%Y-%m-%d)s, %(epoch-3600>%H-%M-%S)s

From https://github.com/yt-dlp/yt-dlp

StefanLobbenmeier commented 1 year ago

So probably something like

%(upload_date>%d-%m-%Y)s

should be what you were looking for?

gddrx commented 1 year ago

So probably something like

%(upload_date>%d-%m-%Y)s

should be what you were looking for?

Yup) Thx you :)

One more question (sorry): In some cases, you don't want special characters such as 中, spaces, or &, such as when transferring the downloaded filename to a Windows system or the filename through an 8bit-unsafe channel. In these cases, add the --restrict-filenames flag to get a shorter title.

How use this function, if i use AppImage in Linux?)

StefanLobbenmeier commented 1 year ago

The —restrict-filenames was never implemented it seems

https://github.com/jely2002/youtube-dl-gui/issues/152