Skip to content

Commit

Permalink
@AlienXAXS - i would love to see a change where the metadata files ar…
Browse files Browse the repository at this point in the history
…e only downloaded/flushed to disk when the video file has succeeded, only to keep it clean
  • Loading branch information
Inrixia committed Apr 12, 2024
1 parent 4f048ed commit 6d782d5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/lib/Video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@ export class Video extends VideoBase {
try {
switch (await this.getState()) {
case VideoBase.State.Missing: {
if (settings.extras.saveNfo) {
logger.log("Saving .nfo");
await this.saveNfo();
}
if (settings.extras.downloadArtwork) {
logger.log("Saving artwork");
await this.downloadArtwork();
}

logger.log("Waiting on delivery cdn...");
const downloadRequest = await this.getVideoStream(settings.floatplane.videoResolution);

Expand Down Expand Up @@ -108,8 +99,17 @@ export class Video extends VideoBase {
}).finally(() => {
clearInterval(downloadInterval);
onDownloadProgress(downloadRequest.downloadProgress);
logger.log("Download complete!");
});

logger.log("Download complete!");
if (settings.extras.saveNfo) {
logger.log("Saving .nfo");
await this.saveNfo();
}
if (settings.extras.downloadArtwork) {
logger.log("Saving artwork");
await this.downloadArtwork();
}
}
// eslint-disable-next-line no-fallthrough
case VideoBase.State.Partial: {
Expand Down

0 comments on commit 6d782d5

Please sign in to comment.