Converts all the info you get per media item from plex to the universal movie class

This commit is contained in:
2017-04-20 22:28:11 +02:00
parent df90cc1037
commit 98d8e3dd7d

View File

@@ -0,0 +1,13 @@
const Movie = require('src/movie/movie');
function converPlexToMovie(plexMovie) {
const movie = new Movie();
movie.title = plexMovie.title;
movie.year = plexMovie.year;
movie.library = plexMovie.librarySectionTitle;
movie.type = plexMovie.type;
return movie;
}
module.exports = converPlexToMovie;