Now have player, movie, mediaInfo and user. These are small classes that holds vars for the specific type. The movie class is the same as the one prev in src/movie/movie.js
This commit is contained in:
13
src/media_classes/mediaInfo.js
Normal file
13
src/media_classes/mediaInfo.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
class MediaInfo {
|
||||||
|
constructor(device, platform) {
|
||||||
|
this.device = undefined;
|
||||||
|
this.platform = undefined;
|
||||||
|
this.ip = undefined;
|
||||||
|
this.product = undefined;
|
||||||
|
this.title = undefined;
|
||||||
|
this.state = undefined;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = MediaInfo;
|
||||||
18
src/media_classes/movie.js
Normal file
18
src/media_classes/movie.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
class Movie {
|
||||||
|
constructor(title, year) {
|
||||||
|
this.id = undefined;
|
||||||
|
this.title = title;
|
||||||
|
this.year = year;
|
||||||
|
this.release_date = undefined;
|
||||||
|
this.library = undefined;
|
||||||
|
this.type = undefined;
|
||||||
|
this.poster = undefined;
|
||||||
|
this.background = undefined;
|
||||||
|
this.matchedInPlex = false;
|
||||||
|
this.childTitle = undefined;
|
||||||
|
this.season = undefined;
|
||||||
|
this.episode = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Movie;
|
||||||
13
src/media_classes/player.js
Normal file
13
src/media_classes/player.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
class Player {
|
||||||
|
constructor(device, address) {
|
||||||
|
this.device = device;
|
||||||
|
this.ip = address;
|
||||||
|
this.platform = undefined;
|
||||||
|
this.product = undefined;
|
||||||
|
this.title = undefined;
|
||||||
|
this.state = undefined;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Player;
|
||||||
8
src/media_classes/user.js
Normal file
8
src/media_classes/user.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
class User {
|
||||||
|
constructor(id, title) {
|
||||||
|
this.id = id;
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = User;
|
||||||
Reference in New Issue
Block a user