This commit is contained in:
mProjectsCode 2022-05-18 22:22:11 +02:00
parent 003c568099
commit 344c1ebf6c
8 changed files with 39 additions and 7 deletions

View file

@ -1,5 +1,6 @@
import {MediaTypeModel} from './MediaTypeModel';
import {stringifyYaml} from 'obsidian';
import {mediaDbTag} from '../utils/Utils';
export class GameModel extends MediaTypeModel {
@ -29,11 +30,15 @@ export class GameModel extends MediaTypeModel {
}
toMetaData(): string {
return stringifyYaml(this);
return stringifyYaml({...this, tags: '#' + this.getTags().join('/')});
}
getFileName(): string {
return this.title + (this.year ? ` (${this.year})` : '');
}
getTags(): string[] {
return [mediaDbTag, 'game'];
}
}