games, english anime titles, specials and OVAs
This commit is contained in:
parent
c400b7abf5
commit
d2afe3bcc2
10 changed files with 141 additions and 42 deletions
39
src/models/GameModel.ts
Normal file
39
src/models/GameModel.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import {MediaTypeModel} from './MediaTypeModel';
|
||||
import {stringifyYaml} from 'obsidian';
|
||||
|
||||
|
||||
export class GameModel extends MediaTypeModel {
|
||||
type: string;
|
||||
title: string;
|
||||
englishTitle: string;
|
||||
year: string;
|
||||
dataSource: string;
|
||||
url: string;
|
||||
id: string;
|
||||
|
||||
genres: string[];
|
||||
onlineRating: number;
|
||||
image: string;
|
||||
|
||||
released: boolean;
|
||||
releaseDate: string;
|
||||
|
||||
played: boolean;
|
||||
personalRating: number;
|
||||
|
||||
|
||||
constructor(obj: any = {}) {
|
||||
super();
|
||||
|
||||
Object.assign(this, obj);
|
||||
}
|
||||
|
||||
toMetaData(): string {
|
||||
return stringifyYaml(this);
|
||||
}
|
||||
|
||||
getFileName(): string {
|
||||
return this.title + (this.year ? ` (${this.year})` : '');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
export abstract class MediaTypeModel {
|
||||
type: string;
|
||||
title: string;
|
||||
englishTitle: string;
|
||||
year: string;
|
||||
dataSource: string;
|
||||
url: string;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {stringifyYaml} from 'obsidian';
|
|||
export class MovieModel extends MediaTypeModel {
|
||||
type: string;
|
||||
title: string;
|
||||
englishTitle: string;
|
||||
year: string;
|
||||
dataSource: string;
|
||||
url: string;
|
||||
|
|
@ -28,8 +29,6 @@ export class MovieModel extends MediaTypeModel {
|
|||
super();
|
||||
|
||||
Object.assign(this, obj);
|
||||
|
||||
this.type = 'movie';
|
||||
}
|
||||
|
||||
toMetaData(): string {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {stringifyYaml} from 'obsidian';
|
|||
export class SeriesModel extends MediaTypeModel {
|
||||
type: string;
|
||||
title: string;
|
||||
englishTitle: string;
|
||||
year: string;
|
||||
dataSource: string;
|
||||
url: string;
|
||||
|
|
@ -31,8 +32,6 @@ export class SeriesModel extends MediaTypeModel {
|
|||
super();
|
||||
|
||||
Object.assign(this, obj);
|
||||
|
||||
this.type = 'series';
|
||||
}
|
||||
|
||||
toMetaData(): string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue