diff --git a/src/main/plugins/lastfm.ts b/src/main/plugins/lastfm.ts index 3037e69e..006256db 100644 --- a/src/main/plugins/lastfm.ts +++ b/src/main/plugins/lastfm.ts @@ -244,7 +244,7 @@ export default class LastFMPlugin { */ onNowPlayingItemDidChange(attributes: object): void { if (!this._store.lastfm.filterLoop){ - this._lastfm.cachedAttributes = []} + this._lastfm.cachedAttributes = false} this.scrobbleSong(attributes) this.updateNowPlayingSong(attributes) } diff --git a/src/renderer/views/pages/cider-playlist.ejs b/src/renderer/views/pages/cider-playlist.ejs index 1c7ac047..0749b16c 100644 --- a/src/renderer/views/pages/cider-playlist.ejs +++ b/src/renderer/views/pages/cider-playlist.ejs @@ -444,8 +444,12 @@ // month = new Intl.DateTimeFormat(this.app.cfg.general.language.replace('_','-'), {month: 'long'}).format(releaseDate); // date = releaseDate.getDate(); // year = releaseDate.getFullYear(); - - return prefix + new Intl.DateTimeFormat(this.app.cfg.general.language?.replace('_','-') ?? 'en-US', {day:'numeric',month: 'long', year: 'numeric'}).format(releaseDate); + let formatted = '' + try {formatted = new Intl.DateTimeFormat(this.app.cfg.general.language?.replace('_','-') ?? 'en-US', {day:'numeric',month: 'long', year: 'numeric'}).format(releaseDate);} + catch(e){ + formatted = new Intl.DateTimeFormat('en-US', {day:'numeric',month: 'long', year: 'numeric'}).format(releaseDate); + } + return prefix + formatted } catch (e) { return "" }