Linted all plex scripts.

This commit is contained in:
2018-02-07 13:50:05 +01:00
parent 97217a2826
commit dda1db6c5f
9 changed files with 220 additions and 251 deletions

View File

@@ -1,15 +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;
}
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;
module.exports = convertStreamToPlayback;

View File

@@ -1,13 +1,13 @@
const Player = require('src/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;
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;
return player;
}
module.exports = convertStreamToPlayer;
module.exports = convertStreamToPlayer;

View File

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