Moved contents of seasoned_api up to root folder

This commit is contained in:
2022-08-19 01:03:27 +02:00
parent 0efc109992
commit 56262a45c8
134 changed files with 885 additions and 32 deletions

View 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;

View 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;

View File

@@ -0,0 +1,7 @@
const User = require("../../media_classes/user");
function convertStreamToUser(plexStream) {
return new User(plexStream.id, plexStream.title);
}
module.exports = convertStreamToUser;