예제 #1
0
def getLibraryMovieById(movieId):
	requestedMovie = movie.getByMovieId(movieId)
	jsonReturn = {}
	moviesArray = []
	moviesArray.append(requestedMovie.asJson())
	jsonReturn['movies'] = moviesArray
	return jsonReturn
예제 #2
0
def postLibraryMovieAsSibbling(movieId):
	movieTitle = request.json['title']
	movieYear = request.json['year']

	linkedMovie = movie.getByMovieId(movieId)
	linkedMediaFile = mediaFile.getByMediaFileId(linkedMovie.associatedMediaFileId)
	newMovie = movie.create(movieTitle, movieYear).save()
	mediaLinker.associateMovieWithMediaFile(newMovie, linkedMediaFile)
	return newMovie.asJson()
예제 #3
0
def deleteLibraryMovie(movieId):
	linkedMovie = movie.getByMovieId(movieId)
	linkedMediaFile = mediaFile.getByMediaFileId(linkedMovie.associatedMediaFileId)
	mediaLinker.removeHardLinkForMediaFile(linkedMediaFile)
	return "Successfully Deleted Movie"
예제 #4
0
def getLibraryMovieCreateLink(movieId):
	linkedMovie = movie.getByMovieId(movieId)
	linkedMediaFile = mediaFile.getByMediaFileId(linkedMovie.associatedMediaFileId)
	mediaLinker.linkMediaFileToMovie(linkedMediaFile, linkedMovie)
	return linkedMovie.asJson()