Filter out tvshows in charts
This commit is contained in:
1 parent
192c0200e5
commit
96c94f97f4
3 files changed
+12
-2
No files matched your search
@@ -36,7 +36,6 @@ class Charts(Plugin):
|
|||||||
'charts': charts
|
'charts': charts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def updateViewCache(self):
|
def updateViewCache(self):
|
||||||
|
|
||||||
if self.update_in_progress:
|
if self.update_in_progress:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
from couchpotato import fireEvent
|
||||||
from couchpotato.core.helpers.rss import RSS
|
from couchpotato.core.helpers.rss import RSS
|
||||||
from couchpotato.core.helpers.variable import tryInt
|
from couchpotato.core.helpers.variable import tryInt
|
||||||
from couchpotato.core.logger import CPLog
|
from couchpotato.core.logger import CPLog
|
||||||
@@ -96,8 +97,14 @@ class Bluray(Automation, RSS):
|
|||||||
movie = self.search(name, year)
|
movie = self.search(name, year)
|
||||||
|
|
||||||
if movie:
|
if movie:
|
||||||
|
|
||||||
if movie.get('imdb') in movie_ids:
|
if movie.get('imdb') in movie_ids:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
is_movie = fireEvent('movie.is_movie', identifier = movie.get('imdb'), single = True)
|
||||||
|
if not is_movie:
|
||||||
|
continue
|
||||||
|
|
||||||
movie_ids.append(movie.get('imdb'))
|
movie_ids.append(movie.get('imdb'))
|
||||||
movie_list['list'].append( movie )
|
movie_list['list'].append( movie )
|
||||||
if len(movie_list['list']) >= max_items:
|
if len(movie_list['list']) >= max_items:
|
||||||
|
|||||||
@@ -168,7 +168,6 @@ class IMDBAutomation(IMDBBase):
|
|||||||
|
|
||||||
return movies
|
return movies
|
||||||
|
|
||||||
|
|
||||||
def getChartList(self):
|
def getChartList(self):
|
||||||
|
|
||||||
# Nearly identical to 'getIMDBids', but we don't care about minimalMovie and return all movie data (not just id)
|
# Nearly identical to 'getIMDBids', but we don't care about minimalMovie and return all movie data (not just id)
|
||||||
@@ -204,6 +203,11 @@ class IMDBAutomation(IMDBBase):
|
|||||||
imdb_ids = getImdb(str(data), multiple = True)
|
imdb_ids = getImdb(str(data), multiple = True)
|
||||||
|
|
||||||
for imdb_id in imdb_ids[0:max_items]:
|
for imdb_id in imdb_ids[0:max_items]:
|
||||||
|
|
||||||
|
is_movie = fireEvent('movie.is_movie', identifier = imdb_id, single = True)
|
||||||
|
if not is_movie:
|
||||||
|
continue
|
||||||
|
|
||||||
info = self.getInfo(imdb_id)
|
info = self.getInfo(imdb_id)
|
||||||
chart['list'].append(info)
|
chart['list'].append(info)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user