From f520ceaf2509ed334fccca5b472d236d2fdee619 Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Thu, 25 Sep 2014 14:11:57 +0200 Subject: [PATCH] Catch IOError. Fixes #1911 --- headphones/librarysync.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/headphones/librarysync.py b/headphones/librarysync.py index 49a147cc..e8a126cc 100644 --- a/headphones/librarysync.py +++ b/headphones/librarysync.py @@ -105,7 +105,10 @@ def libraryScan(dir=None, append=False, ArtistID=None, ArtistName=None, cron=Fal try: f = MediaFile(song) except (FileTypeError, UnreadableFileError): - logger.error("Cannot read file media file '%s'. It may be corrupted or not a media file.", unicode_song_path) + logger.warning("Cannot read media file '%s', skipping. It may be corrupted or not a media file.", unicode_song_path) + continue + except IOError as e: + logger.warning("Cannnot read media file '%s', skipping. Does the file exists?", unicode_song_path) continue # Grab the bitrates for the auto detect bit rate option