Skip to content

Commit

Permalink
Add filePath to printout for unexpected files during old video deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Inrixia committed Jan 8, 2022
1 parent ee7ba65 commit 1e46966
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/deleteOldVideos.ts
Expand Up @@ -12,7 +12,7 @@ export const deleteOldVideos = async (rootVideoFolder: string, daysToKeepVideos:
if (await stats.isDirectory()) await recursiveDelete(filePath);
else if (stats.mtime.getTime() < Date.now() - daysToKeepVideos * 24 * 60 * 60 * 1000) {
if (!(filePath.endsWith('.mp4') || filePath.endsWith('.nfo') || filePath.endsWith('.png'))) {
console.log(`\n\n!!WARNING!! - Found file for deletion in ${rootVideoFolder} that is not a mp4, nfo or png file!`);
console.log(`\n\n!!WARNING!! - Found file "${filePath}" for deletion in ${rootVideoFolder} that is not a mp4, nfo or png file!`);
console.log('This could indicate that the root video folder is not being detected properly.');
console.log('Please report this as a Issue at https://github.com/Inrixia/Floatplane-Downloader/issues/new');
process.exit(0);
Expand Down

0 comments on commit 1e46966

Please sign in to comment.