Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add playback group support.

  • Loading branch information...
commit be81ff9d861489700ec17ad30ba9f5a293b7c693 1 parent 486a1de
@managementboy authored
View
8 database.py
@@ -34,7 +34,7 @@
'Output debugging messages for the database')
-CURRENT_SCHEMA='22'
+CURRENT_SCHEMA='23'
HAVE_WARNED_OF_DEFAULTS = False
@@ -598,6 +598,12 @@ def UpdateTables(self):
'add column chanid int(11);')
self.version = '22'
+ if self.version == '22':
+ self.Log('Upgrading schema from 22 to 23')
+ self.db_connection.query('alter table mythnettv_subscriptions '
+ 'add column playgroup text;')
+ self.version = '23'
+
if self.version != CURRENT_SCHEMA:
print 'Unknown schema version. This is a bug. Please report it to'
print 'managementboy@gmail.com'
View
BIN  database.pyc
Binary file not shown
View
8 mythnettv
@@ -141,10 +141,10 @@ def Usage(out):
subtitle
(subscription management)
- subscribe <url> <title> <inetref*> <chanid*>
+ subscribe <url> <title> <inetref*> <chanid*> <playbackgroup*>
: subscribe to a URL, and specify the show
- title, inetref, chanid (*optional, but
- nice to have)
+ title, inetref, chanid, playbackgroup
+ (*optional, but nice to have)
list : list subscriptions
unsubscribe <url> <title>
: unsubscribe from a feed, and remove feed
@@ -434,7 +434,7 @@ def main(argv, out=sys.stdout):
elif argv[1] == 'subscribe':
# Subscribe to an RSS feed
if len(argv) > 4:
- mythnettvcore.Subscribe(argv[2], argv[3], argv[4], argv[5])
+ mythnettvcore.Subscribe(argv[2], argv[3], argv[4], argv[5], argv[6])
else:
mythnettvcore.Subscribe(argv[2], argv[3], None, None)
out.write('Subscribed to %s\n' % argv[3])
View
5 mythnettvcore.py
@@ -136,7 +136,7 @@ def DownloadAndImport(db, guid, out=sys.stdout):
return False
-def Subscribe(url, title, inetref, chanid):
+def Subscribe(url, title, inetref, chanid, playgroup):
"""Subscribe -- subscribe to a new RSS or ATOM feed"""
db = database.MythNetTvDatabase()
@@ -144,7 +144,8 @@ def Subscribe(url, title, inetref, chanid):
'title':title,
'inactive':None,
'inetref':inetref,
- 'chanid':chanid})
+ 'chanid':chanid,
+ 'playgroup':playgroup})
def Update(out, title=None):
"""Update -- download updates for all feeds"""
View
BIN  mythnettvcore.pyc
Binary file not shown
View
6 program.py
@@ -795,6 +795,12 @@ def Import(self, out=sys.stdout):
if FLAGS.verbose:
out.write('Setting the inetref to %s\n' % row['inetref'])
tmp_recorded[u'inetref'] = row['inetref']
+
+ # stet the playgroup if available
+ if row:
+ if FLAGS.verbose:
+ out.write('Setting the playgroup to %s\n' % row['playgroup'])
+ tmp_recorded[u'playgroup'] = row['playgroup']
tmp_recorded[u'audioprop'] = audioprop
tmp_recorded[u'subtitletypes'] = subtitletypes
View
BIN  program.pyc
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.