Moved contents of seasoned_api up to root folder
This commit is contained in:
19
src/media_classes/media.js
Normal file
19
src/media_classes/media.js
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
class Media {
|
||||
constructor(title, year, type) {
|
||||
this.title = title;
|
||||
this.year = year;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
toString() {
|
||||
return `N: ${this.title} | Y: ${this.year} | T: ${this.type}`;
|
||||
}
|
||||
|
||||
print() {
|
||||
/* eslint-disable no-console */
|
||||
console.log(this.toString());
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Media;
|
||||
15
src/media_classes/mediaInfo.js
Normal file
15
src/media_classes/mediaInfo.js
Normal file
@@ -0,0 +1,15 @@
|
||||
class MediaInfo {
|
||||
constructor() {
|
||||
this.duration = undefined;
|
||||
this.height = undefined;
|
||||
this.width = undefined;
|
||||
this.bitrate = undefined;
|
||||
this.resolution = undefined;
|
||||
this.framerate = undefined;
|
||||
this.protocol = undefined;
|
||||
this.container = undefined;
|
||||
this.audioCodec = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MediaInfo;
|
||||
12
src/media_classes/player.js
Normal file
12
src/media_classes/player.js
Normal file
@@ -0,0 +1,12 @@
|
||||
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;
|
||||
31
src/media_classes/plex.js
Normal file
31
src/media_classes/plex.js
Normal file
@@ -0,0 +1,31 @@
|
||||
const Media = require("./media");
|
||||
|
||||
class Plex extends Media {
|
||||
constructor(
|
||||
title,
|
||||
year,
|
||||
type,
|
||||
summary,
|
||||
poster_path,
|
||||
background_path,
|
||||
added,
|
||||
seasons,
|
||||
episodes
|
||||
) {
|
||||
super(title, year, type);
|
||||
|
||||
this.summary = summary;
|
||||
this.poster_path = poster_path;
|
||||
this.background_path = background_path;
|
||||
this.added = added;
|
||||
|
||||
this.seasons = seasons;
|
||||
this.episodes = episodes;
|
||||
}
|
||||
|
||||
print() {
|
||||
super.print();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Plex;
|
||||
46
src/media_classes/tmdb.js
Normal file
46
src/media_classes/tmdb.js
Normal file
@@ -0,0 +1,46 @@
|
||||
const Media = require("./media");
|
||||
|
||||
class TMDB extends Media {
|
||||
// constructor(...args) {
|
||||
constructor(
|
||||
title,
|
||||
year,
|
||||
type,
|
||||
id,
|
||||
summary,
|
||||
poster_path,
|
||||
background_path,
|
||||
popularity,
|
||||
score,
|
||||
release_status,
|
||||
tagline,
|
||||
seasons,
|
||||
episodes
|
||||
) {
|
||||
super(title, year, type);
|
||||
|
||||
this.id = id;
|
||||
this.summary = summary;
|
||||
this.poster_path = poster_path;
|
||||
this.background_path = background_path;
|
||||
this.popularity = popularity;
|
||||
this.score = score;
|
||||
|
||||
this.release_status = release_status;
|
||||
this.tagline = tagline;
|
||||
|
||||
this.seasons = seasons;
|
||||
this.episodes = episodes;
|
||||
}
|
||||
|
||||
toString() {
|
||||
return `${super.toString()} | ID: ${this.id}`;
|
||||
}
|
||||
|
||||
print() {
|
||||
/* eslint-disable no-console */
|
||||
console.log(this.toString());
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = TMDB;
|
||||
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