move error fixing
This commit is contained in:
parent
74b50ef3a2
commit
d0d66fe9a8
5 changed files with 25 additions and 21 deletions
15
libmythtv.py
15
libmythtv.py
|
|
@ -8,14 +8,13 @@ Created on Fri Jul 5 14:10:47 2013
|
|||
import MySQLdb as mdb
|
||||
from libtvshow import TVShow
|
||||
|
||||
class MythTV:
|
||||
def RetrieveEpisodeData(serverAddress, user, password, database, inputFile):
|
||||
con = mdb.connect(serverAddress, user, password, database)
|
||||
def RetrieveEpisodeData(serverAddress, user, password, database, inputFile):
|
||||
con = mdb.connect(serverAddress, user, password, database)
|
||||
|
||||
with con:
|
||||
cur = con.cursor(mdb.cursors.DictCursor)
|
||||
cur.execute("select episode, season, title, subtitle, description from mythconverg.recorded where basename = '{0}'".format(inputFile))
|
||||
result = cur.fetchone()
|
||||
with con:
|
||||
cur = con.cursor(mdb.cursors.DictCursor)
|
||||
cur.execute("select episode, season, title, subtitle, description from mythconverg.recorded where basename = '{0}'".format(inputFile))
|
||||
result = cur.fetchone()
|
||||
|
||||
return TVShow(result['episode'], result['season'], result['title'], result['subtitle'], result['description'])
|
||||
return TVShow(result['episode'], result['season'], result['title'], result['subtitle'], result['description'])
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue