i guess this will work better
This commit is contained in:
parent
1badd13f69
commit
5e87c858ba
2 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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 ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue