"use strict";(globalThis["webpackChunksynclounge"]=globalThis["webpackChunksynclounge"]||[]).push([[9268],{9268:(t,e,a)=>{a.r(e),a.d(e,{default:()=>m});var i=a(4437),r=a(5294),n=function(){var t=this,e=t._self._c;return e("PlexMediaLayout",{attrs:{"machine-identifier":t.metadata.machineIdentifier,art:t.metadata.banner||t.metadata.art,thumb:t.metadata.thumb,title:t.metadata.parentTitle,"secondary-title":t.metadata.title,subtitle:t.subtitle,"children-header":"Episodes",children:t.children,"child-full-title":"","child-cols":"6","child-sm":"4","child-md":"3","child-xl":"2"},scopedSlots:t._u([{key:"content",fn:function(){return[t.metadata.summary?e(r.Z,{staticClass:"text--primary text-body-2"},[e(i.Z,[t._v(" "+t._s(t.metadata.summary)+" ")])],1):t._e()]},proxy:!0}])})},l=[],s=a(629);const o={name:"PlexSeason",components:{PlexMediaLayout:()=>a.e(627).then(a.bind(a,627))},props:{metadata:{type:Object,required:!0}},data:()=>({children:[],abortController:null}),computed:{combinedKey(){return{machineIdentifier:this.metadata.machineIdentifier,ratingKey:this.metadata.ratingKey}},subtitle(){const t=1===this.metadata.leafCount?"episode":"episodes";return`${this.metadata.leafCount} ${t}`}},watch:{combinedKey:{handler(){return this.fetchChildren()},immediate:!0}},beforeDestroy(){this.abortRequests()},methods:{...(0,s.nv)("plexservers",["FETCH_MEDIA_CHILDREN"]),abortRequests(){this.abortController&&(this.abortController.abort(),this.abortController=null)},async fetchChildrenCriticalSection(t){this.children=await this.FETCH_MEDIA_CHILDREN({machineIdentifier:this.metadata.machineIdentifier,ratingKey:this.metadata.ratingKey,start:0,size:500,excludeAllLeaves:1,signal:t})},async fetchChildren(){this.abortRequests();const t=new AbortController;this.abortController=t;try{await this.fetchChildrenCriticalSection(t.signal)}catch(e){if(!t.signal.aborted)throw e}}}},d=o;var h=a(1001),c=(0,h.Z)(d,n,l,!1,null,null,null);const m=c.exports}}]);
//# sourceMappingURL=9268.79a6f982.js.map