interim commit

This commit is contained in:
2013-07-05 21:30:01 +10:00
parent 864ef4d525
commit cb914cb65e
4 changed files with 91 additions and 1 deletions

View File

@@ -5,3 +5,18 @@ Created on Fri Jul 5 20:14:15 2013
@author: shanef
"""
from libtvdatasource import TVShow
from xml.etree import ElementTree
class Settings:
def __init__(self, settingsFile):
self.shows = self.LoadSettings(settingsFile)
def LoadSettings(source):
shows = []
settingsXml = ElementTree.parse(source).getroot()
for show in settingsXml.findall('show'):
newShow = TVShow(show[0].text, show[1].text, show[2].text)
shows.append(newShow)
return shows