4 changed files with 24 additions and 12 deletions
@ -1,6 +1,22 @@ |
|||||
|
from couchpotato.api import addApiView |
||||
|
from couchpotato.core.event import fireEvent |
||||
|
from couchpotato.core.helpers.request import jsonified, getParam |
||||
from couchpotato.core.plugins.base import Plugin |
from couchpotato.core.plugins.base import Plugin |
||||
|
|
||||
class Suggestion(Plugin): |
class Suggestion(Plugin): |
||||
|
|
||||
pass |
def __init__(self): |
||||
|
|
||||
|
addApiView('suggestion.view', self.getView) |
||||
|
|
||||
|
def getView(self): |
||||
|
|
||||
|
limit_offset = getParam('limit_offset', None) |
||||
|
total_movies, movies = fireEvent('movie.list', status = 'suggest', limit_offset = limit_offset, single = True) |
||||
|
|
||||
|
return jsonified({ |
||||
|
'success': True, |
||||
|
'empty': len(movies) == 0, |
||||
|
'total': total_movies, |
||||
|
'movies': movies, |
||||
|
}) |
||||
|
@ -1,8 +0,0 @@ |
|||||
Page.Soon = new Class({ |
|
||||
|
|
||||
Extends: PageBase, |
|
||||
|
|
||||
name: 'soon', |
|
||||
title: 'Which wanted movies are released soon?' |
|
||||
|
|
||||
}) |
|
Loading…
Reference in new issue