1import{a as e,c as t,d as n,g as r,l as i,m as a,n as o,o as s,p as c,r as l,s as u,u as d,v as f}from"./index-C32yDzkE.js";var p={name:`Emby`,mixins:[o],props:{item:Object},data:()=>({status:``,albumCount:0,songCount:0,movieCount:0,seriesCount:0,episodeCount:0}),computed:{embyCount:function(){return this.item.libraryType===`music`?`${this.songCount} songs, ${this.albumCount} albums`:this.item.libraryType===`movies`?`${this.movieCount} movies`:this.item.libraryType===`series`?`${this.episodeCount} eps, ${this.seriesCount} series`:`wrong library type ð`}},created(){this.autoUpdateMethod=this.fetchAll,this.fetchAll()},methods:{fetchAll:async function(){let e=await this.fetchServerStatus();this.item.subtitle||this.fetchServerMediaStats(e)},fetchServerStatus:async function(){return this.fetch(`/System/info/public`).then(e=>{if(!e.Id)throw Error();return this.status=`running`,e}).catch(e=>(console.log(e),this.status=`dead`,null))},authHeaders:function(e){let t=e?.ProductName?.toLowerCase().includes(`jellyfin`)&&parseInt(e.Version,10)>=12;return this.item.legacyAuth??!t?{"X-Emby-Token":this.item.apikey}:{Authorization:`MediaBrowser Token="${this.item.apikey}"`}},fetchServerMediaStats:async function(e){let t=this.authHeaders(e),n=await this.fetch(`/items/counts`,{headers:t}).catch(e=>{console.log(e)});n&&(this.albumCount=n.AlbumCount,this.songCount=n.SongCount,this.movieCount=n.MovieCount,this.seriesCount=n.SeriesCount,this.episodeCount=n.EpisodeCount)}}},m={class:`title is-4`},h={class:`subtitle is-6`};function g(o,l,p,g,_,v){let y=c(`Generic`);return n(),u(y,{item:p.item},{content:a(()=>[s(`p`,m,f(p.item.name),1),s(`p`,h,[p.item.subtitle?(n(),i(e,{key:0},[d(f(p.item.subtitle),1)],64)):(n(),i(e,{key:1},[d(f(v.embyCount),1)],64))])]),indicator:a(()=>[o.status?(n(),i(`div`,{key:0,class:r([`status`,o.status])},f(o.status),3)):t(``,!0)]),_:1},8,[`item`])}var _=l(p,[[`render`,g],[`__scopeId`,`data-v-c0ee8688`]]);export{_ as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.