mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Merge branch 'release/0.4.0' into develop
This commit is contained in:
commit
0dfe997ab3
8 changed files with 26 additions and 19 deletions
|
@ -10,7 +10,7 @@
|
|||
[develop changelog]
|
||||
|
||||
|
||||
### 0.4.0 (2014-11-26 13:30:00 UTC)
|
||||
### 0.4.0 (2014-11-27 03:30:00 UTC)
|
||||
|
||||
* Change footer stats to not add newlines when copy/pasting from them
|
||||
* Remove redundant references from Config/Help & Info
|
||||
|
@ -62,6 +62,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
|
||||
|
||||
|
||||
### 0.3.1 (2014-11-19 16:40:00 UTC)
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
if (0 == s.indexOf('Loading...'))
|
||||
return s.replace('Loading...', '000')
|
||||
#if not $sickbeard.SORT_ARTICLE:
|
||||
return (s || '').replace(/^(The|A|An)\s/i, '')
|
||||
return (s || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1')
|
||||
#else:
|
||||
return (s || '')
|
||||
#end if
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
return s.replace('Loading...','000');
|
||||
else
|
||||
#if not $sickbeard.SORT_ARTICLE:
|
||||
return (s || '').replace(/^(The|A|An)\s/i,'');
|
||||
return (s || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
|
||||
#else:
|
||||
return (s || '');
|
||||
#end if
|
||||
|
@ -162,7 +162,7 @@
|
|||
name: function( itemElem ) {
|
||||
var name = \$( itemElem ).attr('data-name');
|
||||
#if not $sickbeard.SORT_ARTICLE:
|
||||
return (name || '').replace(/^(The|A|An)\s/i,'');
|
||||
return (name || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
|
||||
#else:
|
||||
return (name || '');
|
||||
#end if
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
name: function( itemElem ) {
|
||||
var name = \$( itemElem ).attr('data-name') || '';
|
||||
#if not $sickbeard.SORT_ARTICLE:
|
||||
name = name.replace(/^(The|A|An)\s/i, '');
|
||||
name = name.replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
|
||||
#end if
|
||||
return name.toLowerCase();
|
||||
},
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
},
|
||||
format: function(s) {
|
||||
#if not $sickbeard.SORT_ARTICLE:
|
||||
return (s || '').replace(/^(The|A|An)\s/i,'');
|
||||
return (s || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
|
||||
#else:
|
||||
return (s || '');
|
||||
#end if
|
||||
|
|
|
@ -1430,4 +1430,8 @@ def get_size(start_path='.'):
|
|||
|
||||
|
||||
def build_dict(seq, key):
|
||||
return dict((d[key], dict(d, index=index)) for (index, d) in enumerate(seq))
|
||||
return dict((d[key], dict(d, index=index)) for (index, d) in enumerate(seq))
|
||||
|
||||
|
||||
def remove_article(text=''):
|
||||
return re.sub(r'(?i)/^(?:(?:A(?!\s+to)n?)|The)\s(\w)', r'\1', text)
|
|
@ -37,6 +37,7 @@ from sickbeard import processTV
|
|||
from sickbeard import network_timezones, sbdatetime
|
||||
from sickbeard.exceptions import ex
|
||||
from sickbeard.common import SNATCHED, SNATCHED_PROPER, DOWNLOADED, SKIPPED, UNAIRED, IGNORED, ARCHIVED, WANTED, UNKNOWN
|
||||
from sickbeard.helpers import remove_article
|
||||
from common import Quality, qualityPresetStrings, statusStrings
|
||||
|
||||
try:
|
||||
|
@ -766,22 +767,22 @@ class CMD_ComingEpisodes(ApiCall):
|
|||
sorts = {
|
||||
'date': (lambda a, b: cmp(
|
||||
(a['parsed_datetime'],
|
||||
(a['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
(a['show_name'], remove_article(a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
a['season'], a['episode']),
|
||||
(b['parsed_datetime'],
|
||||
(b['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
(b['show_name'], remove_article(b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
b['season'], b['episode']))),
|
||||
'show': (lambda a, b: cmp(
|
||||
((a['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
((a['show_name'], remove_article(a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
a['parsed_datetime'], a['season'], a['episode']),
|
||||
((b['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
((b['show_name'], remove_article(b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
b['parsed_datetime'], b['season'], b['episode']))),
|
||||
'network': (lambda a, b: cmp(
|
||||
(a['network'], a['parsed_datetime'],
|
||||
(a['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
(a['show_name'], remove_article(a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
a['season'], a['episode']),
|
||||
(b['network'], b['parsed_datetime'],
|
||||
(b['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
(b['show_name'], remove_article(b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
b['season'], b['episode'])))
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ from sickbeard.common import Quality, Overview, statusStrings, qualityPresetStri
|
|||
from sickbeard.common import SNATCHED, UNAIRED, IGNORED, ARCHIVED, WANTED, FAILED
|
||||
from sickbeard.common import SD, HD720p, HD1080p
|
||||
from sickbeard.exceptions import ex
|
||||
from sickbeard.helpers import remove_article
|
||||
from sickbeard.scene_exceptions import get_scene_exceptions
|
||||
from sickbeard.scene_numbering import get_scene_numbering, set_scene_numbering, get_scene_numbering_for_show, \
|
||||
get_xem_numbering_for_show, get_scene_absolute_numbering_for_show, get_xem_absolute_numbering_for_show, \
|
||||
|
@ -394,22 +395,22 @@ class MainHandler(RequestHandler):
|
|||
sorts = {
|
||||
'date': (lambda a, b: cmp(
|
||||
(a['localtime'],
|
||||
(a['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
(a['show_name'], remove_article(a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
a['season'], a['episode']),
|
||||
(b['localtime'],
|
||||
(b['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
(b['show_name'], remove_article(b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
b['season'], b['episode']))),
|
||||
'show': (lambda a, b: cmp(
|
||||
((a['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
((a['show_name'], remove_article(a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
a['localtime'], a['season'], a['episode']),
|
||||
((b['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
((b['show_name'], remove_article(b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
b['localtime'], b['season'], b['episode']))),
|
||||
'network': (lambda a, b: cmp(
|
||||
(a['network'], a['localtime'],
|
||||
(a['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
(a['show_name'], remove_article(a['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
a['season'], a['episode']),
|
||||
(b['network'], b['localtime'],
|
||||
(b['show_name'], re.sub(r'(?i)^(The|A|An)\s', '', b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
(b['show_name'], remove_article(b['show_name']))[not sickbeard.SORT_ARTICLE],
|
||||
b['season'], b['episode'])))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue