Permalink
Browse files

Backport SHA: 26cb1f7

Fixes MythDB.searchRecorded() handling of LiveTV sessions.
  • Loading branch information...
1 parent c81a3d7 commit 30a2515ad93c2e7f0d3d3e1a37edf3acfc1adf94 @wagnerrp wagnerrp committed Dec 17, 2010
@@ -625,9 +625,9 @@ def searchRecorded(self, init=False, key=None, value=None):
return ('recorded.%s=%%s' % key, datetime.duck(value), 0)
if key == 'olderthan':
- return ('recorded.starttime>%s', datetime.duck(value), 0)
- if key == 'newerthan':
return ('recorded.starttime<%s', datetime.duck(value), 0)
+ if key == 'newerthan':
+ return ('recorded.starttime>%s', datetime.duck(value), 0)
# recordedprogram matches
@@ -641,8 +641,9 @@ def searchRecorded(self, init=False, key=None, value=None):
return ('people.name', 'recordedcredits', 4, 1)
if key == 'livetv':
- if value is None:
+ if (value is None) or (value == False):
return ('recorded.recgroup!=%s', 'LiveTV', 0)
+ return ()
return None
@@ -4,7 +4,7 @@
Contains any static and global variables for MythTV Python Bindings
"""
-OWN_VERSION = (0,24,0,0)
+OWN_VERSION = (0,24,0,1)
SCHEMA_VERSION = 1264
MVSCHEMA_VERSION = 1038
NVSCHEMA_VERSION = 1007
@@ -180,7 +180,9 @@ def parseInp(self, kwargs):
raise TypeError(errstr % (self.__name__, key))
res[0] = 'NOT '+res[0]
- if len(res) == 3:
+ if len(res) == 0:
+ continue
+ elif len(res) == 3:
# normal processing
where.append(res[0])
fields.append(res[1])

0 comments on commit 30a2515

Please sign in to comment.