mirror of
https://github.com/bastienwirtz/homer.git
synced 2025-06-27 05:02:07 +02:00
Fixed yarn lint errors
This commit is contained in:
parent
6dc8fa2026
commit
abfe72b9cf
@ -42,18 +42,19 @@ export default {
|
|||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
embyCount: function () {
|
embyCount: function () {
|
||||||
if(this.item.libraryType === 'music')
|
if (this.item.libraryType === "music")
|
||||||
return `${this.songCount} songs, ${this.albumCount} albums`
|
return `${this.songCount} songs, ${this.albumCount} albums`;
|
||||||
if(this.item.libraryType === 'movies')
|
else if (this.item.libraryType === "movies")
|
||||||
return `${this.movieCount} movies`
|
return `${this.movieCount} movies`;
|
||||||
if(this.item.libraryType === 'series')
|
else if (this.item.libraryType === "series")
|
||||||
return `${this.episodeCount} eps, ${this.seriesCount} series`
|
return `${this.episodeCount} eps, ${this.seriesCount} series`;
|
||||||
|
else return `wrong library type 💀`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.fetchServerStatus();
|
this.fetchServerStatus();
|
||||||
|
|
||||||
if(!this.item.subtitle && this.status !== "dead")
|
if (!this.item.subtitle && this.status !== "dead")
|
||||||
this.fetchServerMediaStats();
|
this.fetchServerMediaStats();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -63,11 +64,9 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
await this.fetch("/System/info/public", { headers })
|
await this.fetch("/System/info/public", { headers })
|
||||||
.then(response => {
|
.then((response) => {
|
||||||
if(response.Id)
|
if (response.Id) this.status = "running";
|
||||||
this.status = "running";
|
else this.status = "dead";
|
||||||
else
|
|
||||||
this.status = "dead";
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@ -79,7 +78,9 @@ export default {
|
|||||||
"X-Emby-Token": this.item.apikey,
|
"X-Emby-Token": this.item.apikey,
|
||||||
};
|
};
|
||||||
|
|
||||||
var data = await this.fetch("/items/counts", { headers }).catch((e) => { console.log(e); });
|
var data = await this.fetch("/items/counts", { headers }).catch((e) => {
|
||||||
|
console.log(e);
|
||||||
|
});
|
||||||
|
|
||||||
this.albumCount = data.AlbumCount;
|
this.albumCount = data.AlbumCount;
|
||||||
this.songCount = data.SongCount;
|
this.songCount = data.SongCount;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user