Music releases
This commit is contained in:
parent
47b69b5be7
commit
003c568099
12 changed files with 178 additions and 36 deletions
35
src/models/MusicReleaseModel.ts
Normal file
35
src/models/MusicReleaseModel.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import {MediaTypeModel} from './MediaTypeModel';
|
||||
import {stringifyYaml} from 'obsidian';
|
||||
|
||||
|
||||
export class MusicReleaseModel extends MediaTypeModel {
|
||||
type: string;
|
||||
title: string;
|
||||
englishTitle: string;
|
||||
year: string;
|
||||
dataSource: string;
|
||||
url: string;
|
||||
id: string;
|
||||
|
||||
genres: string[];
|
||||
artists: string[];
|
||||
subType: string;
|
||||
rating: number;
|
||||
|
||||
personalRating: number;
|
||||
|
||||
constructor(obj: any = {}) {
|
||||
super();
|
||||
|
||||
Object.assign(this, obj);
|
||||
}
|
||||
|
||||
toMetaData(): string {
|
||||
return stringifyYaml(this);
|
||||
}
|
||||
|
||||
getFileName(): string {
|
||||
return this.title + ' (' + this.artists.join(', ') + ' - ' + this.year + ' - ' + this.subType + ')';
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue