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

chatdownload failure results in zero-length file #1099

Closed
2 tasks done
glubsy opened this issue Jun 16, 2024 · 2 comments · Fixed by #1101
Closed
2 tasks done

chatdownload failure results in zero-length file #1099

glubsy opened this issue Jun 16, 2024 · 2 comments · Fixed by #1101
Labels
bug Something isn't working

Comments

@glubsy
Copy link

glubsy commented Jun 16, 2024

Checklist

Edition

Command Line Interface

Describe your issue here

Since 1.54.4, if a chatdownload command fails (due to video Id not found), an empty output file is left in the file system.

Example:

> TwitchDownloaderCLI_1.54.4 chatdownload --id "51277891293" -E -o 51277891293.json
 ---> System.NullReferenceException: Invalid VOD, deleted/expired VOD possibly? 
[...]
zsh: abort      /opt/TwitchDownloaderCLI_1.54.4 chatdownload --id  -E -

> ls -alh
-rw-r--r-- 1 user group     0 2024-06-16 12:25  51277891293.json 

This also happens with any of the --collision flags.
Also happens with 1.54.5.
This did not happen before (ie. 1.54.3).

Expected behaviour:

The output JSON file should not be created.

Add any related files or extra information here

Here is a VOD Id that does not exist: 51277891293

@glubsy glubsy added the bug Something isn't working label Jun 16, 2024
@ScrubN
Copy link
Collaborator

ScrubN commented Jun 16, 2024

This is a byproduct of creating the output file immediately to protect against possible file collisions. It is present in all modes.

@ScrubN
Copy link
Collaborator

ScrubN commented Jun 16, 2024

As I was typing out a longer response defense of my laziness, I thought of a somewhat uncomplicated solution to this problem. I'll see about implementing it for 1.54.6.

This was referenced Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants