示例#1
0
def identify_movie(movieId):
    customName = request.args.get('customName', None)
    print 'MOVIE', movieId, '::', repr(customName)
    
    movie = Movie.query.get(int(movieId))
    
    print 'identify_movie:', movie
    
    identifyName = customName or imdb_utils.sanitizeFilename(movie.path)
    queueId, resultCount = Scheduler.findByFilename(identifyName)
    
    return jsonify(name=identifyName, path=movie.path, queueId=queueId, resultCount=resultCount, movieId=movieId)
示例#2
0
def identify_movie(movieId):
    customName = request.args.get('customName', None)
    print 'MOVIE', movieId, '::', repr(customName)

    movie = Movie.query.get(int(movieId))

    print 'identify_movie:', movie

    identifyName = customName or imdb_utils.sanitizeFilename(movie.path)
    queueId, resultCount = Scheduler.findByFilename(identifyName)

    return jsonify(name=identifyName,
                   path=movie.path,
                   queueId=queueId,
                   resultCount=resultCount,
                   movieId=movieId)
示例#3
0
def refresh_unidentified():
    Scheduler.rescanLibraries()
    return ''
示例#4
0
def poolIdentifyQueue(queueId):
    movie = Scheduler.poolIdentifyQueue(queueId)
    
    return jsonify(movie=movie)
示例#5
0
def cancelIdentifyQueue(queueId):
    Scheduler.cancelIdentifyQueue(queueId)
    return ''
示例#6
0
def refresh_unidentified():
    Scheduler.rescanLibraries()
    return ''
示例#7
0
def poolIdentifyQueue(queueId):
    movie = Scheduler.poolIdentifyQueue(queueId)

    return jsonify(movie=movie)
示例#8
0
def cancelIdentifyQueue(queueId):
    Scheduler.cancelIdentifyQueue(queueId)
    return ''