Moved eveything related to the api to a seperate folder seasoned_api.
This commit is contained in:
17
seasoned_api/src/plex/convertPlexToStream.js
Normal file
17
seasoned_api/src/plex/convertPlexToStream.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const convertPlexToMovie = require('src/plex/convertPlexToMovie');
|
||||
const convertStreamToMediaInfo = require('src/plex/convertStreamToMediaInfo');
|
||||
const convertStreamToPlayer = require('src/plex/stream/convertStreamToPlayer');
|
||||
const convertStreamToUser = require('src/plex/stream/convertStreamToUser');
|
||||
const ConvertStreamToPlayback = require('src/plex/stream/convertStreamToPlayback');
|
||||
|
||||
function convertPlexToStream(plexStream) {
|
||||
const stream = convertPlexToMovie(plexStream);
|
||||
stream.mediaInfo = convertStreamToMediaInfo(plexStream.Media);
|
||||
stream.player = convertStreamToPlayer(plexStream.Player);
|
||||
stream.user = convertStreamToUser(plexStream.User);
|
||||
stream.playback = new ConvertStreamToPlayback(plexStream.Media.Part);
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
module.exports = convertPlexToStream;
|
||||
Reference in New Issue
Block a user