Skip to content

Commit

Permalink
Don't download both chats again if one is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Assistant committed Dec 28, 2024
1 parent f474e32 commit 51fdad5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/downloader/twitch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub(super) fn get_chat(id: &str, context: &mut Context) -> Result<(), Error> {
let missing_tcd = context.missing.contains(&External::Tcd);
let missing_tdcli = context.missing.contains(&External::TdCli);

if !missing_tcd {
if !missing_tcd && !chat.exists() {
let (log, err_log) = loggers(&format!("{id}.chat"), context.logging);
ssa_status = Command::new(External::Tcd.command())
.args([
Expand All @@ -145,7 +145,7 @@ pub(super) fn get_chat(id: &str, context: &mut Context) -> Result<(), Error> {
.success();
}

if !missing_tdcli {
if !missing_tdcli && !json.exists() {
let (log, err_log) = loggers(&format!("{id}.json.chat"), context.logging);
json_status = Command::new(External::TdCli.command())
.args(["chatdownload", "-u", id, "-o", &format!("{id}.chat.json")])
Expand Down

0 comments on commit 51fdad5

Please sign in to comment.