Skip to content

Commit

Permalink
Backport SHA: 26cb1f7
Browse files Browse the repository at this point in the history
Fixes MythDB.searchRecorded() handling of LiveTV sessions.
  • Loading branch information
wagnerrp committed Dec 17, 2010
1 parent c81a3d7 commit 30a2515
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions mythtv/bindings/python/MythTV/methodheap.py
Expand Up @@ -625,9 +625,9 @@ def searchRecorded(self, init=False, key=None, value=None):
return ('recorded.%s=%%s' % key, datetime.duck(value), 0) return ('recorded.%s=%%s' % key, datetime.duck(value), 0)


if key == 'olderthan': if key == 'olderthan':
return ('recorded.starttime>%s', datetime.duck(value), 0)
if key == 'newerthan':
return ('recorded.starttime<%s', datetime.duck(value), 0) return ('recorded.starttime<%s', datetime.duck(value), 0)
if key == 'newerthan':
return ('recorded.starttime>%s', datetime.duck(value), 0)




# recordedprogram matches # recordedprogram matches
Expand All @@ -641,8 +641,9 @@ def searchRecorded(self, init=False, key=None, value=None):
return ('people.name', 'recordedcredits', 4, 1) return ('people.name', 'recordedcredits', 4, 1)


if key == 'livetv': if key == 'livetv':
if value is None: if (value is None) or (value == False):
return ('recorded.recgroup!=%s', 'LiveTV', 0) return ('recorded.recgroup!=%s', 'LiveTV', 0)
return ()


return None return None


Expand Down
2 changes: 1 addition & 1 deletion mythtv/bindings/python/MythTV/static.py
Expand Up @@ -4,7 +4,7 @@
Contains any static and global variables for MythTV Python Bindings 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 SCHEMA_VERSION = 1264
MVSCHEMA_VERSION = 1038 MVSCHEMA_VERSION = 1038
NVSCHEMA_VERSION = 1007 NVSCHEMA_VERSION = 1007
Expand Down
4 changes: 3 additions & 1 deletion mythtv/bindings/python/MythTV/utility.py
Expand Up @@ -180,7 +180,9 @@ def parseInp(self, kwargs):
raise TypeError(errstr % (self.__name__, key)) raise TypeError(errstr % (self.__name__, key))
res[0] = 'NOT '+res[0] res[0] = 'NOT '+res[0]


if len(res) == 3: if len(res) == 0:
continue
elif len(res) == 3:
# normal processing # normal processing
where.append(res[0]) where.append(res[0])
fields.append(res[1]) fields.append(res[1])
Expand Down

0 comments on commit 30a2515

Please sign in to comment.