1import{c as e,d as t,l as n,m as r,n as i,o as a,p as o,r as s,s as c,v as l}from"./index-C32yDzkE.js";var u=`/api/v3`,d=`/api`,f={name:`Radarr`,mixins:[i],props:{item:Object},data:()=>({activity:null,missing:null,warnings:null,errors:null,serverError:!1}),computed:{apiPath(){return this.item.legacyApi?d:u}},created(){this.autoUpdateMethod=this.fetchConfig,this.fetchConfig()},methods:{fetchConfig:function(){let e=e=>{console.error(e),this.serverError=!0};this.fetch(`${this.apiPath}/health?apikey=${this.item.apikey}`).then(e=>{this.warnings=0,this.errors=0;for(var t=0;t<e.length;t++)e[t].type==`warning`?this.warnings++:e[t].type==`error`&&this.errors++}).catch(e),this.item.legacyApi||this.fetch(`${this.apiPath}/queue/details?apikey=${this.item.apikey}`).then(e=>{for(var t=0;t<e.length;t++)e[t].trackedDownloadStatus==`warning`?this.warnings++:e[t].trackedDownloadStaus==`error`&&this.errors++}).catch(e),this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`).then(e=>{if(this.activity=0,this.item.legacyApi)for(var t=0;t<e.length;t++)e[t].movie&&this.activity++;else this.activity=e.totalRecords}).catch(e),this.item.legacyApi||this.fetch(`${this.apiPath}/wanted/missing?pageSize=1&apikey=${this.item.apikey}`).then(e=>{this.fetch(`${this.apiPath}/wanted/missing?pageSize=${e.totalRecords}&apikey=${this.item.apikey}`).then(e=>{this.missing=e.records.filter(e=>e.monitored&&e.isAvailable&&!e.hasFile).length})}).catch(e)}}},p={class:`notifs`},m={key:0,class:`notif activity`,title:`Activity`},h={key:1,class:`notif missing`,title:`Missing`},g={key:2,class:`notif warnings`,title:`Warning`},_={key:3,class:`notif errors`,title:`Error`},v={key:4,class:`notif errors`,title:`Connection error to Radarr API, check url and apikey in config.yml`};function y(i,s,u,d,f,y){let b=o(`Generic`);return t(),c(b,{item:u.item},{indicator:r(()=>[a(`div`,p,[i.activity>0?(t(),n(`strong`,m,l(i.activity),1)):e(``,!0),i.missing>0?(t(),n(`strong`,h,l(i.missing),1)):e(``,!0),i.warnings>0?(t(),n(`strong`,g,l(i.warnings),1)):e(``,!0),i.errors>0?(t(),n(`strong`,_,l(i.errors),1)):e(``,!0),i.serverError?(t(),n(`strong`,v,`?`)):e(``,!0)])]),_:1},8,[`item`])}var b=s(f,[[`render`,y],[`__scopeId`,`data-v-852a724e`]]);export{b 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.