Example #1
0
def couchpotato_movie(id):
    try:
        couchpotato = couchpotato_api('media.get', 'id=%s' % id)
        if couchpotato['success']:
            couchpotato = couchpotato['media']
        
        profiles = couchpotato_api('profile.list')

    except Exception as e:
        logger.log('Mobile :: CouchPotato :: Could not retrieve movie - %s]' % (e), 'WARNING')

    return render_template('mobile/couchpotato/movie.html',
        movie=couchpotato,
        profiles=profiles
    )
Example #2
0
def couchpotato_movie(id):
    try:
        couchpotato = couchpotato_api('media.get', 'id=%s' % id)
        if couchpotato['success']:
            couchpotato = couchpotato['media']

        profiles = couchpotato_api('profile.list')

    except Exception as e:
        logger.log(
            'Mobile :: CouchPotato :: Could not retrieve movie - %s]' % (e),
            'WARNING')

    return render_template('mobile/couchpotato/movie.html',
                           movie=couchpotato,
                           profiles=profiles)
Example #3
0
def couchpotato_all():
    try:
        couchpotato = couchpotato_api('movie.list', params='status=done')

    except Exception as e:
        logger.log('Mobile :: CouchPotato :: Could not retrieve Couchpotato - %s]' % (e), 'WARNING')
        couchpotato = None

    return render_template('mobile/couchpotato/all.html',
        all=couchpotato['movies'],
    )
Example #4
0
def couchpotato():
    try:
        couchpotato = couchpotato_api('movie.list', params='status=active')
        print couchpotato

    except Exception as e:
        logger.log('Mobile :: CouchPotato :: Could not retrieve Couchpotato - %s]' % (e), 'WARNING')
        couchpotato = None

    return render_template('mobile/couchpotato/wanted.html',
        wanted=couchpotato['movies']
    )
Example #5
0
def couchpotato():
    try:
        couchpotato = couchpotato_api('movie.list', params='status=active')
        print couchpotato

    except Exception as e:
        logger.log(
            'Mobile :: CouchPotato :: Could not retrieve Couchpotato - %s]' %
            (e), 'WARNING')
        couchpotato = None

    return render_template('mobile/couchpotato/wanted.html',
                           wanted=couchpotato['movies'])
Example #6
0
def couchpotato():
    try:
        couchpotato = couchpotato_api('movie.list', params=False)
        if couchpotato['success'] and not couchpotato['empty']:
            couchpotato = couchpotato['movies']

    except Exception as e:
        logger.log('Mobile :: CouchPotato :: Could not retrieve Couchpotato - %s]' % (e), 'WARNING')
        couchpotato = None

    return render_template('mobile/couchpotato/wanted.html',
        wanted=couchpotato,
    )
Example #7
0
def couchpotato_all():
    try:
        couchpotato = couchpotato_api('movie.list', params='status=done')
        if couchpotato['success'] and not couchpotato['empty']:
            couchpotato = couchpotato['movies']

    except Exception as e:
        logger.log('Mobile :: CouchPotato :: Could not retrieve Couchpotato - %s]' % (e), 'WARNING')
        couchpotato = None

    return render_template('mobile/couchpotato/all.html',
        all=couchpotato,
    )
Example #8
0
def couchpotato_all():
    try:
        couchpotato = couchpotato_api('movie.list', params='status=done')
        if couchpotato['success'] and not couchpotato['empty']:
            couchpotato = couchpotato['movies']

    except Exception as e:
        logger.log('Mobile :: CouchPotato :: Could not retrieve Couchpotato - %s]' % (e), 'WARNING')
        couchpotato = None

    return render_template('mobile/couchpotato/all.html',
        all=couchpotato,
        webroot=maraschino.WEBROOT,
    )
Example #9
0
def couchpotato_search(query=None):
    couchpotato = None
    if query:
        try:
            couchpotato = couchpotato_api('movie.search', params='q=%s' % query)
            if couchpotato['success']:
                couchpotato = couchpotato['movie']

        except Exception as e:
            logger.log('Mobile :: CouchPotato :: Could not retrieve movie - %s]' % (e), 'WARNING')

    return render_template('mobile/couchpotato/search.html',
        results=couchpotato,
        query=query,
    )
Example #10
0
def couchpotato_search(query=None):
    couchpotato = None
    if query:
        try:
            couchpotato = couchpotato_api('movie.search', params='q=%s' % query)
            if couchpotato['success']:
                couchpotato = couchpotato['movie']

        except Exception as e:
            logger.log('Mobile :: CouchPotato :: Could not retrieve movie - %s]' % (e), 'WARNING')

    return render_template('mobile/couchpotato/search.html',
        results=couchpotato,
        query=query,
    )
Example #11
0
def couchpotato():
    try:
        couchpotato = couchpotato_api('movie.list', params=False)
        if couchpotato['success'] and not couchpotato['empty']:
            couchpotato = couchpotato['movies']

    except Exception as e:
        logger.log(
            'Mobile :: CouchPotato :: Could not retrieve Couchpotato - %s]' %
            (e), 'WARNING')
        couchpotato = None

    return render_template(
        'mobile/couchpotato/wanted.html',
        wanted=couchpotato,
        webroot=maraschino.WEBROOT,
    )
Example #12
0
def couchpotato_history():
    unread = 0
    try:
        couchpotato = couchpotato_api('notification.list')
        if couchpotato['success'] and not couchpotato['empty']:
            couchpotato = couchpotato['notifications']
            for notification in couchpotato:
                if not notification['read']:
                    unread = unread + 1

    except Exception as e:
        logger.log('Mobile :: CouchPotato :: Could not retrieve Couchpotato - %s]' % (e), 'WARNING')
        couchpotato = None

    return render_template('mobile/couchpotato/history.html',
        history=couchpotato,
        unread=unread,
    )
Example #13
0
def couchpotato_history():
    unread = 0
    try:
        couchpotato = couchpotato_api('notification.list')
        if couchpotato['success'] and not couchpotato['empty']:
            couchpotato = couchpotato['notifications']
            for notification in couchpotato:
                if not notification['read']:
                    unread = unread + 1

    except Exception as e:
        logger.log('Mobile :: CouchPotato :: Could not retrieve Couchpotato - %s]' % (e), 'WARNING')
        couchpotato = None

    return render_template('mobile/couchpotato/history.html',
        history=couchpotato,
        unread=unread,
    )