Music releases

This commit is contained in:
mProjectsCode 2022-05-18 22:10:56 +02:00
parent 47b69b5be7
commit 003c568099
12 changed files with 178 additions and 36 deletions

View 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 + ')';
}
}

View file

@ -39,7 +39,7 @@ export class SeriesModel extends MediaTypeModel {
}
getFileName(): string {
return this.title;
return this.title + ' (' + this.year + ')';
}
}