Converts all the info you get per media item from plex to the universal movie class
This commit is contained in:
13
src/plex/convertPlexToMovie.js
Normal file
13
src/plex/convertPlexToMovie.js
Normal 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;
|
||||||
Reference in New Issue
Block a user