more changes for #48, the UI now works \o/
This commit is contained in:
parent
e00c5ce2c2
commit
14719efa22
17 changed files with 381 additions and 165 deletions
|
|
@ -12,6 +12,19 @@ export abstract class MediaTypeModel {
|
|||
|
||||
userData: object;
|
||||
|
||||
|
||||
constructor() {
|
||||
this.type = undefined;
|
||||
this.subType = undefined;
|
||||
this.title = undefined;
|
||||
this.englishTitle = undefined;
|
||||
this.year = undefined;
|
||||
this.dataSource = undefined;
|
||||
this.url = undefined;
|
||||
this.id = undefined;
|
||||
this.userData = {};
|
||||
}
|
||||
|
||||
abstract getMediaType(): MediaType;
|
||||
|
||||
//a string that contains enough info to disambiguate from similar media
|
||||
|
|
@ -24,7 +37,7 @@ export abstract class MediaTypeModel {
|
|||
}
|
||||
|
||||
getWithOutUserData(): object {
|
||||
const copy = JSON.parse(JSON.stringify(this));
|
||||
const copy = Object.assign({}, this);
|
||||
delete copy.userData;
|
||||
return copy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue