From c0dc7ea5bc647734db8326e5a5d5ef7564edb4d9 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Thu, 17 Mar 2016 12:41:04 +0000 Subject: [PATCH] Fix for import of very rare db structure. --- CHANGES.md | 7 ++++++- sickbeard/db.py | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a57eba66..6c86f382 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.11.8 (2016-03-16 12:50:00 UTC) +### 0.11.9 (2016-03-17 12:30:00 UTC) + +* Fix for import of very rare db structure + + +### 0.11.8 (2016-03-16 12:50:00 UTC) * Fix ensures internal buffer of a downloaded file is written to disk diff --git a/sickbeard/db.py b/sickbeard/db.py index fcb4a3c7..f577c0fd 100644 --- a/sickbeard/db.py +++ b/sickbeard/db.py @@ -77,7 +77,8 @@ class DBConnection(object): if result: if self.hasColumn('db_version', 'db_minor_version'): minor = self.select('SELECT db_minor_version FROM db_version') - return int(result[0]['db_version']) * 100 + int(minor[0]['db_minor_version']) + version = int(result[0]['db_version']) * 100 + int(minor[0]['db_minor_version']) + return (version, 4301)[2000301 == version] return int(result[0]['db_version']) else: return 0