Moved contents of seasoned_api up to root folder
This commit is contained in:
14
src/plex/stream/convertStreamToPlayback.js
Normal file
14
src/plex/stream/convertStreamToPlayback.js
Normal file
@@ -0,0 +1,14 @@
|
||||
class convertStreamToPlayback {
|
||||
constructor(plexStream) {
|
||||
this.bitrate = plexStream.bitrate;
|
||||
this.width = plexStream.width;
|
||||
this.height = plexStream.height;
|
||||
this.decision = plexStream.decision;
|
||||
this.audioProfile = plexStream.audioProfile;
|
||||
this.videoProfile = plexStream.videoProfile;
|
||||
this.duration = plexStream.duration;
|
||||
this.container = plexStream.container;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = convertStreamToPlayback;
|
||||
13
src/plex/stream/convertStreamToPlayer.js
Normal file
13
src/plex/stream/convertStreamToPlayer.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const Player = require("../../media_classes/player");
|
||||
|
||||
function convertStreamToPlayer(plexStream) {
|
||||
const player = new Player(plexStream.device, plexStream.address);
|
||||
player.platform = plexStream.platform;
|
||||
player.product = plexStream.product;
|
||||
player.title = plexStream.title;
|
||||
player.state = plexStream.state;
|
||||
|
||||
return player;
|
||||
}
|
||||
|
||||
module.exports = convertStreamToPlayer;
|
||||
7
src/plex/stream/convertStreamToUser.js
Normal file
7
src/plex/stream/convertStreamToUser.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const User = require("../../media_classes/user");
|
||||
|
||||
function convertStreamToUser(plexStream) {
|
||||
return new User(plexStream.id, plexStream.title);
|
||||
}
|
||||
|
||||
module.exports = convertStreamToUser;
|
||||
Reference in New Issue
Block a user