Added mythtv logic
This commit is contained in:
14
libmythtv.py
14
libmythtv.py
@@ -5,3 +5,17 @@ Created on Fri Jul 5 14:10:47 2013
|
|||||||
@author: shanef
|
@author: shanef
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import MySQLdb as mdb
|
||||||
|
from libtvdatasource import TVShow
|
||||||
|
|
||||||
|
class MythTV:
|
||||||
|
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()
|
||||||
|
|
||||||
|
return TVShow(result['episode'], result['season'], result['title'], result['subtitle'], result['description'])
|
||||||
|
|
||||||
7
libtvdatasource.py
Normal file
7
libtvdatasource.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
Created on Fri Jul 5 14:42:47 2013
|
||||||
|
|
||||||
|
@author: shanef
|
||||||
|
"""
|
||||||
|
|
||||||
Reference in New Issue
Block a user