From 6201c89cc0213df99072102c0a84206db14def81 Mon Sep 17 00:00:00 2001
From: Roland Ernst <rcrernst@gmail.com>
Date: Mon, 23 Dec 2019 16:12:39 +0100
Subject: [PATCH 3/4] Fix typo in SQL statement of class 'Video'
Pythons MySQLdb expects a list of paramters, even there is only one,
otherwise on get:
MythTV.exceptions.MythDBError: MySQL error: not all arguments converted
during string formatting
See python PEP 0249 for details.
---
mythtv/bindings/python/MythTV/dataheap.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mythtv/bindings/python/MythTV/dataheap.py b/mythtv/bindings/python/MythTV/dataheap.py
index 7cbd9925a1..a50c762734 100644
a
|
b
|
class Video( CMPVideo, VideoSchema, DBDataWrite ): |
966 | 966 | self.hash = self.getHash() |
967 | 967 | with self._db as cursor: |
968 | 968 | if cursor.execute("""SELECT intid FROM videometadata |
969 | | WHERE hash=%s""", self.hash) > 0: |
| 969 | WHERE hash=%s""", (self.hash, )) > 0: |
970 | 970 | id = cursor.fetchone()[0] |
971 | 971 | self._evalwheredat([id]) |
972 | 972 | self._pull() |