1
0
mirror of https://github.com/moparisthebest/SickRage synced 2025-01-06 03:18:01 -05:00

Fix for formatting pattern issues

This commit is contained in:
echel0n 2014-04-26 04:17:28 -07:00
parent e787ef8332
commit f9cd37c243
2 changed files with 12 additions and 11 deletions

View File

@ -1843,10 +1843,10 @@ class TVEpisode(object):
'%0S': '%02d' % self.season,
'%E': str(self.episode),
'%0E': '%02d' % self.episode,
'%SS': str(self.scene_season),
'%0SS': '%02d' % self.scene_season,
'%SE': str(self.scene_episode),
'%0SE': '%02d' % self.scene_episode,
'%XS': str(self.scene_season),
'%0XS': '%02d' % self.scene_season,
'%XE': str(self.scene_episode),
'%0XE': '%02d' % self.scene_episode,
'%RN': release_name(self.release_name),
'%RG': release_group(self.release_name),
'%AD': str(self.airdate).replace('-', ' '),

View File

@ -47,13 +47,13 @@ class PPPrivateTests(test.SickbeardTestDBCase):
def setUp(self):
super(PPPrivateTests, self).setUp()
sickbeard.showList = [TVShow(0000), TVShow(0001)]
sickbeard.showList = [TVShow(1,0000), TVShow(1,0001)]
self.pp = PostProcessor(test.FILEPATH)
self.show_obj = TVShow(0002)
self.show_obj = TVShow(1,0002)
self.db = test.db.DBConnection()
newValueDict = {"tvdbid": 1002,
newValueDict = {"indexerid": 1002,
"name": test.SHOWNAME,
"description": "description",
"airdate": 1234,
@ -69,20 +69,21 @@ class PPPrivateTests(test.SickbeardTestDBCase):
self.db.upsert("tv_episodes", newValueDict, controlValueDict)
self.ep_obj = TVEpisode(self.show_obj, test.SEASON, test.EPISODE, test.FILEPATH)
print
def test__find_ep_destination_folder(self):
self.show_obj.location = test.FILEDIR
self.ep_obj.show.seasonfolders = 1
sickbeard.SEASON_FOLDERS_FORMAT = 'Season %02d'
calculatedPath = self.pp._find_ep_destination_folder(self.ep_obj)
ecpectedPath = os.path.join(test.FILEDIR, "Season 0" + str(test.SEASON))
self.assertEqual(calculatedPath, ecpectedPath)
calculatedPath = self.ep_obj.proper_path()
expectedPath = os.path.join(test.FILEDIR, "Season 0" + str(test.SEASON))
self.assertEqual(calculatedPath, expectedPath)
class PPBasicTests(test.SickbeardTestDBCase):
def test_process(self):
show = TVShow(3)
show = TVShow(1,3)
show.name = test.SHOWNAME
show.location = test.SHOWDIR
show.saveToDB()