We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f38b4b6 commit 8afa80eCopy full SHA for 8afa80e
library/playback/media_player.py
@@ -491,7 +491,13 @@ def prep_media(self, m: dict):
491
media_path = Path(self.args.prefix + m["path"]).resolve() if self.args.prefix else Path(m["path"])
492
m["path"] = str(media_path)
493
494
- if not m["path"].startswith("http") and not media_path.exists():
+ if self.args.delete_unplayable:
495
+ try:
496
+ processes.FFProbe(m["path"])
497
+ except processes.UnplayableFile:
498
+ media_path.unlink(missing_ok=True)
499
+
500
+ if not media_path.exists():
501
log.warning("[%s]: Does not exist. Skipping...", m["path"])
502
db_media.mark_media_deleted(self.args, m["original_path"])
503
return {}
0 commit comments