From b20c151765666240673243b3c0ee907ba37b65d6 Mon Sep 17 00:00:00 2001 From: spl0k Date: Fri, 3 Nov 2017 23:12:38 +0100 Subject: [PATCH] Prevent server error when browsing on tracks that have been deleted --- supysonic/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supysonic/db.py b/supysonic/db.py index d1e9593..25243e2 100644 --- a/supysonic/db.py +++ b/supysonic/db.py @@ -179,7 +179,7 @@ class Track(object): 'album': self.album.name, 'artist': self.artist.name, 'track': self.number, - 'size': os.path.getsize(self.path), + 'size': os.path.getsize(self.path) if os.path.isfile(self.path) else -1, 'contentType': self.content_type, 'suffix': self.suffix(), 'duration': self.duration,