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

add -re option to rename file #1265

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Snowmanazz
Copy link

@Snowmanazz Snowmanazz commented Aug 16, 2023

to fix #1172

@Snowmanazz Snowmanazz changed the title fix #1172 add -re option to rename file Aug 16, 2023
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
@@ -285,6 +291,12 @@ func download(c *cli.Context, videoURL string) error {
return err
}

if c.Bool("rename") {
for _, v := range data {
v.Title += fmt.Sprintf("-%v", time.Now().Unix())
Copy link
Owner

Choose a reason for hiding this comment

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

If more than one file is downloaded at a time, the timestamp is the same inside this loop

Snowmanazz and others added 3 commits August 16, 2023 13:55
Co-authored-by: Xinzhao Xu <[email protected]>
Co-authored-by: Xinzhao Xu <[email protected]>
Co-authored-by: Xinzhao Xu <[email protected]>
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.

可否支持自动重命名?
2 participants