You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
574 B

12 years ago
from couchpotato.api import addApiView
from couchpotato.core.event import fireEvent
from couchpotato.core.plugins.base import Plugin
class Suggestion(Plugin):
12 years ago
def __init__(self):
12 years ago
addApiView('suggestion.view', self.getView)
def getView(self, limit_offset = None, **kwargs):
12 years ago
total_movies, movies = fireEvent('movie.list', status = 'suggest', limit_offset = limit_offset, single = True)
return {
12 years ago
'success': True,
'empty': len(movies) == 0,
'total': total_movies,
'movies': movies,
}