From fd358f5e4af7d9c2e1247b088029dcce12b613d0 Mon Sep 17 00:00:00 2001
From: Dustyn Gibson <miigotu@gmail.com>
Date: Fri, 24 Jul 2015 20:53:48 -0700
Subject: [PATCH] Disable text factory on DB for tests, read line comments

---
 sickbeard/db.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sickbeard/db.py b/sickbeard/db.py
index a5f8701f7..2df18e5d4 100644
--- a/sickbeard/db.py
+++ b/sickbeard/db.py
@@ -57,7 +57,13 @@ class DBConnection(object):
                 db_locks[self.filename] = threading.Lock()
 
                 self.connection = sqlite3.connect(dbFilename(self.filename, self.suffix), 20, check_same_thread=False)
-                self.connection.text_factory = self._unicode_text_factory
+
+                # Lets test without this for awhile. If non-unicode data is getting to the DB, fix it at the source.
+                # There are too many places we convert when we don't need to, 
+                # sqlite, browsers, python, everything understands unicode
+
+                #self.connection.text_factory = self._unicode_text_factory
+
                 db_cons[self.filename] = self.connection
             else:
                 self.connection = db_cons[self.filename]
-- 
GitLab