Example #1
0
def getLibraryMovieById(movieId):
	requestedMovie = movie.getByMovieId(movieId)
	jsonReturn = {}
	moviesArray = []
	moviesArray.append(requestedMovie.asJson())
	jsonReturn['movies'] = moviesArray
	return jsonReturn
Example #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()
Example #3
0
def deleteLibraryMovie(movieId):
	linkedMovie = movie.getByMovieId(movieId)
	linkedMediaFile = mediaFile.getByMediaFileId(linkedMovie.associatedMediaFileId)
	mediaLinker.removeHardLinkForMediaFile(linkedMediaFile)
	return "Successfully Deleted Movie"
Example #4
0
def getLibraryMovieCreateLink(movieId):
	linkedMovie = movie.getByMovieId(movieId)
	linkedMediaFile = mediaFile.getByMediaFileId(linkedMovie.associatedMediaFileId)
	mediaLinker.linkMediaFileToMovie(linkedMediaFile, linkedMovie)
	return linkedMovie.asJson()