(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f90a4afe"],{"0173":function(t,i,s){"use strict";s("b1d2")},7807:function(t,i,s){"use strict";s.r(i);var e=function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",[s("div",{staticClass:"card",class:t.item.class},[s("a",{attrs:{href:t.item.url,target:t.item.target,rel:"noreferrer"}},[s("div",{staticClass:"card-content"},[s("div",{staticClass:"media"},[t.item.logo?s("div",{staticClass:"media-left"},[s("figure",{staticClass:"image is-48x48"},[s("img",{attrs:{src:t.item.logo,alt:t.item.name+" logo"}})])]):t._e(),t.item.icon?s("div",{staticClass:"media-left"},[s("figure",{staticClass:"image is-48x48"},[s("i",{class:["fa-fw",t.item.icon],staticStyle:{"font-size":"35px"}})])]):t._e(),s("div",{staticClass:"media-content"},[s("p",{staticClass:"title is-4"},[t._v(t._s(t.item.name))]),s("p",{staticClass:"subtitle is-6"},[t._v(t._s(t.item.subtitle))])]),s("div",{staticClass:"notifs"},[t.activity>0?s("strong",{staticClass:"notif activity",attrs:{title:"Activity"}},[t._v(t._s(t.activity))]):t._e(),t.warnings>0?s("strong",{staticClass:"notif warnings",attrs:{title:"Warning"}},[t._v(t._s(t.warnings))]):t._e(),t.errors>0?s("strong",{staticClass:"notif errors",attrs:{title:"Error"}},[t._v(t._s(t.errors))]):t._e(),t.serverError?s("strong",{staticClass:"notif errors",attrs:{title:"Connection error to Radarr API, check url and apikey in config.yml"}},[t._v("?")]):t._e()])]),t.item.tag?s("div",{staticClass:"tag",class:t.item.tagstyle},[s("strong",{staticClass:"tag-text"},[t._v("#"+t._s(t.item.tag))])]):t._e()])])])])},r=[],a=(s("d3b7"),s("99af"),{name:"Radarr",props:{item:Object},data:function(){return{activity:null,warnings:null,errors:null,serverError:!1}},created:function(){this.fetchConfig()},methods:{fetchConfig:function(){var t=this;fetch("".concat(this.item.url,"/api/health?apikey=").concat(this.item.apikey)).then((function(t){if(200!=t.status)throw new Error(t.statusText);return t.json()})).then((function(i){t.warnings=0,t.errors=0;for(var s=0;s<i.length;s++)"warning"==i[s].type?t.warnings++:"error"==i[s].type&&t.errors++})).catch((function(i){console.error(i),t.serverError=!0})),fetch("".concat(this.item.url,"/api/queue?apikey=").concat(this.item.apikey)).then((function(t){if(200!=t.status)throw new Error(t.statusText);return t.json()})).then((function(i){t.activity=0;for(var s=0;s<i.length;s++)i[s].movie&&t.activity++})).catch((function(i){console.error(i),t.serverError=!0}))}}}),n=a,c=(s("0173"),s("2877")),o=Object(c["a"])(n,e,r,!1,null,"545a307c",null);i["default"]=o.exports},b1d2:function(t,i,s){}}]);
//# sourceMappingURL=chunk-f90a4afe.09513a5e.js.map