4 <p class="title is-4">{{ item.name }}</p>
5 <p class="subtitle is-6">
6 <template v-if="item.subtitle">
15 <div v-if="status" class="status" :class="status">
23 import service from "@/mixins/service.js";
24 import Generic from "./Generic.vue";
44 embyCount: function () {
45 if(this.item.libraryType === 'music')
46 return `${this.songCount} songs, ${this.albumCount} albums`
47 if(this.item.libraryType === 'movies')
48 return `${this.movieCount} movies`
49 if(this.item.libraryType === 'series')
50 return `${this.episodeCount} eps, ${this.seriesCount} series`
54 this.fetchServerStatus();
56 if(!this.item.subtitle && this.status !== "dead")
57 this.fetchServerMediaStats();
60 fetchServerStatus: async function () {
62 "X-Emby-Token": this.item.apikey,
65 await this.fetch("/System/info/public", { headers })
68 this.status = "running";
77 fetchServerMediaStats: async function () {
79 "X-Emby-Token": this.item.apikey,
82 var data = await this.fetch("/items/counts", { headers }).catch((e) => { console.log(e); });
84 this.albumCount = data.AlbumCount;
85 this.songCount = data.SongCount;
86 this.movieCount = data.MovieCount;
87 this.seriesCount = data.SeriesCount;
88 this.episodeCount = data.EpisodeCount;
94 <style scoped lang="scss">
97 color: var(--text-title);
100 background-color: #94e185;
101 border-color: #78d965;
102 box-shadow: 0 0 5px 1px #94e185;
106 background-color: #c9404d;
107 border-color: #c42c3b;
108 box-shadow: 0 0 5px 1px #c9404d;
113 display: inline-block;
117 border: 1px solid #000;