mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Merge pull request #73 from JackDandy/feature/FixDisplayShowAndAPISort
Fix article sorting for Display Show, and API pages.
This commit is contained in:
commit
d0de39d685
3 changed files with 3 additions and 19 deletions
|
@ -50,7 +50,7 @@
|
|||
* Fix reduces time API endpoint Shows takes to return results
|
||||
* Fix Coming Eps Page to include shows +/- 1 day for time zone corrections
|
||||
* Fix season jumping dropdown menu for shows with over 15 seasons on Display Show
|
||||
* Fix article sorting for Coming Eps, Manage, Show List, and Trending Shows
|
||||
* Fix article sorting for Coming Eps, Manage, Show List, Display Show, API, and Trending Shows pages
|
||||
|
||||
### 0.3.1 (2014-11-19 16:40:00 UTC)
|
||||
|
||||
|
|
|
@ -126,15 +126,7 @@ class Api(webserve.MainHandler):
|
|||
t = webserve.PageTemplate(headers=self.request.headers, file="apiBuilder.tmpl")
|
||||
|
||||
def titler(x):
|
||||
if not x or sickbeard.SORT_ARTICLE:
|
||||
return x
|
||||
if x.lower().startswith('a '):
|
||||
x = x[2:]
|
||||
elif x.lower().startswith('an '):
|
||||
x = x[3:]
|
||||
elif x.lower().startswith('the '):
|
||||
x = x[4:]
|
||||
return x
|
||||
return (remove_article(x), x)[not x or sickbeard.SORT_ARTICLE]
|
||||
|
||||
t.sortedShowList = sorted(sickbeard.showList, lambda x, y: cmp(titler(x.name), titler(y.name)))
|
||||
|
||||
|
|
|
@ -3759,15 +3759,7 @@ class Home(MainHandler):
|
|||
epCounts[curEpCat] += 1
|
||||
|
||||
def titler(x):
|
||||
if not x or sickbeard.SORT_ARTICLE:
|
||||
return x
|
||||
if x.lower().startswith('a '):
|
||||
x = x[2:]
|
||||
if x.lower().startswith('an '):
|
||||
x = x[3:]
|
||||
elif x.lower().startswith('the '):
|
||||
x = x[4:]
|
||||
return x
|
||||
return (remove_article(x), x)[not x or sickbeard.SORT_ARTICLE]
|
||||
|
||||
if sickbeard.ANIME_SPLIT_HOME:
|
||||
shows = []
|
||||
|
|
Loading…
Reference in a new issue