mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Fix for new show searches, now checks alias names as well as series names to get results.
This commit is contained in:
parent
9a3e7ab0a9
commit
7a56afe512
@ -151,6 +151,8 @@ class AllShowsListUI:
|
||||
|
||||
def selectSeries(self, allSeries):
|
||||
searchResults = []
|
||||
seriesnames = []
|
||||
|
||||
# get all available shows
|
||||
if allSeries:
|
||||
if 'searchterm' in self.config:
|
||||
@ -159,14 +161,22 @@ class AllShowsListUI:
|
||||
for curShow in allSeries:
|
||||
if curShow in searchResults:
|
||||
continue
|
||||
|
||||
if 'seriesname' in curShow:
|
||||
if searchterm.lower() in curShow['seriesname'].lower():
|
||||
seriesnames.append(str(curShow['seriesname']))
|
||||
if 'aliasnames' in curShow:
|
||||
seriesnames.extend(str(curShow['aliasnames']).split('|'))
|
||||
|
||||
for name in seriesnames:
|
||||
if searchterm.lower() in name.lower():
|
||||
if 'firstaired' not in curShow:
|
||||
curShow['firstaired'] = str(datetime.date.fromordinal(1))
|
||||
curShow['firstaired'] = re.sub("([-]0{2}){1,}", "", curShow['firstaired'])
|
||||
fixDate = parser.parse(curShow['firstaired'], fuzzy=True).date()
|
||||
curShow['firstaired'] = fixDate.strftime("%Y-%m-%d")
|
||||
searchResults.append(curShow)
|
||||
|
||||
if curShow not in searchResults:
|
||||
searchResults += [curShow]
|
||||
|
||||
return searchResults
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user