Filter out tvshows in charts
This commit is contained in:
@@ -36,7 +36,6 @@ class Charts(Plugin):
|
||||
'charts': charts
|
||||
}
|
||||
|
||||
|
||||
def updateViewCache(self):
|
||||
|
||||
if self.update_in_progress:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from bs4 import BeautifulSoup
|
||||
from couchpotato import fireEvent
|
||||
from couchpotato.core.helpers.rss import RSS
|
||||
from couchpotato.core.helpers.variable import tryInt
|
||||
from couchpotato.core.logger import CPLog
|
||||
@@ -96,8 +97,14 @@ class Bluray(Automation, RSS):
|
||||
movie = self.search(name, year)
|
||||
|
||||
if movie:
|
||||
|
||||
if movie.get('imdb') in movie_ids:
|
||||
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_list['list'].append( movie )
|
||||
if len(movie_list['list']) >= max_items:
|
||||
|
||||
@@ -168,7 +168,6 @@ class IMDBAutomation(IMDBBase):
|
||||
|
||||
return movies
|
||||
|
||||
|
||||
def getChartList(self):
|
||||
|
||||
# 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)
|
||||
|
||||
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)
|
||||
chart['list'].append(info)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user