mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-25 12:13:38 +00:00
Fix menu Shows/"Next Episode Cards"
This commit is contained in:
parent
2843b8290e
commit
6cf137eaf0
4 changed files with 23 additions and 13 deletions
|
@ -1,4 +1,9 @@
|
|||
### 3.30.11 (2024-02-29 01:20:00 UTC)
|
||||
### 3.30.12 (2024-03-03 22:30:00 UTC)
|
||||
|
||||
* Fix menu Shows/"Next Episode Cards"
|
||||
|
||||
|
||||
### 3.30.11 (2024-02-29 01:20:00 UTC)
|
||||
|
||||
* Update UnRar x64 for Windows 6.24 to 7.00
|
||||
|
||||
|
|
|
@ -450,7 +450,8 @@ $(document).ready(function(){
|
|||
<optgroup label="Nextepisode">
|
||||
<option value="ne_newpop"#echo ('', selected)['newpop' == $mode]#>Popular premiered</option>
|
||||
<option value="ne_newtop"#echo ('', selected)['newtop' == $mode]#>Top rated premiered</option>
|
||||
<option value="ne_upcoming"#echo ('', selected)['upcoming' == $mode]#>Upcoming</option>
|
||||
<option value="ne_upcoming"#echo ('', selected)['upcoming' == $mode]#>Upcoming S01</option>
|
||||
<option value="ne_upcoming2"#echo ('', selected)['upcoming2' == $mode]#>Upcoming S02</option>
|
||||
<option value="ne_trending"#echo ('', selected)['trending' == $mode]#>Trending</option>
|
||||
<option value="more_ne"#echo ('', selected + ' disabled')[mode.endswith('more')]#>... list more</option>
|
||||
</optgroup>
|
||||
|
|
|
@ -208,7 +208,7 @@
|
|||
#set $tvc_mode = $tvc_modes.get($sg_var('TVC_MRU'), 'new shows')
|
||||
<li><a href="$sbRoot/add-shows/tvc-default/" tabindex="$tab#set $tab += 1#"><i class="sgicon-tvc"></i>TV Calendar Cards
|
||||
<div class="menu-item-desc opacity60">$tvc_mode...</div></a></li>
|
||||
#set $ne_modes = dict(ne_newpop='new popular', ne_newtop='new top rated', ne_upcoming='upcoming', ne_trending='trending')
|
||||
#set $ne_modes = dict(ne_newpop='new popular', ne_newtop='new top rated', ne_upcoming='upcoming S01', ne_upcoming2='upcoming s02', ne_trending='trending')
|
||||
#set $ne_mode = $ne_modes.get($sg_var('NE_MRU'), 'new popular')
|
||||
<li><a href="$sbRoot/add-shows/ne-default/" tabindex="$tab#set $tab += 1#"><i class="sgicon-ne"></i>Next Episode Cards
|
||||
<div class="menu-item-desc opacity60">$ne_mode...</div></a></li>
|
||||
|
|
|
@ -5149,19 +5149,23 @@ class AddShows(Home):
|
|||
|
||||
def ne_newpop(self, **kwargs):
|
||||
return self.browse_ne(
|
||||
'hotshowsfilter', 'Popular recent premiered at Next Episode', mode='newpop', **kwargs)
|
||||
'hot', 'Popular recent premiered at Next Episode', mode='newpop', **kwargs)
|
||||
|
||||
def ne_newtop(self, **kwargs):
|
||||
return self.browse_ne(
|
||||
'hotshowsfilter', 'Top rated recent premiered at Next Episode', mode='newtop', **kwargs)
|
||||
'hot', 'Top rated recent premiered at Next Episode', mode='newtop', **kwargs)
|
||||
|
||||
def ne_upcoming(self, **kwargs):
|
||||
return self.browse_ne(
|
||||
'upcomingshowsfilter', 'Upcoming at Next Episode', mode='upcoming', **kwargs)
|
||||
'upcoming', 'Upcoming Season 1 at Next Episode', mode='upcoming', **kwargs)
|
||||
|
||||
def ne_upcoming2(self, **kwargs):
|
||||
return self.browse_ne(
|
||||
'upcoming2', 'Upcoming Season 2 at Next Episode', mode='upcoming2', **kwargs)
|
||||
|
||||
def ne_trending(self, **kwargs):
|
||||
return self.browse_ne(
|
||||
'trendingshowsfilter', 'Trending at Next Episode', mode='trending', **kwargs)
|
||||
'trends', 'Trending at Next Episode', mode='trending', **kwargs)
|
||||
|
||||
def browse_ne(self, url_path, browse_title, **kwargs):
|
||||
|
||||
|
@ -5181,17 +5185,17 @@ class AddShows(Home):
|
|||
started_past = True
|
||||
if 'upcoming' in url_path:
|
||||
started_past = False
|
||||
url = '%s.php?t=1&s=1&inwl=0&user_id=' % url_path
|
||||
params = f'premiering_period={("1", "2")["2" in url_path]}&sort=2'
|
||||
url_path = 'upcoming'
|
||||
elif 'trending' in url_path:
|
||||
url = '%s.php?t=1&a=1&b=1&uid=&status=0&c=1' % url_path
|
||||
params = 'trending_within=2'
|
||||
else:
|
||||
url = '%s.php?a=1&b=1&uid=0&status=0&c=2&sortOrder=%s' % (url_path, (0, 1)['Top' in browse_title])
|
||||
url = 'https://next-episode.net/PAGES/misc/%s&g=6&channel=0&actors=0&page=%s' % (url, page)
|
||||
|
||||
params = f'chart_type={("most_popular", "top_rated")["Top" in browse_title]}&premiered_within=2'
|
||||
url = f'https://next-episode.net/{url_path}/?{params}&page={page}'
|
||||
html = helpers.get_url(url, headers={'User-Agent': browser_ua.get_ua()})
|
||||
if html:
|
||||
try:
|
||||
if re.findall(r'(?i)(<a[^>]+gopage\([^>]+)', html)[0]:
|
||||
if re.findall(r'(?i)id="paginationDiv"', html)[0]:
|
||||
kwargs.update(dict(more=1))
|
||||
except (BaseException, Exception):
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue