🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@iptv/xtream-api

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iptv/xtream-api - npm Package Compare versions

Comparing version
1.2.4
to
1.3.0
+1
-1
dist/camelcase.cjs

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("camelcase-keys"),t=require("./index.cjs"),n=t.defineSerializers("Camel Case",{profile:e=>r(e),serverInfo:e=>r(e),channelCategories:e=>r(e),movieCategories:e=>r(e),showCategories:e=>r(e),channels:e=>r(e),movies:e=>r(e),movie:e=>r(e,{deep:!0}),shows:e=>r(e),show:e=>r(e,{deep:!0}),shortEPG:e=>r(e,{deep:!0}),fullEPG:e=>r(e,{deep:!0})});exports.camelCaseSerializer=n;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("camelcase-keys").default,t=require("./index.cjs"),n=t.defineSerializers("Camel Case",{profile:e=>r(e),serverInfo:e=>r(e),channelCategories:e=>r(e),movieCategories:e=>r(e),showCategories:e=>r(e),channels:e=>r(e),movies:e=>r(e),movie:e=>r(e,{deep:!0}),shows:e=>r(e),show:e=>r(e,{deep:!0}),shortEPG:e=>r(e,{deep:!0}),fullEPG:e=>r(e,{deep:!0})});exports.camelCaseSerializer=n;

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class h{#s;#n;#i;#r;#o="ts";#e={profile:e=>e,serverInfo:e=>e,channelCategories:e=>e,movieCategories:e=>e,showCategories:e=>e,channels:e=>e,movies:e=>e,movie:e=>e,shows:e=>e,show:e=>e,shortEPG:e=>e,fullEPG:e=>e};serializerType="none";userProfile;constructor({url:e,username:t,password:s,preferredFormat:r,serializer:i}){if(!e)throw new Error("The Xtream URL is required");if(!t||!s)throw new Error("The authentication credentials are required");this.#i=t.trim(),this.#r=s.trim(),this.#s=e.replace(/\/$/,""),this.#n=this.#s+`/player_api.php?username=${this.#i}&password=${this.#r}&action=`,r&&(this.#o=r),i&&(this.serializerType=i.type,this.#e={...this.#e,...i.serializers})}async#t(e){["get_live_streams","get_vod_streams","get_vod_info","get_series_info"].includes(e.split("&")[0])&&this.userProfile===void 0&&(this.userProfile=(await this.#t("get_profile")).user_info);const t=await fetch(`${this.#n}${e}`,{headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(t.statusText);return await t.json()}generateStreamUrl(e){if(e.type==="channel"){let t=this.#o;if(t==="rtmp")return`${this.#s}/live/${this.#i}/${this.#r}/${e.streamId}.ts`;if(e.timeshift){const{start:s,duration:r}=e.timeshift,i=s.toISOString().replace(/:/g,"-").replace("T",":").slice(0,-8);return`${this.#s}/timeshift/${this.#i}/${this.#r}/${r}/${i}/${e.streamId}.ts`}return this.userProfile.allowed_output_formats.includes(e.extension)||(t=this.userProfile.allowed_output_formats[0]),`${this.#s}/live/${this.#i}/${this.#r}/${e.streamId}.${t}`}if(e.type==="episode")return`${this.#s}/series/${this.#i}/${this.#r}/${e.streamId}.${e.extension}`;if(e.type==="movie")return`${this.#s}/movie/${this.#i}/${this.#r}/${e.streamId}.${e.extension}`}async getProfile(){const e=await this.#t("get_profile");return this.#e.profile(e.user_info)}async getServerInfo(){const e=await this.#t("get_server_info");return this.#e.serverInfo(e.server_info)}async getChannelCategories(){const e=await this.#t("get_live_categories");return this.#e.channelCategories(e)}async getMovieCategories(){const e=await this.#t("get_vod_categories");return this.#e.movieCategories(e)}async getShowCategories(){const e=await this.#t("get_series_categories");return this.#e.showCategories(e)}async getChannels({categoryId:e,page:t,limit:s}={}){const r="get_live_streams"+(e?`&category_id=${e}`:"");let i=await this.#t(r);if(t){s||(s=10);const o=(t-1)*s,n=o+s;i=i.slice(o,n)}return i.forEach(o=>{o.url=this.generateStreamUrl({type:"channel",streamId:o.stream_id,extension:this.#o})}),this.#e.channels(i)}async getMovies({categoryId:e,page:t,limit:s}={}){const r="get_vod_streams"+(e?`&category_id=${e}`:"");let i=await this.#t(r);if(t){s||(s=10);const o=(t-1)*s,n=o+s;i=i.slice(o,n)}return i.forEach(o=>{o.url=this.generateStreamUrl({type:"movie",streamId:o.stream_id,extension:o.container_extension})}),this.#e.movies(i)}async getMovie({movieId:e}){const t=await this.#t("get_vod_info&vod_id="+e);if(Array.isArray(t.info)&&t.info.length===0)throw new Error("Movie Not Found");return t.url=this.generateStreamUrl({type:"movie",streamId:t.movie_data.stream_id,extension:t.movie_data.container_extension}),this.#e.movie(t)}async getShows({categoryId:e,page:t,limit:s}={}){const r="get_series"+(e?`&category_id=${e}`:"");let i=await this.#t(r);if(t){s||(s=10);const o=(t-1)*s,n=o+s;i=i.slice(o,n)}return this.#e.shows(i)}async getShow({showId:e}){const t=await this.#t("get_series_info&series_id="+e);if(t.info.name===null)throw new Error("Show Not Found");return t.info.series_id=Number(e),Object.keys(t.episodes).forEach(s=>{t.episodes[s].forEach(r=>{r.url=this.generateStreamUrl({type:"episode",streamId:r.id,extension:r.container_extension})})}),this.#e.show(t)}async getShortEPG({channelId:e,limit:t}){const s=`get_short_epg&stream_id=${e}`+(t?`&limit=${t}`:""),r=await this.#t(s);return this.#e.shortEPG(r)}async getFullEPG({channelId:e}){const t=`get_simple_data_table&stream_id=${e}`,s=await this.#t(t);return this.#e.fullEPG(s)}}function c(a,e){return{type:a,serializers:e}}exports.Xtream=h;exports.defineSerializers=c;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class h{baseUrl;#o;#s;#i;#r="ts";#e={profile:e=>e,serverInfo:e=>e,channelCategories:e=>e,movieCategories:e=>e,showCategories:e=>e,channels:e=>e,movies:e=>e,movie:e=>e,shows:e=>e,show:e=>e,shortEPG:e=>e,fullEPG:e=>e};serializerType="none";userProfile;constructor({url:e,username:t,password:s,preferredFormat:r,serializer:i}){if(!e)throw new Error("The Xtream URL is required");if(!t||!s)throw new Error("The authentication credentials are required");this.#s=t.trim(),this.#i=s.trim(),this.baseUrl=e.replace(/\/$/,""),this.#o=this.baseUrl+`/player_api.php?username=${this.#s}&password=${this.#i}&action=`,r&&(this.#r=r),i&&(this.serializerType=i.type,this.#e={...this.#e,...i.serializers})}async#t(e){["get_live_streams","get_vod_streams","get_vod_info","get_series_info"].includes(e.split("&")[0])&&this.userProfile===void 0&&(this.userProfile=(await this.#t("get_profile")).user_info);const t=await fetch(`${this.#o}${e}`,{headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(t.statusText);return await t.json()}generateStreamUrl(e){if(e.type==="channel"){let t=this.#r;if(t==="rtmp")return`${this.baseUrl}/live/${this.#s}/${this.#i}/${e.streamId}.ts`;if(e.timeshift){const{start:s,duration:r}=e.timeshift,i=s.toISOString().replace(/:/g,"-").replace("T",":").slice(0,-8);return`${this.baseUrl}/timeshift/${this.#s}/${this.#i}/${r}/${i}/${e.streamId}.ts`}return this.userProfile.allowed_output_formats.includes(e.extension)||(t=this.userProfile.allowed_output_formats[0]),`${this.baseUrl}/live/${this.#s}/${this.#i}/${e.streamId}.${t}`}if(e.type==="episode")return`${this.baseUrl}/series/${this.#s}/${this.#i}/${e.streamId}.${e.extension}`;if(e.type==="movie")return`${this.baseUrl}/movie/${this.#s}/${this.#i}/${e.streamId}.${e.extension}`}async getProfile(){const e=await this.#t("get_profile");return this.#e.profile(e.user_info)}async getServerInfo(){const e=await this.#t("get_server_info");return this.#e.serverInfo(e.server_info)}async getChannelCategories(){const e=await this.#t("get_live_categories");return this.#e.channelCategories(e)}async getMovieCategories(){const e=await this.#t("get_vod_categories");return this.#e.movieCategories(e)}async getShowCategories(){const e=await this.#t("get_series_categories");return this.#e.showCategories(e)}async getChannels({categoryId:e,page:t,limit:s}={}){const r="get_live_streams"+(e?`&category_id=${e}`:"");let i=await this.#t(r);if(t){s||(s=10);const o=(t-1)*s,n=o+s;i=i.slice(o,n)}return i.forEach(o=>{o.url=this.generateStreamUrl({type:"channel",streamId:o.stream_id,extension:this.#r})}),this.#e.channels(i)}async getMovies({categoryId:e,page:t,limit:s}={}){const r="get_vod_streams"+(e?`&category_id=${e}`:"");let i=await this.#t(r);if(t){s||(s=10);const o=(t-1)*s,n=o+s;i=i.slice(o,n)}return i.forEach(o=>{o.url=this.generateStreamUrl({type:"movie",streamId:o.stream_id,extension:o.container_extension})}),this.#e.movies(i)}async getMovie({movieId:e}){const t=await this.#t("get_vod_info&vod_id="+e);if(Array.isArray(t.info)&&t.info.length===0)throw new Error("Movie Not Found");return t.url=this.generateStreamUrl({type:"movie",streamId:t.movie_data.stream_id,extension:t.movie_data.container_extension}),this.#e.movie(t)}async getShows({categoryId:e,page:t,limit:s}={}){const r="get_series"+(e?`&category_id=${e}`:"");let i=await this.#t(r);if(t){s||(s=10);const o=(t-1)*s,n=o+s;i=i.slice(o,n)}return this.#e.shows(i)}async getShow({showId:e}){const t=await this.#t("get_series_info&series_id="+e);if(t.info.name===null)throw new Error("Show Not Found");return t.info.series_id=Number(e),Object.keys(t.episodes).forEach(s=>{t.episodes[s].forEach(r=>{r.url=this.generateStreamUrl({type:"episode",streamId:r.id,extension:r.container_extension})})}),this.#e.show(t)}async getShortEPG({channelId:e,limit:t}){const s=`get_short_epg&stream_id=${e}`+(t?`&limit=${t}`:""),r=await this.#t(s);return this.#e.shortEPG(r)}async getFullEPG({channelId:e}){const t=`get_simple_data_table&stream_id=${e}`,s=await this.#t(t);return this.#e.fullEPG(s)}}function c(a,e){return{type:a,serializers:e}}exports.Xtream=h;exports.defineSerializers=c;
class h {
baseUrl;
#o;
#s;
#n;
#i;
#r;
#o = "ts";
#r = "ts";
#e = {

@@ -34,3 +34,3 @@ profile: (e) => e,

throw new Error("The authentication credentials are required");
this.#i = t.trim(), this.#r = s.trim(), this.#s = e.replace(/\/$/, ""), this.#n = this.#s + `/player_api.php?username=${this.#i}&password=${this.#r}&action=`, r && (this.#o = r), i && (this.serializerType = i.type, this.#e = {
this.#s = t.trim(), this.#i = s.trim(), this.baseUrl = e.replace(/\/$/, ""), this.#o = this.baseUrl + `/player_api.php?username=${this.#s}&password=${this.#i}&action=`, r && (this.#r = r), i && (this.serializerType = i.type, this.#e = {
...this.#e,

@@ -42,3 +42,3 @@ ...i.serializers

["get_live_streams", "get_vod_streams", "get_vod_info", "get_series_info"].includes(e.split("&")[0]) && this.userProfile === void 0 && (this.userProfile = (await this.#t("get_profile")).user_info);
const t = await fetch(`${this.#n}${e}`, {
const t = await fetch(`${this.#o}${e}`, {
headers: {

@@ -54,15 +54,15 @@ "Content-Type": "application/json"

if (e.type === "channel") {
let t = this.#o;
let t = this.#r;
if (t === "rtmp")
return `${this.#s}/live/${this.#i}/${this.#r}/${e.streamId}.ts`;
return `${this.baseUrl}/live/${this.#s}/${this.#i}/${e.streamId}.ts`;
if (e.timeshift) {
const { start: s, duration: r } = e.timeshift, i = s.toISOString().replace(/:/g, "-").replace("T", ":").slice(0, -8);
return `${this.#s}/timeshift/${this.#i}/${this.#r}/${r}/${i}/${e.streamId}.ts`;
return `${this.baseUrl}/timeshift/${this.#s}/${this.#i}/${r}/${i}/${e.streamId}.ts`;
}
return this.userProfile.allowed_output_formats.includes(e.extension) || (t = this.userProfile.allowed_output_formats[0]), `${this.#s}/live/${this.#i}/${this.#r}/${e.streamId}.${t}`;
return this.userProfile.allowed_output_formats.includes(e.extension) || (t = this.userProfile.allowed_output_formats[0]), `${this.baseUrl}/live/${this.#s}/${this.#i}/${e.streamId}.${t}`;
}
if (e.type === "episode")
return `${this.#s}/series/${this.#i}/${this.#r}/${e.streamId}.${e.extension}`;
return `${this.baseUrl}/series/${this.#s}/${this.#i}/${e.streamId}.${e.extension}`;
if (e.type === "movie")
return `${this.#s}/movie/${this.#i}/${this.#r}/${e.streamId}.${e.extension}`;
return `${this.baseUrl}/movie/${this.#s}/${this.#i}/${e.streamId}.${e.extension}`;
}

@@ -101,3 +101,3 @@ async getProfile() {

streamId: o.stream_id,
extension: this.#o
extension: this.#r
});

@@ -104,0 +104,0 @@ }), this.#e.channels(i);

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("camelcase-keys"),K=require("./index.cjs"),U=K.defineSerializers("JSON:API",{profile:e=>{const{auth:r,expDate:i,maxConnections:o,activeCons:n,createdAt:s,...a}=v(e);return{data:{type:"user-profile",id:a.username,attributes:{...a,isTrial:a.isTrial==="1",maxConnections:Number(o),activeConnections:Number(n),createdAt:new Date(Number(s)*1e3),expiresAt:new Date(Number(i)*1e3)}}}},serverInfo:e=>{const{timestampNow:r,...i}=v(e);return{data:{type:"server-info",id:e.url,attributes:{...i,timeNow:new Date(Number(r)*1e3)}}}},channelCategories:e=>E(e,"channel-category"),movieCategories:e=>E(e,"movie-category"),showCategories:e=>E(e,"show-category"),channels:e=>({data:v(e).map(i=>{const{added:o,num:n,streamId:s,streamType:a,categoryId:b,categoryIds:y,streamIcon:I,epgChannelId:p,tvArchive:m,...l}=i;return{type:"channel",id:s.toString(),attributes:{number:n,...l,tvArchive:m===1,logo:I,epgId:p,createdAt:new Date(Number(o)*1e3)},...y.length>0&&{relationships:{categories:{data:y.map(c=>({type:"channel-category",id:c.toString()}))}}}}})}),movies:e=>({data:v(e).map(i=>{const{num:o,streamType:n,streamIcon:s,streamId:a,releaseDate:b,rating:y,rating5Based:I,added:p,categoryIds:m,categoryId:l,episodeRunTime:c,genre:S,cast:D,director:f,youtubeTrailer:A,title:N,...T}=i;return{type:"movie",id:a.toString(),attributes:{...T,name:N,genre:S.split(",").map(d=>d.trim()),cast:D.split(",").map(d=>d.trim()),director:f.split(",").map(d=>d.trim()),poster:s,voteAverage:Number(y),duration:Number(c)*60,youtubeId:A,releaseDate:new Date(b),createdAt:new Date(Number(p)*1e3)},...m.length>0&&{relationships:{categories:{data:m.map(d=>({type:"movie-category",id:d.toString()}))}}}}})}),movie:e=>{const r=v(e,{deep:!0}),{director:i,actors:o,genre:n,cast:s,oName:a,releaseDate:b,releasedate:y,mpaaRating:I,age:p,rating:m,duration:l,durationSecs:c,coverBig:S,movieImage:D,backdropPath:f,ratingCountKinopoisk:A,kinopoiskUrl:N,episodeRunTime:T,youtubeTrailer:d,tmdbId:h,...P}=r.info,{categoryId:x,categoryIds:t,streamId:w,added:u,title:O,...C}=r.movieData;return{data:{type:"movie",id:w.toString(),attributes:{...C,...P,informationUrl:N,originalName:a,cover:S,poster:D,duration:c,durationFormatted:l,voteAverage:m,director:i.split(",").map(g=>g.trim()),actors:o.split(",").map(g=>g.trim()),cast:s.split(",").map(g=>g.trim()),genre:n.split(",").map(g=>g.trim()),youtubeId:d,tmdbId:h?.toString(),rating:{mpaa:I,age:Number(p)},releaseDate:new Date(b),createdAt:new Date(Number(u)*1e3)},...t.length>0&&{relationships:{categories:{data:t.map(g=>({type:"movie-category",id:g.toString()}))}}}}}},shows:e=>({data:v(e).map(i=>{const{num:o,streamType:n,rating:s,rating5Based:a,seriesId:b,cover:y,categoryId:I,categoryIds:p,backdropPath:m,releaseDate:l,episodeRunTime:c,lastModified:S,cast:D,director:f,genre:A,youtubeTrailer:N,title:T,...d}=i;return{type:"show",id:b.toString(),attributes:{...d,name:T,cast:D.split(",").map(h=>h.trim()),director:f.split(",").map(h=>h.trim()),genre:A.split(",").map(h=>h.trim()),voteAverage:Number(s),poster:y,cover:m[0],duration:Number(c)*60,youtubeId:N,releaseDate:new Date(l),updatedAt:new Date(Number(S)*1e3)},...p.length>0&&{relationships:{categories:{data:p.map(h=>({type:"show-category",id:h.toString()}))}}}}})}),show:e=>{const{seasons:r,info:i,episodes:o}=v(e,{deep:!0}),{rating:n,rating5Based:s,seriesId:a,cover:b,categoryId:y,categoryIds:I,backdropPath:p,releaseDate:m,episodeRunTime:l,lastModified:c,cast:S,director:D,genre:f,youtubeTrailer:A,title:N,...T}=i;if(typeof a>"u")throw new Error("seriesId is required");const d=Object.values(o).flat(),h=d.map(t=>{const{id:w,season:u,episodeNum:O,added:C,info:g,...k}=t,{releaseDate:B,rating:J,movieImage:M,coverBig:R,durationSecs:L,duration:j,tmdbId:q,...z}=g,F=r.find(G=>G.seasonNumber===u)?.id.toString()||u.toString();return{type:"episode",id:w,attributes:{number:Number(O),...k,...z,tmdbId:q?.toString(),poster:M,cover:R,voteAverage:Number(J),duration:L,durationFormatted:j,releaseDate:new Date(B),createdAt:new Date(Number(C)*1e3)},relationships:{season:{data:{type:"season",id:F}},show:{data:{type:"show",id:a.toString()}}}}});let P=r;P.length===0&&(P=Object.keys(o).map(t=>{const w=t,u=o[t][0];return{id:Number(w),name:`Season ${w}`,episodeCount:o[t].length,overview:"",airDate:u.info.releaseDate,cover:u.info.movieImage,seasonNumber:Number(w),voteAverage:Number(u.info.rating),coverBig:u.info.movieImage,releaseDate:u.info.releaseDate}}));const x=P.map(t=>{const{id:w,seasonNumber:u,cover:O,coverBig:C,airDate:g,...k}=t;return{type:"season",id:w.toString(),attributes:{...k,releaseDate:new Date(g),number:u,cover:C},relationships:{show:{data:{type:"show",id:a.toString()}},episodes:{data:d.filter(B=>B.season===u).map(B=>({type:"episode",id:B.id.toString()}))}}}});return{data:{type:"show",id:a.toString(),attributes:{...T,name:N,voteAverage:Number(n),poster:b,cover:p[0],duration:Number(l)*60,cast:S.split(",").map(t=>t.trim()),director:D.split(",").map(t=>t.trim()),genre:f.split(",").map(t=>t.trim()),youtubeId:A,releaseDate:new Date(m),updatedAt:new Date(Number(c)*1e3)},relationships:{categories:{data:I.map(t=>({type:"show-category",id:t.toString()}))},seasons:{data:P.map(t=>({type:"season",id:t.id.toString()}))},episodes:{data:d.map(t=>({type:"episode",id:t.id.toString()}))}}},included:[...x,...h]}},shortEPG:e=>{const{epgListings:r}=v(e,{deep:!0});return{data:r.map(i=>{const{id:o,channelId:n,lang:s,startTimestamp:a,stopTimestamp:b,stop:y,start:I,end:p,title:m,description:l,...c}=i;return{type:"epg-listing",id:o.toString(),attributes:{...c,start:new Date(I),end:new Date(Number(p)*1e3),title:atob(m),description:atob(l),language:s},relationships:{channel:{data:{type:"channel",id:n.toString()}}}}})}},fullEPG:e=>{const{epgListings:r}=v(e,{deep:!0});return{data:r.map(i=>{const{id:o,channelId:n,startTimestamp:s,stopTimestamp:a,start:b,end:y,title:I,description:p,nowPlaying:m,hasArchive:l,lang:c,...S}=i;return{type:"epg-listing",id:o.toString(),attributes:{...S,start:new Date(b),end:new Date(y),title:atob(I),description:atob(p),language:c,nowPlaying:!!m,hasArchive:!!l},relationships:{channel:{data:{type:"channel",id:n.toString()}}}}})}}});function E(e,r){return{data:v(e).map(o=>{const{categoryId:n,categoryName:s,parentId:a}=o;return{type:r,id:n.toString(),attributes:{name:s},...a&&{relationships:{parent:{data:{type:r,id:a.toString()}}}}}})}}exports.JSONAPISerializer=U;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("camelcase-keys").default,H=require("./index.cjs"),Q=H.defineSerializers("JSON:API",{profile:e=>{const{auth:o,expDate:s,maxConnections:i,activeCons:d,createdAt:a,...t}=y(e);return{data:{type:"user-profile",id:t.username,attributes:{...t,isTrial:t.isTrial==="1",maxConnections:Number(i),activeConnections:Number(d),createdAt:new Date(Number(a)*1e3),expiresAt:new Date(Number(s)*1e3)}}}},serverInfo:e=>{const{timestampNow:o,...s}=y(e);return{data:{type:"server-info",id:e.url,attributes:{...s,timeNow:new Date(Number(o)*1e3)}}}},channelCategories:e=>k(e,"channel-category"),movieCategories:e=>k(e,"movie-category"),showCategories:e=>k(e,"show-category"),channels:e=>({data:y(e).map(s=>{const{added:i,num:d,streamId:a,categoryIds:t,streamIcon:u,epgChannelId:p,tvArchive:c,name:m,tvArchiveDuration:b,url:v}=s;return{type:"channel",id:a.toString(),attributes:{name:m,number:d,tvArchive:c===1,tvArchiveDuration:b,logo:u,epgId:p,createdAt:new Date(Number(i)*1e3),url:v},...t.length>0&&{relationships:{categories:{data:t.map(h=>({type:"channel-category",id:h.toString()}))}}}}})}),movies:e=>({data:y(e).map(s=>{const{streamIcon:i,streamId:d,releaseDate:a,rating:t,added:u,categoryIds:p,episodeRunTime:c,genre:m,cast:b,director:v,youtubeTrailer:h,title:S,plot:N,url:w}=s;return{type:"movie",id:d.toString(),attributes:{name:S,plot:N,genre:m?.split(",").map(n=>n.trim())??[],cast:b?.split(",").map(n=>n.trim())??[],director:v?.split(",").map(n=>n.trim())??[],poster:i,voteAverage:Number(t),duration:Number(c)*60,youtubeId:h,releaseDate:a?new Date(a):null,createdAt:new Date(Number(u)*1e3),url:w},...p.length>0&&{relationships:{categories:{data:p.map(n=>({type:"movie-category",id:n.toString()}))}}}}})}),movie:e=>{const o=y(e,{deep:!0}),{director:s,actors:i,genre:d,cast:a,oName:t,releaseDate:u,mpaaRating:p,age:c,rating:m,duration:b,durationSecs:v,coverBig:h,movieImage:S,kinopoiskUrl:N,youtubeTrailer:w,tmdbId:n,name:f,description:C,plot:D,country:O,subtitles:r,bitrate:I}=o.info,{categoryIds:g,streamId:T,added:A}=o.movieData;return{data:{type:"movie",id:T.toString(),attributes:{name:f,originalName:t,description:C,plot:D,informationUrl:N,cover:h,poster:S,duration:v,durationFormatted:b,country:O,voteAverage:m,director:s?.split(",").map(l=>l.trim())??[],actors:i?.split(",").map(l=>l.trim())??[],cast:a?.split(",").map(l=>l.trim())??[],genre:d?.split(",").map(l=>l.trim())??[],youtubeId:w,tmdbId:n?.toString(),rating:{mpaa:p,age:Number(c)},subtitles:r,bitrate:I,releaseDate:u?new Date(u):null,createdAt:new Date(Number(A)*1e3)},...g.length>0&&{relationships:{categories:{data:g.map(l=>({type:"movie-category",id:l.toString()}))}}}}}},shows:e=>({data:y(e).map(s=>{const{rating:i,seriesId:d,cover:a,categoryIds:t,backdropPath:u,releaseDate:p,episodeRunTime:c,lastModified:m,cast:b,director:v,genre:h,youtubeTrailer:S,title:N,plot:w}=s;return{type:"show",id:d.toString(),attributes:{name:N,plot:w,cast:b?.split(",").map(n=>n.trim())??[],director:v?.split(",").map(n=>n.trim())??[],genre:h?.split(",").map(n=>n.trim())??[],voteAverage:Number(i),poster:a,cover:u[0],duration:Number(c)*60,youtubeId:S,releaseDate:p?new Date(p):null,updatedAt:new Date(Number(m)*1e3)},...t.length>0&&{relationships:{categories:{data:t.map(n=>({type:"show-category",id:n.toString()}))}}}}})}),show:e=>{const{seasons:o,info:s,episodes:i}=y(e,{deep:!0}),{rating:d,seriesId:a,cover:t,categoryIds:u,backdropPath:p,releaseDate:c,episodeRunTime:m,lastModified:b,cast:v,director:h,genre:S,youtubeTrailer:N,title:w,plot:n}=s;if(typeof a>"u")throw new Error("seriesId is required");const f=Object.values(i).flat(),C=f.map(r=>{const{id:I,season:g,title:T,subtitles:A,url:l,episodeNum:B,added:P,info:E}=r,{releaseDate:x,rating:J,movieImage:M,coverBig:R,durationSecs:j,duration:q,tmdbId:z,plot:F,video:G,audio:L,bitrate:U}=E,K=o.find($=>$.seasonNumber===g)?.id.toString()||g.toString();return{type:"episode",id:I,attributes:{number:Number(B),title:T,plot:F,tmdbId:z?.toString(),poster:M,cover:R,voteAverage:Number(J),duration:j,durationFormatted:q,releaseDate:x?new Date(x):null,createdAt:new Date(Number(P)*1e3),subtitles:A,url:l,video:G,audio:L,bitrate:U},relationships:{season:{data:{type:"season",id:K}},show:{data:{type:"show",id:a.toString()}}}}});let D=o;D.length===0&&(D=Object.keys(i).map(r=>{const I=r,g=i[r][0];return{id:Number(I),name:`Season ${I}`,episodeCount:i[r].length,overview:"",airDate:g.info.releaseDate,cover:g.info.movieImage,seasonNumber:Number(I),voteAverage:Number(g.info.rating),coverBig:g.info.movieImage}}));const O=D.map(r=>{const{id:I,seasonNumber:g,cover:T,coverBig:A,airDate:l,...B}=r;return{type:"season",id:I.toString(),attributes:{...B,releaseDate:l?new Date(l):null,number:g,cover:A},relationships:{show:{data:{type:"show",id:a.toString()}},episodes:{data:f.filter(P=>P.season===g).map(P=>({type:"episode",id:P.id.toString()}))}}}});return{data:{type:"show",id:a.toString(),attributes:{name:w,plot:n,voteAverage:Number(d),poster:t,cover:p[0],duration:Number(m)*60,cast:v?.split(",").map(r=>r.trim())??[],director:h?.split(",").map(r=>r.trim())??[],genre:S?.split(",").map(r=>r.trim())??[],youtubeId:N,releaseDate:c?new Date(c):null,updatedAt:new Date(Number(b)*1e3)},relationships:{categories:{data:u.map(r=>({type:"show-category",id:r.toString()}))},seasons:{data:D.map(r=>({type:"season",id:r.id.toString()}))},episodes:{data:f.map(r=>({type:"episode",id:r.id.toString()}))}}},included:[...O,...C]}},shortEPG:e=>{const{epgListings:o}=y(e,{deep:!0});return{data:o.map(s=>{const{id:i,channelId:d,lang:a,start:t,end:u,title:p,description:c,epgId:m}=s;return{type:"epg-listing",id:i.toString(),attributes:{epgId:m,start:new Date(t),end:new Date(Number(u)*1e3),title:atob(p),description:atob(c),language:a},relationships:{channel:{data:{type:"channel",id:d.toString()}}}}})}},fullEPG:e=>{const{epgListings:o}=y(e,{deep:!0});return{data:o.map(s=>{const{id:i,channelId:d,start:a,end:t,title:u,description:p,nowPlaying:c,hasArchive:m,lang:b,epgId:v}=s;return{type:"epg-listing",id:i.toString(),attributes:{epgId:v,start:new Date(a),end:new Date(t),title:atob(u),description:atob(p),language:b,nowPlaying:!!c,hasArchive:!!m},relationships:{channel:{data:{type:"channel",id:d.toString()}}}}})}}});function k(e,o){return{data:y(e).map(i=>{const{categoryId:d,categoryName:a,parentId:t}=i;return{type:o,id:d.toString(),attributes:{name:a},...t&&{relationships:{parent:{data:{type:o,id:t.toString()}}}}}})}}exports.JSONAPISerializer=Q;

@@ -1,17 +0,17 @@

import v from "camelcase-keys";
import { defineSerializers as U } from "./index.js";
const H = U("JSON:API", {
import y from "camelcase-keys";
import { defineSerializers as H } from "./index.js";
const W = H("JSON:API", {
profile: (e) => {
const { auth: r, expDate: i, maxConnections: o, activeCons: n, createdAt: s, ...a } = v(e);
const { auth: n, expDate: s, maxConnections: i, activeCons: d, createdAt: a, ...t } = y(e);
return {
data: {
type: "user-profile",
id: a.username,
id: t.username,
attributes: {
...a,
isTrial: a.isTrial === "1",
maxConnections: Number(o),
activeConnections: Number(n),
createdAt: new Date(Number(s) * 1e3),
expiresAt: new Date(Number(i) * 1e3)
...t,
isTrial: t.isTrial === "1",
maxConnections: Number(i),
activeConnections: Number(d),
createdAt: new Date(Number(a) * 1e3),
expiresAt: new Date(Number(s) * 1e3)
}

@@ -22,3 +22,3 @@ }

serverInfo: (e) => {
const { timestampNow: r, ...i } = v(e);
const { timestampNow: n, ...s } = y(e);
return {

@@ -29,4 +29,4 @@ data: {

attributes: {
...i,
timeNow: new Date(Number(r) * 1e3)
...s,
timeNow: new Date(Number(n) * 1e3)
}

@@ -36,36 +36,27 @@ }

},
channelCategories: (e) => O(e, "channel-category"),
movieCategories: (e) => O(e, "movie-category"),
showCategories: (e) => O(e, "show-category"),
channelCategories: (e) => k(e, "channel-category"),
movieCategories: (e) => k(e, "movie-category"),
showCategories: (e) => k(e, "show-category"),
channels: (e) => ({
data: v(e).map((i) => {
const {
added: o,
num: n,
streamId: s,
streamType: a,
categoryId: b,
categoryIds: y,
streamIcon: I,
epgChannelId: p,
tvArchive: m,
...l
} = i;
data: y(e).map((s) => {
const { added: i, num: d, streamId: a, categoryIds: t, streamIcon: m, epgChannelId: p, tvArchive: u, name: l, tvArchiveDuration: b, url: v } = s;
return {
type: "channel",
id: s.toString(),
id: a.toString(),
attributes: {
number: n,
...l,
tvArchive: m === 1,
logo: I,
name: l,
number: d,
tvArchive: u === 1,
tvArchiveDuration: b,
logo: m,
epgId: p,
createdAt: new Date(Number(o) * 1e3)
createdAt: new Date(Number(i) * 1e3),
url: v
},
...y.length > 0 && {
...t.length > 0 && {
relationships: {
categories: {
data: y.map((c) => ({
data: t.map((h) => ({
type: "channel-category",
id: c.toString()
id: h.toString()
}))

@@ -79,44 +70,42 @@ }

movies: (e) => ({
data: v(e).map((i) => {
data: y(e).map((s) => {
const {
num: o,
streamType: n,
streamIcon: s,
streamId: a,
releaseDate: b,
rating: y,
rating5Based: I,
added: p,
categoryIds: m,
categoryId: l,
episodeRunTime: c,
genre: w,
cast: N,
director: f,
youtubeTrailer: A,
title: S,
...T
} = i;
streamIcon: i,
streamId: d,
releaseDate: a,
rating: t,
added: m,
categoryIds: p,
episodeRunTime: u,
genre: l,
cast: b,
director: v,
youtubeTrailer: h,
title: w,
plot: N,
url: D
} = s;
return {
type: "movie",
id: a.toString(),
id: d.toString(),
attributes: {
...T,
name: S,
genre: w.split(",").map((d) => d.trim()),
cast: N.split(",").map((d) => d.trim()),
director: f.split(",").map((d) => d.trim()),
poster: s,
voteAverage: Number(y),
duration: Number(c) * 60,
youtubeId: A,
releaseDate: new Date(b),
createdAt: new Date(Number(p) * 1e3)
name: w,
plot: N,
genre: l?.split(",").map((o) => o.trim()) ?? [],
cast: b?.split(",").map((o) => o.trim()) ?? [],
director: v?.split(",").map((o) => o.trim()) ?? [],
poster: i,
voteAverage: Number(t),
duration: Number(u) * 60,
youtubeId: h,
releaseDate: a ? new Date(a) : null,
createdAt: new Date(Number(m) * 1e3),
url: D
},
...m.length > 0 && {
...p.length > 0 && {
relationships: {
categories: {
data: m.map((d) => ({
data: p.map((o) => ({
type: "movie-category",
id: d.toString()
id: o.toString()
}))

@@ -130,58 +119,63 @@ }

movie: (e) => {
const r = v(e, { deep: !0 }), {
director: i,
actors: o,
genre: n,
cast: s,
oName: a,
releaseDate: b,
releasedate: y,
mpaaRating: I,
age: p,
rating: m,
duration: l,
durationSecs: c,
coverBig: w,
movieImage: N,
backdropPath: f,
ratingCountKinopoisk: A,
kinopoiskUrl: S,
episodeRunTime: T,
youtubeTrailer: d,
tmdbId: h,
...C
} = r.info, { categoryId: x, categoryIds: t, streamId: D, added: u, title: k, ...P } = r.movieData;
const n = y(e, { deep: !0 }), {
director: s,
actors: i,
genre: d,
cast: a,
oName: t,
releaseDate: m,
mpaaRating: p,
age: u,
rating: l,
duration: b,
durationSecs: v,
coverBig: h,
movieImage: w,
kinopoiskUrl: N,
youtubeTrailer: D,
tmdbId: o,
name: f,
description: T,
plot: S,
country: B,
subtitles: r,
bitrate: I
} = n.info, { categoryIds: g, streamId: P, added: A } = n.movieData;
return {
data: {
type: "movie",
id: D.toString(),
id: P.toString(),
attributes: {
...P,
...C,
informationUrl: S,
originalName: a,
cover: w,
poster: N,
duration: c,
durationFormatted: l,
voteAverage: m,
director: i.split(",").map((g) => g.trim()),
actors: o.split(",").map((g) => g.trim()),
cast: s.split(",").map((g) => g.trim()),
genre: n.split(",").map((g) => g.trim()),
youtubeId: d,
tmdbId: h?.toString(),
name: f,
originalName: t,
description: T,
plot: S,
informationUrl: N,
cover: h,
poster: w,
duration: v,
durationFormatted: b,
country: B,
voteAverage: l,
director: s?.split(",").map((c) => c.trim()) ?? [],
actors: i?.split(",").map((c) => c.trim()) ?? [],
cast: a?.split(",").map((c) => c.trim()) ?? [],
genre: d?.split(",").map((c) => c.trim()) ?? [],
youtubeId: D,
tmdbId: o?.toString(),
rating: {
mpaa: I,
age: Number(p)
mpaa: p,
age: Number(u)
},
releaseDate: new Date(b),
createdAt: new Date(Number(u) * 1e3)
subtitles: r,
bitrate: I,
releaseDate: m ? new Date(m) : null,
createdAt: new Date(Number(A) * 1e3)
},
...t.length > 0 && {
...g.length > 0 && {
relationships: {
categories: {
data: t.map((g) => ({
data: g.map((c) => ({
type: "movie-category",
id: g.toString()
id: c.toString()
}))

@@ -195,46 +189,42 @@ }

shows: (e) => ({
data: v(e).map((i) => {
data: y(e).map((s) => {
const {
num: o,
streamType: n,
rating: s,
rating5Based: a,
seriesId: b,
cover: y,
categoryId: I,
categoryIds: p,
rating: i,
seriesId: d,
cover: a,
categoryIds: t,
backdropPath: m,
releaseDate: l,
episodeRunTime: c,
lastModified: w,
cast: N,
director: f,
genre: A,
youtubeTrailer: S,
title: T,
...d
} = i;
releaseDate: p,
episodeRunTime: u,
lastModified: l,
cast: b,
director: v,
genre: h,
youtubeTrailer: w,
title: N,
plot: D
} = s;
return {
type: "show",
id: b.toString(),
id: d.toString(),
attributes: {
...d,
name: T,
cast: N.split(",").map((h) => h.trim()),
director: f.split(",").map((h) => h.trim()),
genre: A.split(",").map((h) => h.trim()),
voteAverage: Number(s),
poster: y,
name: N,
plot: D,
cast: b?.split(",").map((o) => o.trim()) ?? [],
director: v?.split(",").map((o) => o.trim()) ?? [],
genre: h?.split(",").map((o) => o.trim()) ?? [],
voteAverage: Number(i),
poster: a,
cover: m[0],
duration: Number(c) * 60,
youtubeId: S,
releaseDate: new Date(l),
updatedAt: new Date(Number(w) * 1e3)
duration: Number(u) * 60,
youtubeId: w,
releaseDate: p ? new Date(p) : null,
updatedAt: new Date(Number(l) * 1e3)
},
...p.length > 0 && {
...t.length > 0 && {
relationships: {
categories: {
data: p.map((h) => ({
data: t.map((o) => ({
type: "show-category",
id: h.toString()
id: o.toString()
}))

@@ -248,45 +238,48 @@ }

show: (e) => {
const { seasons: r, info: i, episodes: o } = v(e, {
const { seasons: n, info: s, episodes: i } = y(e, {
deep: !0
}), {
rating: n,
rating5Based: s,
rating: d,
seriesId: a,
cover: b,
categoryId: y,
categoryIds: I,
cover: t,
categoryIds: m,
backdropPath: p,
releaseDate: m,
releaseDate: u,
episodeRunTime: l,
lastModified: c,
cast: w,
director: N,
genre: f,
youtubeTrailer: A,
title: S,
...T
} = i;
lastModified: b,
cast: v,
director: h,
genre: w,
youtubeTrailer: N,
title: D,
plot: o
} = s;
if (typeof a > "u")
throw new Error("seriesId is required");
const d = Object.values(o).flat(), h = d.map((t) => {
const { id: D, season: u, episodeNum: k, added: P, info: g, ...E } = t, { releaseDate: B, rating: R, movieImage: J, coverBig: L, durationSecs: M, duration: j, tmdbId: z, ...F } = g, G = r.find((K) => K.seasonNumber === u)?.id.toString() || u.toString();
const f = Object.values(i).flat(), T = f.map((r) => {
const { id: I, season: g, title: P, subtitles: A, url: c, episodeNum: O, added: C, info: E } = r, { releaseDate: x, rating: J, movieImage: M, coverBig: R, durationSecs: j, duration: z, tmdbId: F, plot: G, video: L, audio: U, bitrate: q } = E, K = n.find(($) => $.seasonNumber === g)?.id.toString() || g.toString();
return {
type: "episode",
id: D,
id: I,
attributes: {
number: Number(k),
...E,
...F,
tmdbId: z?.toString(),
poster: J,
cover: L,
voteAverage: Number(R),
duration: M,
durationFormatted: j,
releaseDate: new Date(B),
createdAt: new Date(Number(P) * 1e3)
number: Number(O),
title: P,
plot: G,
tmdbId: F?.toString(),
poster: M,
cover: R,
voteAverage: Number(J),
duration: j,
durationFormatted: z,
releaseDate: x ? new Date(x) : null,
createdAt: new Date(Number(C) * 1e3),
subtitles: A,
url: c,
video: L,
audio: U,
bitrate: q
},
relationships: {
season: {
data: { type: "season", id: G }
data: { type: "season", id: K }
},

@@ -299,28 +292,27 @@ show: {

});
let C = r;
C.length === 0 && (C = Object.keys(o).map((t) => {
const D = t, u = o[t][0];
let S = n;
S.length === 0 && (S = Object.keys(i).map((r) => {
const I = r, g = i[r][0];
return {
id: Number(D),
name: `Season ${D}`,
episodeCount: o[t].length,
id: Number(I),
name: `Season ${I}`,
episodeCount: i[r].length,
overview: "",
airDate: u.info.releaseDate,
cover: u.info.movieImage,
seasonNumber: Number(D),
voteAverage: Number(u.info.rating),
coverBig: u.info.movieImage,
releaseDate: u.info.releaseDate
airDate: g.info.releaseDate,
cover: g.info.movieImage,
seasonNumber: Number(I),
voteAverage: Number(g.info.rating),
coverBig: g.info.movieImage
};
}));
const x = C.map((t) => {
const { id: D, seasonNumber: u, cover: k, coverBig: P, airDate: g, ...E } = t;
const B = S.map((r) => {
const { id: I, seasonNumber: g, cover: P, coverBig: A, airDate: c, ...O } = r;
return {
type: "season",
id: D.toString(),
id: I.toString(),
attributes: {
...E,
releaseDate: new Date(g),
number: u,
cover: P
...O,
releaseDate: c ? new Date(c) : null,
number: g,
cover: A
},

@@ -332,5 +324,5 @@ relationships: {

episodes: {
data: d.filter((B) => B.season === u).map((B) => ({
data: f.filter((C) => C.season === g).map((C) => ({
type: "episode",
id: B.id.toString()
id: C.id.toString()
}))

@@ -346,32 +338,32 @@ }

attributes: {
...T,
name: S,
voteAverage: Number(n),
poster: b,
name: D,
plot: o,
voteAverage: Number(d),
poster: t,
cover: p[0],
duration: Number(l) * 60,
cast: w.split(",").map((t) => t.trim()),
director: N.split(",").map((t) => t.trim()),
genre: f.split(",").map((t) => t.trim()),
youtubeId: A,
releaseDate: new Date(m),
updatedAt: new Date(Number(c) * 1e3)
cast: v?.split(",").map((r) => r.trim()) ?? [],
director: h?.split(",").map((r) => r.trim()) ?? [],
genre: w?.split(",").map((r) => r.trim()) ?? [],
youtubeId: N,
releaseDate: u ? new Date(u) : null,
updatedAt: new Date(Number(b) * 1e3)
},
relationships: {
categories: {
data: I.map((t) => ({
data: m.map((r) => ({
type: "show-category",
id: t.toString()
id: r.toString()
}))
},
seasons: {
data: C.map((t) => ({
data: S.map((r) => ({
type: "season",
id: t.id.toString()
id: r.id.toString()
}))
},
episodes: {
data: d.map((t) => ({
data: f.map((r) => ({
type: "episode",
id: t.id.toString()
id: r.id.toString()
}))

@@ -381,32 +373,20 @@ }

},
included: [...x, ...h]
included: [...B, ...T]
};
},
shortEPG: (e) => {
const { epgListings: r } = v(e, { deep: !0 });
const { epgListings: n } = y(e, { deep: !0 });
return {
data: r.map((i) => {
const {
id: o,
channelId: n,
lang: s,
startTimestamp: a,
stopTimestamp: b,
stop: y,
start: I,
end: p,
title: m,
description: l,
...c
} = i;
data: n.map((s) => {
const { id: i, channelId: d, lang: a, start: t, end: m, title: p, description: u, epgId: l } = s;
return {
type: "epg-listing",
id: o.toString(),
id: i.toString(),
attributes: {
...c,
start: new Date(I),
end: new Date(Number(p) * 1e3),
title: atob(m),
description: atob(l),
language: s
epgId: l,
start: new Date(t),
end: new Date(Number(m) * 1e3),
title: atob(p),
description: atob(u),
language: a
},

@@ -417,3 +397,3 @@ relationships: {

type: "channel",
id: n.toString()
id: d.toString()
}

@@ -427,30 +407,17 @@ }

fullEPG: (e) => {
const { epgListings: r } = v(e, { deep: !0 });
const { epgListings: n } = y(e, { deep: !0 });
return {
data: r.map((i) => {
const {
id: o,
channelId: n,
startTimestamp: s,
stopTimestamp: a,
start: b,
end: y,
title: I,
description: p,
nowPlaying: m,
hasArchive: l,
lang: c,
...w
} = i;
data: n.map((s) => {
const { id: i, channelId: d, start: a, end: t, title: m, description: p, nowPlaying: u, hasArchive: l, lang: b, epgId: v } = s;
return {
type: "epg-listing",
id: o.toString(),
id: i.toString(),
attributes: {
...w,
start: new Date(b),
end: new Date(y),
title: atob(I),
epgId: v,
start: new Date(a),
end: new Date(t),
title: atob(m),
description: atob(p),
language: c,
nowPlaying: !!m,
language: b,
nowPlaying: !!u,
hasArchive: !!l

@@ -462,3 +429,3 @@ },

type: "channel",
id: n.toString()
id: d.toString()
}

@@ -472,18 +439,18 @@ }

});
function O(e, r) {
function k(e, n) {
return {
data: v(e).map((o) => {
const { categoryId: n, categoryName: s, parentId: a } = o;
data: y(e).map((i) => {
const { categoryId: d, categoryName: a, parentId: t } = i;
return {
type: r,
id: n.toString(),
type: n,
id: d.toString(),
attributes: {
name: s
name: a
},
...a && {
...t && {
relationships: {
parent: {
data: {
type: r,
id: a.toString()
type: n,
id: t.toString()
}

@@ -498,3 +465,3 @@ }

export {
H as JSONAPISerializer
W as JSONAPISerializer
};

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("camelcase-keys"),K=require("./index.cjs"),U=K.defineSerializers("Standardized",{profile:e=>{const{auth:a,expDate:t,maxConnections:r,activeCons:s,createdAt:i,...o}=y(e);return{id:o.username,...o,isTrial:o.isTrial==="1",maxConnections:Number(r),activeConnections:Number(s),createdAt:new Date(Number(i)*1e3),expiresAt:new Date(Number(t)*1e3)}},serverInfo:e=>{const{timestampNow:a,...t}=y(e);return{id:e.url,...t,timeNow:new Date(Number(a)*1e3)}},channelCategories:e=>z(e),movieCategories:e=>z(e),showCategories:e=>z(e),channels:e=>y(e).map(t=>{const{added:r,num:s,streamId:i,streamType:o,categoryId:u,categoryIds:l,streamIcon:I,epgChannelId:d,tvArchive:m,...v}=t;return{id:i.toString(),number:s,...v,tvArchive:m===1,logo:I,epgId:d,createdAt:new Date(Number(r)*1e3),categoryIds:l.map(w=>w.toString())}}),movies:e=>y(e).map(t=>{const{num:r,streamType:s,streamIcon:i,streamId:o,releaseDate:u,rating:l,rating5Based:I,added:d,categoryIds:m,categoryId:v,episodeRunTime:w,genre:N,cast:S,director:h,youtubeTrailer:T,title:f,...A}=t;return{id:o.toString(),...A,name:f,genre:N.split(",").map(p=>p.trim()),cast:S.split(",").map(p=>p.trim()),director:h.split(",").map(p=>p.trim()),poster:i,duration:Number(w)*60,voteAverage:Number(l),releaseDate:new Date(u),youtubeId:T,createdAt:new Date(Number(d)*1e3),categoryIds:m.map(p=>p.toString())}}),movie:e=>{const a=y(e,{deep:!0}),{director:t,actors:r,genre:s,cast:i,oName:o,releaseDate:u,releasedate:l,mpaaRating:I,age:d,rating:m,duration:v,durationSecs:w,coverBig:N,movieImage:S,backdropPath:h,ratingCountKinopoisk:T,kinopoiskUrl:f,episodeRunTime:A,youtubeTrailer:p,tmdbId:b,...C}=a.info,{categoryId:x,categoryIds:n,streamId:D,added:g,title:E,...B}=a.movieData;return{id:D.toString(),informationUrl:f,originalName:o,cover:N,poster:S,duration:w,durationFormatted:v,voteAverage:m,director:t.split(",").map(c=>c.trim()),actors:r.split(",").map(c=>c.trim()),cast:i.split(",").map(c=>c.trim()),genre:s.split(",").map(c=>c.trim()),categoryIds:n.map(c=>c.toString()),tmdbId:b.toString(),youtubeId:p,releaseDate:new Date(u),createdAt:new Date(Number(g)*1e3),rating:{mpaa:I,age:Number(d)},...B,...C,url:a.url}},shows:e=>y(e).map(t=>{const{num:r,streamType:s,rating:i,rating5Based:o,seriesId:u,cover:l,categoryId:I,categoryIds:d,backdropPath:m,releaseDate:v,episodeRunTime:w,lastModified:N,cast:S,director:h,genre:T,youtubeTrailer:f,title:A,...p}=t;return{id:u.toString(),...p,name:A,cast:S.split(",").map(b=>b.trim()),director:h.split(",").map(b=>b.trim()),genre:T.split(",").map(b=>b.trim()),voteAverage:Number(i),poster:l,cover:m[0],duration:Number(w)*60,releaseDate:new Date(v),updatedAt:new Date(Number(N)*1e3),categoryIds:d.map(b=>b.toString()),youtubeId:f}}),show:e=>{const{seasons:a,info:t,episodes:r}=y(e,{deep:!0}),{rating:s,rating5Based:i,seriesId:o,cover:u,categoryId:l,categoryIds:I,backdropPath:d,releaseDate:m,episodeRunTime:v,lastModified:w,cast:N,director:S,genre:h,youtubeTrailer:T,title:f,...A}=t;if(typeof o>"u")throw new Error("seriesId is required");const b=Object.values(r).flat().map(n=>{const{id:D,season:g,episodeNum:E,added:B,info:c,...P}=n,{releaseDate:k,movieImage:M,coverBig:R,durationSecs:L,duration:j,tmdbId:q,...O}=c,F=a.find(G=>G.seasonNumber===g)?.id.toString()||g.toString();return{id:D,number:Number(E),...P,...O,tmdbId:q?.toString(),poster:M,cover:R,duration:L,durationFormatted:j,releaseDate:new Date(k),createdAt:new Date(Number(B)*1e3),showId:o.toString(),seasonId:F}});let C=a;C.length===0&&(C=Object.keys(r).map(n=>{const D=n,g=r[n][0];return{id:Number(D),name:`Season ${D}`,episodeCount:r[n].length,overview:"",airDate:g.info.releaseDate,cover:g.info.movieImage,seasonNumber:Number(D),voteAverage:Number(g.info.rating),coverBig:g.info.movieImage,releaseDate:g.info.releaseDate}}));const x=C.map(n=>{const{id:D,seasonNumber:g,cover:E,coverBig:B,airDate:c,...P}=n;return{id:D.toString(),...P,releaseDate:new Date(c),number:g,cover:B,showId:o.toString(),episodes:b.filter(k=>k.seasonId===D.toString())}});return{id:o.toString(),...A,name:f,voteAverage:Number(s),poster:u,cover:d[0],duration:Number(v)*60,cast:N.split(",").map(n=>n.trim()),director:S.split(",").map(n=>n.trim()),genre:h.split(",").map(n=>n.trim()),youtubeId:T,releaseDate:new Date(m),updatedAt:new Date(Number(w)*1e3),categoryIds:I.map(n=>n.toString()),seasons:x}},shortEPG:e=>{const{epgListings:a}=y(e,{deep:!0});return a.map(t=>{const{lang:r,startTimestamp:s,stopTimestamp:i,stop:o,start:u,end:l,title:I,description:d,...m}=t;return{...m,start:new Date(u),end:new Date(Number(l)*1e3),title:atob(I),description:atob(d),language:r}})},fullEPG:e=>{const{epgListings:a}=y(e,{deep:!0});return a.map(t=>{const{lang:r,startTimestamp:s,stopTimestamp:i,start:o,end:u,title:l,description:I,nowPlaying:d,hasArchive:m,...v}=t;return{...v,start:new Date(o),end:new Date(u),title:atob(l),description:atob(I),language:r,nowPlaying:!!d,hasArchive:!!m}})}});function z(e){return y(e).map(t=>{const{categoryId:r,categoryName:s,parentId:i}=t;return{id:r.toString(),name:s,parentId:i.toString()}})}exports.standardizedSerializer=U;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("camelcase-keys").default,J=require("./index.cjs"),Q=J.defineSerializers("Standardized",{profile:e=>{const{auth:o,expDate:a,maxConnections:r,activeCons:i,createdAt:t,...s}=D(e);return{id:s.username,...s,isTrial:s.isTrial==="1",maxConnections:Number(r),activeConnections:Number(i),createdAt:new Date(Number(t)*1e3),expiresAt:new Date(Number(a)*1e3)}},serverInfo:e=>{const{timestampNow:o,...a}=D(e);return{id:e.url,...a,timeNow:new Date(Number(o)*1e3)}},channelCategories:e=>k(e),movieCategories:e=>k(e),showCategories:e=>k(e),channels:e=>D(e).map(a=>{const{added:r,num:i,streamId:t,categoryIds:s,streamIcon:m,epgChannelId:u,tvArchive:c,url:p,name:g,tvArchiveDuration:b}=a;return{id:t.toString(),name:g,number:i,tvArchive:c===1,tvArchiveDuration:b,logo:m,epgId:u,createdAt:new Date(Number(r)*1e3),categoryIds:s.map(N=>N.toString()),url:p}}),movies:e=>D(e).map(a=>{const{streamIcon:r,streamId:i,releaseDate:t,rating:s,added:m,categoryIds:u,episodeRunTime:c,genre:p,cast:g,director:b,youtubeTrailer:N,title:w,plot:S,url:y}=a;return{id:i.toString(),name:w,plot:S,genre:p?.split(",").map(n=>n.trim())??[],cast:g?.split(",").map(n=>n.trim())??[],director:b?.split(",").map(n=>n.trim())??[],poster:r,duration:Number(c)*60,voteAverage:Number(s),releaseDate:t?new Date(t):null,youtubeId:N,createdAt:new Date(Number(m)*1e3),categoryIds:u.map(n=>n.toString()),url:y}}),movie:e=>{const o=D(e,{deep:!0}),{director:a,actors:r,genre:i,cast:t,oName:s,releaseDate:m,mpaaRating:u,age:c,rating:p,duration:g,durationSecs:b,coverBig:N,movieImage:w,kinopoiskUrl:S,youtubeTrailer:y,tmdbId:n,name:x,description:C,plot:f,country:T,subtitles:d}=o.info,{categoryIds:v,streamId:I,added:h}=o.movieData;return{id:I.toString(),name:x,description:C,plot:f,country:T,informationUrl:S,originalName:s,cover:N,poster:w,duration:b,durationFormatted:g,voteAverage:p,director:a?.split(",").map(l=>l.trim())??[],actors:r?.split(",").map(l=>l.trim())??[],cast:t?.split(",").map(l=>l.trim())??[],genre:i?.split(",").map(l=>l.trim())??[],categoryIds:v.map(l=>l.toString()),tmdbId:n.toString(),youtubeId:y,releaseDate:m?new Date(m):null,createdAt:new Date(Number(h)*1e3),rating:{mpaa:u,age:Number(c)},subtitles:d,url:o.url}},shows:e=>D(e).map(a=>{const{rating:r,seriesId:i,cover:t,categoryIds:s,backdropPath:m,releaseDate:u,episodeRunTime:c,lastModified:p,cast:g,director:b,genre:N,youtubeTrailer:w,title:S,plot:y}=a;return{id:i.toString(),name:S,plot:y,cast:g?.split(",").map(n=>n.trim())??[],director:b?.split(",").map(n=>n.trim())??[],genre:N?.split(",").map(n=>n.trim())??[],voteAverage:Number(r),poster:t,cover:m[0],duration:Number(c)*60,releaseDate:u?new Date(u):null,updatedAt:new Date(Number(p)*1e3),categoryIds:s.map(n=>n.toString()),youtubeId:w}}),show:e=>{const{seasons:o,info:a,episodes:r}=D(e,{deep:!0}),{rating:i,seriesId:t,cover:s,categoryIds:m,backdropPath:u,releaseDate:c,episodeRunTime:p,lastModified:g,cast:b,director:N,genre:w,youtubeTrailer:S,title:y,plot:n}=a;if(typeof t>"u")throw new Error("seriesId is required");const C=Object.values(r).flat().map(d=>{const{id:v,season:I,episodeNum:h,added:l,info:E,title:P,url:z,subtitles:B}=d,{releaseDate:A,movieImage:M,coverBig:R,rating:j,durationSecs:q,duration:O,tmdbId:F,plot:G,video:L,audio:U,bitrate:K}=E,$=o.find(H=>H.seasonNumber===I)?.id.toString()||I.toString();return{id:v,number:Number(h),plot:G,title:P,tmdbId:F?.toString(),poster:M,voteAverage:j,cover:R,duration:q,durationFormatted:O,releaseDate:A?new Date(A):null,createdAt:new Date(Number(l)*1e3),showId:t.toString(),seasonId:$,url:z,subtitles:B,video:L,audio:U,bitrate:K}});let f=o;f.length===0&&(f=Object.keys(r).map(d=>{const v=d,I=r[d][0];return{id:Number(v),name:`Season ${v}`,episodeCount:r[d].length,overview:"",airDate:I.info.releaseDate,cover:I.info.movieImage,seasonNumber:Number(v),voteAverage:Number(I.info.rating),coverBig:I.info.movieImage}}));const T=f.map(d=>{const{id:v,seasonNumber:I,coverBig:h,airDate:l,name:E,episodeCount:P,overview:z,voteAverage:B}=d;return{id:v.toString(),name:E,episodeCount:P,overview:z,voteAverage:B,releaseDate:l?new Date(l):null,number:I,cover:h,showId:t.toString(),episodes:C.filter(A=>A.seasonId===v.toString())}});return{id:t.toString(),name:y,plot:n,voteAverage:Number(i),poster:s,cover:u[0],duration:Number(p)*60,cast:b?.split(",").map(d=>d.trim())??[],director:N?.split(",").map(d=>d.trim())??[],genre:w?.split(",").map(d=>d.trim())??[],youtubeId:S,releaseDate:c?new Date(c):null,updatedAt:new Date(Number(g)*1e3),categoryIds:m.map(d=>d.toString()),seasons:T}},shortEPG:e=>{const{epgListings:o}=D(e,{deep:!0});return o.map(a=>{const{lang:r,start:i,end:t,title:s,description:m,id:u,epgId:c,channelId:p}=a;return{id:u,epgId:c,channelId:p,start:new Date(i),end:new Date(Number(t)*1e3),title:atob(s),description:atob(m),language:r}})},fullEPG:e=>{const{epgListings:o}=D(e,{deep:!0});return o.map(a=>{const{lang:r,start:i,end:t,title:s,description:m,nowPlaying:u,hasArchive:c,id:p,epgId:g,channelId:b}=a;return{id:p,epgId:g,channelId:b,start:new Date(i),end:new Date(t),title:atob(s),description:atob(m),language:r,nowPlaying:!!u,hasArchive:!!c}})}});function k(e){return D(e).map(a=>{const{categoryId:r,categoryName:i,parentId:t}=a;return{id:r.toString(),name:i,parentId:t.toString()}})}exports.standardizedSerializer=Q;

@@ -1,22 +0,22 @@

import y from "camelcase-keys";
import { defineSerializers as U } from "./index.js";
const H = U("Standardized", {
import D from "camelcase-keys";
import { defineSerializers as J } from "./index.js";
const W = J("Standardized", {
profile: (e) => {
const { auth: a, expDate: t, maxConnections: r, activeCons: s, createdAt: i, ...o } = y(e);
const { auth: o, expDate: a, maxConnections: r, activeCons: i, createdAt: t, ...s } = D(e);
return {
id: o.username,
...o,
isTrial: o.isTrial === "1",
id: s.username,
...s,
isTrial: s.isTrial === "1",
maxConnections: Number(r),
activeConnections: Number(s),
createdAt: new Date(Number(i) * 1e3),
expiresAt: new Date(Number(t) * 1e3)
activeConnections: Number(i),
createdAt: new Date(Number(t) * 1e3),
expiresAt: new Date(Number(a) * 1e3)
};
},
serverInfo: (e) => {
const { timestampNow: a, ...t } = y(e);
const { timestampNow: o, ...a } = D(e);
return {
id: e.url,
...t,
timeNow: new Date(Number(a) * 1e3)
...a,
timeNow: new Date(Number(o) * 1e3)
};

@@ -27,248 +27,244 @@ },

showCategories: (e) => x(e),
channels: (e) => y(e).map((t) => {
const {
added: r,
num: s,
streamId: i,
streamType: o,
categoryId: p,
categoryIds: l,
streamIcon: I,
epgChannelId: d,
tvArchive: m,
...v
} = t;
channels: (e) => D(e).map((a) => {
const { added: r, num: i, streamId: t, categoryIds: s, streamIcon: m, epgChannelId: u, tvArchive: c, url: p, name: g, tvArchiveDuration: I } = a;
return {
id: i.toString(),
number: s,
...v,
tvArchive: m === 1,
logo: I,
epgId: d,
id: t.toString(),
name: g,
number: i,
tvArchive: c === 1,
tvArchiveDuration: I,
logo: m,
epgId: u,
createdAt: new Date(Number(r) * 1e3),
categoryIds: l.map((w) => w.toString())
categoryIds: s.map((N) => N.toString()),
url: p
};
}),
movies: (e) => y(e).map((t) => {
movies: (e) => D(e).map((a) => {
const {
num: r,
streamType: s,
streamIcon: i,
streamId: o,
releaseDate: p,
rating: l,
rating5Based: I,
added: d,
categoryIds: m,
categoryId: v,
episodeRunTime: w,
genre: N,
cast: f,
director: h,
youtubeTrailer: A,
title: S,
...T
} = t;
streamIcon: r,
streamId: i,
releaseDate: t,
rating: s,
added: m,
categoryIds: u,
episodeRunTime: c,
genre: p,
cast: g,
director: I,
youtubeTrailer: N,
title: w,
plot: f,
url: y
} = a;
return {
id: o.toString(),
...T,
name: S,
genre: N.split(",").map((u) => u.trim()),
cast: f.split(",").map((u) => u.trim()),
director: h.split(",").map((u) => u.trim()),
poster: i,
duration: Number(w) * 60,
voteAverage: Number(l),
releaseDate: new Date(p),
youtubeId: A,
createdAt: new Date(Number(d) * 1e3),
categoryIds: m.map((u) => u.toString())
id: i.toString(),
name: w,
plot: f,
genre: p?.split(",").map((n) => n.trim()) ?? [],
cast: g?.split(",").map((n) => n.trim()) ?? [],
director: I?.split(",").map((n) => n.trim()) ?? [],
poster: r,
duration: Number(c) * 60,
voteAverage: Number(s),
releaseDate: t ? new Date(t) : null,
youtubeId: N,
createdAt: new Date(Number(m) * 1e3),
categoryIds: u.map((n) => n.toString()),
url: y
};
}),
movie: (e) => {
const a = y(e, { deep: !0 }), {
director: t,
const o = D(e, { deep: !0 }), {
director: a,
actors: r,
genre: s,
cast: i,
oName: o,
releaseDate: p,
releasedate: l,
mpaaRating: I,
age: d,
rating: m,
duration: v,
durationSecs: w,
genre: i,
cast: t,
oName: s,
releaseDate: m,
mpaaRating: u,
age: c,
rating: p,
duration: g,
durationSecs: I,
coverBig: N,
movieImage: f,
backdropPath: h,
ratingCountKinopoisk: A,
kinopoiskUrl: S,
episodeRunTime: T,
youtubeTrailer: u,
tmdbId: b,
...C
} = a.info, { categoryId: R, categoryIds: n, streamId: D, added: g, title: E, ...B } = a.movieData;
movieImage: w,
kinopoiskUrl: f,
youtubeTrailer: y,
tmdbId: n,
name: z,
description: C,
plot: S,
country: T,
subtitles: d
} = o.info, { categoryIds: v, streamId: b, added: h } = o.movieData;
return {
id: D.toString(),
informationUrl: S,
originalName: o,
id: b.toString(),
name: z,
description: C,
plot: S,
country: T,
informationUrl: f,
originalName: s,
cover: N,
poster: f,
duration: w,
durationFormatted: v,
voteAverage: m,
director: t.split(",").map((c) => c.trim()),
actors: r.split(",").map((c) => c.trim()),
cast: i.split(",").map((c) => c.trim()),
genre: s.split(",").map((c) => c.trim()),
categoryIds: n.map((c) => c.toString()),
tmdbId: b.toString(),
youtubeId: u,
releaseDate: new Date(p),
createdAt: new Date(Number(g) * 1e3),
poster: w,
duration: I,
durationFormatted: g,
voteAverage: p,
director: a?.split(",").map((l) => l.trim()) ?? [],
actors: r?.split(",").map((l) => l.trim()) ?? [],
cast: t?.split(",").map((l) => l.trim()) ?? [],
genre: i?.split(",").map((l) => l.trim()) ?? [],
categoryIds: v.map((l) => l.toString()),
tmdbId: n.toString(),
youtubeId: y,
releaseDate: m ? new Date(m) : null,
createdAt: new Date(Number(h) * 1e3),
rating: {
mpaa: I,
age: Number(d)
mpaa: u,
age: Number(c)
},
...B,
...C,
url: a.url
subtitles: d,
url: o.url
};
},
shows: (e) => y(e).map((t) => {
shows: (e) => D(e).map((a) => {
const {
num: r,
streamType: s,
rating: i,
rating5Based: o,
seriesId: p,
cover: l,
categoryId: I,
categoryIds: d,
rating: r,
seriesId: i,
cover: t,
categoryIds: s,
backdropPath: m,
releaseDate: v,
episodeRunTime: w,
lastModified: N,
cast: f,
director: h,
genre: A,
youtubeTrailer: S,
title: T,
...u
} = t;
releaseDate: u,
episodeRunTime: c,
lastModified: p,
cast: g,
director: I,
genre: N,
youtubeTrailer: w,
title: f,
plot: y
} = a;
return {
id: p.toString(),
...u,
name: T,
cast: f.split(",").map((b) => b.trim()),
director: h.split(",").map((b) => b.trim()),
genre: A.split(",").map((b) => b.trim()),
voteAverage: Number(i),
poster: l,
id: i.toString(),
name: f,
plot: y,
cast: g?.split(",").map((n) => n.trim()) ?? [],
director: I?.split(",").map((n) => n.trim()) ?? [],
genre: N?.split(",").map((n) => n.trim()) ?? [],
voteAverage: Number(r),
poster: t,
cover: m[0],
duration: Number(w) * 60,
releaseDate: new Date(v),
updatedAt: new Date(Number(N) * 1e3),
categoryIds: d.map((b) => b.toString()),
youtubeId: S
duration: Number(c) * 60,
releaseDate: u ? new Date(u) : null,
updatedAt: new Date(Number(p) * 1e3),
categoryIds: s.map((n) => n.toString()),
youtubeId: w
};
}),
show: (e) => {
const { seasons: a, info: t, episodes: r } = y(e, {
const { seasons: o, info: a, episodes: r } = D(e, {
deep: !0
}), {
rating: s,
rating5Based: i,
seriesId: o,
cover: p,
categoryId: l,
categoryIds: I,
backdropPath: d,
releaseDate: m,
episodeRunTime: v,
lastModified: w,
cast: N,
director: f,
genre: h,
youtubeTrailer: A,
title: S,
...T
} = t;
if (typeof o > "u")
rating: i,
seriesId: t,
cover: s,
categoryIds: m,
backdropPath: u,
releaseDate: c,
episodeRunTime: p,
lastModified: g,
cast: I,
director: N,
genre: w,
youtubeTrailer: f,
title: y,
plot: n
} = a;
if (typeof t > "u")
throw new Error("seriesId is required");
const b = Object.values(r).flat().map((n) => {
const { id: D, season: g, episodeNum: E, added: B, info: c, ...k } = n, { releaseDate: P, movieImage: z, coverBig: L, durationSecs: M, duration: j, tmdbId: F, ...G } = c, K = a.find((O) => O.seasonNumber === g)?.id.toString() || g.toString();
const C = Object.values(r).flat().map((d) => {
const { id: v, season: b, episodeNum: h, added: l, info: E, title: B, url: P, subtitles: k } = d, { releaseDate: A, movieImage: M, coverBig: R, rating: j, durationSecs: F, duration: G, tmdbId: L, plot: O, video: U, audio: q, bitrate: K } = E, $ = o.find((H) => H.seasonNumber === b)?.id.toString() || b.toString();
return {
id: D,
number: Number(E),
...k,
...G,
tmdbId: F?.toString(),
poster: z,
cover: L,
duration: M,
durationFormatted: j,
releaseDate: new Date(P),
createdAt: new Date(Number(B) * 1e3),
showId: o.toString(),
seasonId: K
id: v,
number: Number(h),
plot: O,
title: B,
tmdbId: L?.toString(),
poster: M,
voteAverage: j,
cover: R,
duration: F,
durationFormatted: G,
releaseDate: A ? new Date(A) : null,
createdAt: new Date(Number(l) * 1e3),
showId: t.toString(),
seasonId: $,
url: P,
subtitles: k,
video: U,
audio: q,
bitrate: K
};
});
let C = a;
C.length === 0 && (C = Object.keys(r).map((n) => {
const D = n, g = r[n][0];
let S = o;
S.length === 0 && (S = Object.keys(r).map((d) => {
const v = d, b = r[d][0];
return {
id: Number(D),
name: `Season ${D}`,
episodeCount: r[n].length,
id: Number(v),
name: `Season ${v}`,
episodeCount: r[d].length,
overview: "",
airDate: g.info.releaseDate,
cover: g.info.movieImage,
seasonNumber: Number(D),
voteAverage: Number(g.info.rating),
coverBig: g.info.movieImage,
releaseDate: g.info.releaseDate
airDate: b.info.releaseDate,
cover: b.info.movieImage,
seasonNumber: Number(v),
voteAverage: Number(b.info.rating),
coverBig: b.info.movieImage
};
}));
const R = C.map((n) => {
const { id: D, seasonNumber: g, cover: E, coverBig: B, airDate: c, ...k } = n;
const T = S.map((d) => {
const { id: v, seasonNumber: b, coverBig: h, airDate: l, name: E, episodeCount: B, overview: P, voteAverage: k } = d;
return {
id: D.toString(),
...k,
releaseDate: new Date(c),
number: g,
cover: B,
showId: o.toString(),
episodes: b.filter((P) => P.seasonId === D.toString())
id: v.toString(),
name: E,
episodeCount: B,
overview: P,
voteAverage: k,
releaseDate: l ? new Date(l) : null,
number: b,
cover: h,
showId: t.toString(),
episodes: C.filter((A) => A.seasonId === v.toString())
};
});
return {
id: o.toString(),
...T,
name: S,
voteAverage: Number(s),
poster: p,
cover: d[0],
duration: Number(v) * 60,
cast: N.split(",").map((n) => n.trim()),
director: f.split(",").map((n) => n.trim()),
genre: h.split(",").map((n) => n.trim()),
youtubeId: A,
releaseDate: new Date(m),
updatedAt: new Date(Number(w) * 1e3),
categoryIds: I.map((n) => n.toString()),
seasons: R
id: t.toString(),
name: y,
plot: n,
voteAverage: Number(i),
poster: s,
cover: u[0],
duration: Number(p) * 60,
cast: I?.split(",").map((d) => d.trim()) ?? [],
director: N?.split(",").map((d) => d.trim()) ?? [],
genre: w?.split(",").map((d) => d.trim()) ?? [],
youtubeId: f,
releaseDate: c ? new Date(c) : null,
updatedAt: new Date(Number(g) * 1e3),
categoryIds: m.map((d) => d.toString()),
seasons: T
};
},
shortEPG: (e) => {
const { epgListings: a } = y(e, { deep: !0 });
return a.map((t) => {
const { lang: r, startTimestamp: s, stopTimestamp: i, stop: o, start: p, end: l, title: I, description: d, ...m } = t;
const { epgListings: o } = D(e, { deep: !0 });
return o.map((a) => {
const { lang: r, start: i, end: t, title: s, description: m, id: u, epgId: c, channelId: p } = a;
return {
...m,
start: new Date(p),
end: new Date(Number(l) * 1e3),
title: atob(I),
description: atob(d),
id: u,
epgId: c,
channelId: p,
start: new Date(i),
end: new Date(Number(t) * 1e3),
title: atob(s),
description: atob(m),
language: r

@@ -279,25 +275,16 @@ };

fullEPG: (e) => {
const { epgListings: a } = y(e, { deep: !0 });
return a.map((t) => {
const {
lang: r,
startTimestamp: s,
stopTimestamp: i,
start: o,
end: p,
title: l,
description: I,
nowPlaying: d,
hasArchive: m,
...v
} = t;
const { epgListings: o } = D(e, { deep: !0 });
return o.map((a) => {
const { lang: r, start: i, end: t, title: s, description: m, nowPlaying: u, hasArchive: c, id: p, epgId: g, channelId: I } = a;
return {
...v,
start: new Date(o),
end: new Date(p),
title: atob(l),
description: atob(I),
id: p,
epgId: g,
channelId: I,
start: new Date(i),
end: new Date(t),
title: atob(s),
description: atob(m),
language: r,
nowPlaying: !!d,
hasArchive: !!m
nowPlaying: !!u,
hasArchive: !!c
};

@@ -308,8 +295,8 @@ });

function x(e) {
return y(e).map((t) => {
const { categoryId: r, categoryName: s, parentId: i } = t;
return D(e).map((a) => {
const { categoryId: r, categoryName: i, parentId: t } = a;
return {
id: r.toString(),
name: s,
parentId: i.toString()
name: i,
parentId: t.toString()
};

@@ -319,3 +306,3 @@ });

export {
H as standardizedSerializer
W as standardizedSerializer
};

@@ -71,3 +71,3 @@ /**

name: string;
year: string;
year: string | null;
title: string;

@@ -79,5 +79,5 @@ streamType: string;

rating5Based: number;
genre: string;
genre: string | null;
added: string;
episodeRunTime: number;
episodeRunTime: number | null;
categoryId: string;

@@ -88,7 +88,7 @@ categoryIds: number[];

directSource: string;
releaseDate: string;
cast: string;
director: string;
plot: string;
youtubeTrailer: string;
releaseDate: string | null;
cast: string | null;
director: string | null;
plot: string | null;
youtubeTrailer: string | null;
url?: string | undefined;

@@ -104,10 +104,10 @@ }[];

movieImage: string;
releaseDate: string;
episodeRunTime: number;
youtubeTrailer: string;
director: string;
actors: string;
cast: string;
description: string;
plot: string;
releaseDate: string | null;
episodeRunTime: number | null;
youtubeTrailer: string | null;
director: string | null;
actors: string | null;
cast: string | null;
description: string | null;
plot: string | null;
age: string;

@@ -117,3 +117,3 @@ mpaaRating: string;

country: string;
genre: string;
genre: string | null;
backdropPath: string[];

@@ -123,3 +123,3 @@ durationSecs: number;

bitrate: number;
releasedate: string;
releasedate: string | null;
subtitles: string[];

@@ -132,3 +132,3 @@ rating: number;

title: string;
year: string;
year: string | null;
added: string;

@@ -147,11 +147,11 @@ categoryId: string;

title: string;
year: string;
year: string | null;
seriesId: number;
streamType: string;
cover: string;
plot: string;
cast: string;
director: string;
genre: string;
releaseDate: string;
plot: string | null;
cast: string | null;
director: string | null;
genre: string | null;
releaseDate: string | null;
lastModified: string;

@@ -161,4 +161,4 @@ rating: string;

backdropPath: string[];
youtubeTrailer: string;
episodeRunTime: string;
youtubeTrailer: string | null;
episodeRunTime: string | null;
categoryId: string;

@@ -173,7 +173,6 @@ categoryIds: number[];

overview: string;
airDate: string;
airDate: string | null;
cover: string;
seasonNumber: number;
coverBig: string;
duration?: string | undefined;
voteAverage: number;

@@ -184,10 +183,10 @@ }[];

title: string;
year: string;
year: string | null;
seriesId?: number | undefined;
cover: string;
plot: string;
cast: string;
director: string;
genre: string;
releaseDate: string;
plot: string | null;
cast: string | null;
director: string | null;
genre: string | null;
releaseDate: string | null;
lastModified: string;

@@ -197,4 +196,4 @@ rating: string;

backdropPath: string[];
youtubeTrailer: string;
episodeRunTime: string;
youtubeTrailer: string | null;
episodeRunTime: string | null;
categoryId: string;

@@ -211,4 +210,4 @@ categoryIds: number[];

airDate?: string | undefined;
releaseDate: string;
plot: string;
releaseDate: string | null;
plot: string | null;
rating: number;

@@ -304,12 +303,12 @@ movieImage: string;

forced: number;
hearingImpaired: 0;
visualImpaired: 0;
cleanEffects: 0;
attachedPic: 0;
timedThumbnails: 0;
captions: 0;
descriptions: 0;
metadata: 0;
dependent: 0;
stillImage: 0;
hearingImpaired: number;
visualImpaired: number;
cleanEffects: number;
attachedPic: number;
timedThumbnails: number;
captions: number;
descriptions: number;
metadata: number;
dependent: number;
stillImage: number;
};

@@ -427,21 +426,21 @@ tags: {

/** Hearing impaired flag */
hearing_impaired: 0;
hearing_impaired: number;
/** Visual impaired flag */
visual_impaired: 0;
visual_impaired: number;
/** Clean effects flag */
clean_effects: 0;
clean_effects: number;
/** Attached picture flag */
attached_pic: 0;
attached_pic: number;
/** Timed thumbnails flag */
timed_thumbnails: 0;
timed_thumbnails: number;
/** Captions flag */
captions: 0;
captions: number;
/** Descriptions flag */
descriptions: 0;
descriptions: number;
/** Metadata flag */
metadata: 0;
metadata: number;
/** Dependent flag */
dependent: 0;
dependent: number;
/** Still image flag */
still_image: 0;
still_image: number;
};

@@ -575,5 +574,5 @@ /** The metadata tags */

/** The release date of the episode */
release_date: string;
release_date: string | null;
/** The plot of the episdoe */
plot: string;
plot: string | null;
/** The rating of the episode */

@@ -649,3 +648,3 @@ rating: number;

/** The year the movie was released */
year: string;
year: string | null;
/** The date when the movie was added to the system */

@@ -684,17 +683,17 @@ added: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The actors in the movie */
actors: string;
actors: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age rating of the movie */

@@ -709,3 +708,3 @@ age: string;

/** The genre(s) of the movie */
genre: string;
genre: string | null;
/** Array of backdrop image URLs */

@@ -720,3 +719,3 @@ backdrop_path: string[];

/** The release date of the movie */
releasedate: string;
releasedate: string | null;
/** Array of available subtitles */

@@ -739,3 +738,3 @@ subtitles: string[];

/** Year released */
year: string;
year: string | null;
/** The title of the movie */

@@ -754,7 +753,7 @@ title: string;

/** The genres of the movie */
genre: string;
genre: string | null;
/** The date when the movie was added to the system */
added: string;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The primary category ID of the movie */

@@ -771,11 +770,11 @@ category_id: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** Youtube ID of the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The URL to access the movie */

@@ -800,3 +799,3 @@ url?: string;

/** The date when the season first aired */
air_date: string;
air_date: string | null;
/** The URL for the season's cover image */

@@ -808,4 +807,2 @@ cover: string;

cover_big: string;
/** The average duration of episodes in the season */
duration?: string;
/** The average rating vote for the season */

@@ -877,3 +874,3 @@ vote_average: number;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series, added by this library */

@@ -884,13 +881,13 @@ series_id?: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -905,5 +902,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -928,3 +925,3 @@ category_id: string;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series */

@@ -937,13 +934,13 @@ series_id: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -958,5 +955,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -963,0 +960,0 @@ category_id: string;

@@ -71,3 +71,3 @@ /**

name: string;
year: string;
year: string | null;
title: string;

@@ -79,5 +79,5 @@ streamType: string;

rating5Based: number;
genre: string;
genre: string | null;
added: string;
episodeRunTime: number;
episodeRunTime: number | null;
categoryId: string;

@@ -88,7 +88,7 @@ categoryIds: number[];

directSource: string;
releaseDate: string;
cast: string;
director: string;
plot: string;
youtubeTrailer: string;
releaseDate: string | null;
cast: string | null;
director: string | null;
plot: string | null;
youtubeTrailer: string | null;
url?: string | undefined;

@@ -104,10 +104,10 @@ }[];

movieImage: string;
releaseDate: string;
episodeRunTime: number;
youtubeTrailer: string;
director: string;
actors: string;
cast: string;
description: string;
plot: string;
releaseDate: string | null;
episodeRunTime: number | null;
youtubeTrailer: string | null;
director: string | null;
actors: string | null;
cast: string | null;
description: string | null;
plot: string | null;
age: string;

@@ -117,3 +117,3 @@ mpaaRating: string;

country: string;
genre: string;
genre: string | null;
backdropPath: string[];

@@ -123,3 +123,3 @@ durationSecs: number;

bitrate: number;
releasedate: string;
releasedate: string | null;
subtitles: string[];

@@ -132,3 +132,3 @@ rating: number;

title: string;
year: string;
year: string | null;
added: string;

@@ -147,11 +147,11 @@ categoryId: string;

title: string;
year: string;
year: string | null;
seriesId: number;
streamType: string;
cover: string;
plot: string;
cast: string;
director: string;
genre: string;
releaseDate: string;
plot: string | null;
cast: string | null;
director: string | null;
genre: string | null;
releaseDate: string | null;
lastModified: string;

@@ -161,4 +161,4 @@ rating: string;

backdropPath: string[];
youtubeTrailer: string;
episodeRunTime: string;
youtubeTrailer: string | null;
episodeRunTime: string | null;
categoryId: string;

@@ -173,7 +173,6 @@ categoryIds: number[];

overview: string;
airDate: string;
airDate: string | null;
cover: string;
seasonNumber: number;
coverBig: string;
duration?: string | undefined;
voteAverage: number;

@@ -184,10 +183,10 @@ }[];

title: string;
year: string;
year: string | null;
seriesId?: number | undefined;
cover: string;
plot: string;
cast: string;
director: string;
genre: string;
releaseDate: string;
plot: string | null;
cast: string | null;
director: string | null;
genre: string | null;
releaseDate: string | null;
lastModified: string;

@@ -197,4 +196,4 @@ rating: string;

backdropPath: string[];
youtubeTrailer: string;
episodeRunTime: string;
youtubeTrailer: string | null;
episodeRunTime: string | null;
categoryId: string;

@@ -211,4 +210,4 @@ categoryIds: number[];

airDate?: string | undefined;
releaseDate: string;
plot: string;
releaseDate: string | null;
plot: string | null;
rating: number;

@@ -304,12 +303,12 @@ movieImage: string;

forced: number;
hearingImpaired: 0;
visualImpaired: 0;
cleanEffects: 0;
attachedPic: 0;
timedThumbnails: 0;
captions: 0;
descriptions: 0;
metadata: 0;
dependent: 0;
stillImage: 0;
hearingImpaired: number;
visualImpaired: number;
cleanEffects: number;
attachedPic: number;
timedThumbnails: number;
captions: number;
descriptions: number;
metadata: number;
dependent: number;
stillImage: number;
};

@@ -427,21 +426,21 @@ tags: {

/** Hearing impaired flag */
hearing_impaired: 0;
hearing_impaired: number;
/** Visual impaired flag */
visual_impaired: 0;
visual_impaired: number;
/** Clean effects flag */
clean_effects: 0;
clean_effects: number;
/** Attached picture flag */
attached_pic: 0;
attached_pic: number;
/** Timed thumbnails flag */
timed_thumbnails: 0;
timed_thumbnails: number;
/** Captions flag */
captions: 0;
captions: number;
/** Descriptions flag */
descriptions: 0;
descriptions: number;
/** Metadata flag */
metadata: 0;
metadata: number;
/** Dependent flag */
dependent: 0;
dependent: number;
/** Still image flag */
still_image: 0;
still_image: number;
};

@@ -575,5 +574,5 @@ /** The metadata tags */

/** The release date of the episode */
release_date: string;
release_date: string | null;
/** The plot of the episdoe */
plot: string;
plot: string | null;
/** The rating of the episode */

@@ -649,3 +648,3 @@ rating: number;

/** The year the movie was released */
year: string;
year: string | null;
/** The date when the movie was added to the system */

@@ -684,17 +683,17 @@ added: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The actors in the movie */
actors: string;
actors: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age rating of the movie */

@@ -709,3 +708,3 @@ age: string;

/** The genre(s) of the movie */
genre: string;
genre: string | null;
/** Array of backdrop image URLs */

@@ -720,3 +719,3 @@ backdrop_path: string[];

/** The release date of the movie */
releasedate: string;
releasedate: string | null;
/** Array of available subtitles */

@@ -739,3 +738,3 @@ subtitles: string[];

/** Year released */
year: string;
year: string | null;
/** The title of the movie */

@@ -754,7 +753,7 @@ title: string;

/** The genres of the movie */
genre: string;
genre: string | null;
/** The date when the movie was added to the system */
added: string;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The primary category ID of the movie */

@@ -771,11 +770,11 @@ category_id: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** Youtube ID of the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The URL to access the movie */

@@ -800,3 +799,3 @@ url?: string;

/** The date when the season first aired */
air_date: string;
air_date: string | null;
/** The URL for the season's cover image */

@@ -808,4 +807,2 @@ cover: string;

cover_big: string;
/** The average duration of episodes in the season */
duration?: string;
/** The average rating vote for the season */

@@ -877,3 +874,3 @@ vote_average: number;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series, added by this library */

@@ -884,13 +881,13 @@ series_id?: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -905,5 +902,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -928,3 +925,3 @@ category_id: string;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series */

@@ -937,13 +934,13 @@ series_id: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -958,5 +955,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -963,0 +960,0 @@ category_id: string;

@@ -127,2 +127,3 @@ /**

#private;
baseUrl: string;
/**

@@ -367,21 +368,21 @@ * Indicates the type of serializer being used (e.g., 'none', 'standardized', 'jsonapi')

/** Hearing impaired flag */
hearing_impaired: 0;
hearing_impaired: number;
/** Visual impaired flag */
visual_impaired: 0;
visual_impaired: number;
/** Clean effects flag */
clean_effects: 0;
clean_effects: number;
/** Attached picture flag */
attached_pic: 0;
attached_pic: number;
/** Timed thumbnails flag */
timed_thumbnails: 0;
timed_thumbnails: number;
/** Captions flag */
captions: 0;
captions: number;
/** Descriptions flag */
descriptions: 0;
descriptions: number;
/** Metadata flag */
metadata: 0;
metadata: number;
/** Dependent flag */
dependent: 0;
dependent: number;
/** Still image flag */
still_image: 0;
still_image: number;
};

@@ -515,5 +516,5 @@ /** The metadata tags */

/** The release date of the episode */
release_date: string;
release_date: string | null;
/** The plot of the episdoe */
plot: string;
plot: string | null;
/** The rating of the episode */

@@ -589,3 +590,3 @@ rating: number;

/** The year the movie was released */
year: string;
year: string | null;
/** The date when the movie was added to the system */

@@ -624,17 +625,17 @@ added: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The actors in the movie */
actors: string;
actors: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age rating of the movie */

@@ -649,3 +650,3 @@ age: string;

/** The genre(s) of the movie */
genre: string;
genre: string | null;
/** Array of backdrop image URLs */

@@ -660,3 +661,3 @@ backdrop_path: string[];

/** The release date of the movie */
releasedate: string;
releasedate: string | null;
/** Array of available subtitles */

@@ -679,3 +680,3 @@ subtitles: string[];

/** Year released */
year: string;
year: string | null;
/** The title of the movie */

@@ -694,7 +695,7 @@ title: string;

/** The genres of the movie */
genre: string;
genre: string | null;
/** The date when the movie was added to the system */
added: string;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The primary category ID of the movie */

@@ -711,11 +712,11 @@ category_id: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** Youtube ID of the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The URL to access the movie */

@@ -756,3 +757,3 @@ url?: string;

/** The date when the season first aired */
air_date: string;
air_date: string | null;
/** The URL for the season's cover image */

@@ -764,4 +765,2 @@ cover: string;

cover_big: string;
/** The average duration of episodes in the season */
duration?: string;
/** The average rating vote for the season */

@@ -833,3 +832,3 @@ vote_average: number;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series, added by this library */

@@ -840,13 +839,13 @@ series_id?: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -861,5 +860,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -884,3 +883,3 @@ category_id: string;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series */

@@ -893,13 +892,13 @@ series_id: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -914,5 +913,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -919,0 +918,0 @@ category_id: string;

@@ -127,2 +127,3 @@ /**

#private;
baseUrl: string;
/**

@@ -367,21 +368,21 @@ * Indicates the type of serializer being used (e.g., 'none', 'standardized', 'jsonapi')

/** Hearing impaired flag */
hearing_impaired: 0;
hearing_impaired: number;
/** Visual impaired flag */
visual_impaired: 0;
visual_impaired: number;
/** Clean effects flag */
clean_effects: 0;
clean_effects: number;
/** Attached picture flag */
attached_pic: 0;
attached_pic: number;
/** Timed thumbnails flag */
timed_thumbnails: 0;
timed_thumbnails: number;
/** Captions flag */
captions: 0;
captions: number;
/** Descriptions flag */
descriptions: 0;
descriptions: number;
/** Metadata flag */
metadata: 0;
metadata: number;
/** Dependent flag */
dependent: 0;
dependent: number;
/** Still image flag */
still_image: 0;
still_image: number;
};

@@ -515,5 +516,5 @@ /** The metadata tags */

/** The release date of the episode */
release_date: string;
release_date: string | null;
/** The plot of the episdoe */
plot: string;
plot: string | null;
/** The rating of the episode */

@@ -589,3 +590,3 @@ rating: number;

/** The year the movie was released */
year: string;
year: string | null;
/** The date when the movie was added to the system */

@@ -624,17 +625,17 @@ added: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The actors in the movie */
actors: string;
actors: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age rating of the movie */

@@ -649,3 +650,3 @@ age: string;

/** The genre(s) of the movie */
genre: string;
genre: string | null;
/** Array of backdrop image URLs */

@@ -660,3 +661,3 @@ backdrop_path: string[];

/** The release date of the movie */
releasedate: string;
releasedate: string | null;
/** Array of available subtitles */

@@ -679,3 +680,3 @@ subtitles: string[];

/** Year released */
year: string;
year: string | null;
/** The title of the movie */

@@ -694,7 +695,7 @@ title: string;

/** The genres of the movie */
genre: string;
genre: string | null;
/** The date when the movie was added to the system */
added: string;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The primary category ID of the movie */

@@ -711,11 +712,11 @@ category_id: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** Youtube ID of the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The URL to access the movie */

@@ -756,3 +757,3 @@ url?: string;

/** The date when the season first aired */
air_date: string;
air_date: string | null;
/** The URL for the season's cover image */

@@ -764,4 +765,2 @@ cover: string;

cover_big: string;
/** The average duration of episodes in the season */
duration?: string;
/** The average rating vote for the season */

@@ -833,3 +832,3 @@ vote_average: number;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series, added by this library */

@@ -840,13 +839,13 @@ series_id?: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -861,5 +860,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -884,3 +883,3 @@ category_id: string;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series */

@@ -893,13 +892,13 @@ series_id: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -914,5 +913,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -919,0 +918,0 @@ category_id: string;

@@ -0,1 +1,3 @@

import { CamelCaseKeys } from 'camelcase-keys';
/**

@@ -97,12 +99,6 @@ * JSON API serializers for the Xtream API

number: number;
/** Custom stream identifier */
customSid: string;
/** Flag indicating if TV archive is available */
tvArchive: boolean;
/** The direct URL to the channel's source */
directSource: string;
/** The duration of available archive in days */
tvArchiveDuration: number;
/** The URL for the channel's cover image */
thumbnail: string;
/** The URL for the channel's logo */

@@ -146,5 +142,5 @@ logo: string;

/** The synopsis/description of the episode */
plot: string;
plot: string | null;
/** The release date of the episode */
releaseDate: Date;
releaseDate: Date | null;
/** The duration of the episode in seconds */

@@ -162,4 +158,14 @@ duration: number;

createdAt: Date;
/** The vote average of ratings */
voteAverage: number;
/** URL to access the stream */
url?: string;
/** Video stream information */
video?: Partial<CamelCaseKeys<XtreamVideoInfo, true>>;
/** Audio stream information */
audio?: Partial<CamelCaseKeys<XtreamAudioInfo, true>>;
/** Bitrate of the stream */
bitrate?: number;
/** Array of available subtitles */
subtitles: string[];
};

@@ -253,5 +259,5 @@ /** The episode relationships */

/** The release date of the movie */
releaseDate: Date;
releaseDate: Date | null;
/** The YouTube ID or URL for the trailer */
youtubeId: string;
youtubeId: string | null;
/** The director(s) of the movie */

@@ -264,5 +270,5 @@ director: string[];

/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age abd MPAA rating of the movie */

@@ -281,4 +287,8 @@ rating: {

durationFormatted: string;
/** The bitrate of the movie */
bitrate: number;
/** Video stream information */
video?: Partial<CamelCaseKeys<XtreamVideoInfo, true>>;
/** Audio stream information */
audio?: Partial<CamelCaseKeys<XtreamAudioInfo, true>>;
/** Bitrate of the stream */
bitrate?: number;
/** Array of available subtitles */

@@ -290,8 +300,2 @@ subtitles: string[];

createdAt: Date;
/** The file format extension */
containerExtension: string;
/** Custom stream identifier */
customSid: string;
/** The direct URL to the movie's source */
directSource: string;
/** URL to access the stream */

@@ -329,3 +333,3 @@ url?: string;

/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** The movie's rating */

@@ -336,13 +340,13 @@ voteAverage: number;

/** The release date of the movie */
releaseDate: Date;
releaseDate: Date | null;
/** The runtime of the movie in seconds */
duration: number;
/** The cast of the movie as an array */
cast: string[];
cast: string[] | [];
/** The director(s) of the movie as an array */
director: string[];
director: string[] | [];
/** The youtube id of the trailer */
youtubeId: string;
youtubeId: string | null;
/** The genres of the movie as an array */
genre: string[];
genre: string[] | [];
/** The date when the movie was added to the system */

@@ -415,3 +419,3 @@ createdAt: Date;

/** The date when the season first aired */
releaseDate: Date;
releaseDate: Date | null;
};

@@ -429,2 +433,11 @@ /** The season relationships */

};
/** The episodes relationship */
episodes: {
data: {
/** The episode type */
type: 'episode';
/** The episode ID */
id: string;
}[];
};
};

@@ -516,3 +529,3 @@ };

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The show's rating */

@@ -525,3 +538,3 @@ voteAverage: number;

/** The release date of the show */
releaseDate: Date;
releaseDate: Date | null;
/** The average runtime of episodes in seconds */

@@ -536,3 +549,3 @@ duration: number;

/** Youtube ID of trailer */
youtubeId: string;
youtubeId: string | null;
/** The date when the show was last updated */

@@ -634,21 +647,21 @@ updatedAt: Date;

/** Hearing impaired flag */
hearing_impaired: 0;
hearing_impaired: number;
/** Visual impaired flag */
visual_impaired: 0;
visual_impaired: number;
/** Clean effects flag */
clean_effects: 0;
clean_effects: number;
/** Attached picture flag */
attached_pic: 0;
attached_pic: number;
/** Timed thumbnails flag */
timed_thumbnails: 0;
timed_thumbnails: number;
/** Captions flag */
captions: 0;
captions: number;
/** Descriptions flag */
descriptions: 0;
descriptions: number;
/** Metadata flag */
metadata: 0;
metadata: number;
/** Dependent flag */
dependent: 0;
dependent: number;
/** Still image flag */
still_image: 0;
still_image: number;
};

@@ -782,5 +795,5 @@ /** The metadata tags */

/** The release date of the episode */
release_date: string;
release_date: string | null;
/** The plot of the episdoe */
plot: string;
plot: string | null;
/** The rating of the episode */

@@ -856,3 +869,3 @@ rating: number;

/** The year the movie was released */
year: string;
year: string | null;
/** The date when the movie was added to the system */

@@ -891,17 +904,17 @@ added: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The actors in the movie */
actors: string;
actors: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age rating of the movie */

@@ -916,3 +929,3 @@ age: string;

/** The genre(s) of the movie */
genre: string;
genre: string | null;
/** Array of backdrop image URLs */

@@ -927,3 +940,3 @@ backdrop_path: string[];

/** The release date of the movie */
releasedate: string;
releasedate: string | null;
/** Array of available subtitles */

@@ -946,3 +959,3 @@ subtitles: string[];

/** Year released */
year: string;
year: string | null;
/** The title of the movie */

@@ -961,7 +974,7 @@ title: string;

/** The genres of the movie */
genre: string;
genre: string | null;
/** The date when the movie was added to the system */
added: string;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The primary category ID of the movie */

@@ -978,11 +991,11 @@ category_id: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** Youtube ID of the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The URL to access the movie */

@@ -1007,3 +1020,3 @@ url?: string;

/** The date when the season first aired */
air_date: string;
air_date: string | null;
/** The URL for the season's cover image */

@@ -1015,4 +1028,2 @@ cover: string;

cover_big: string;
/** The average duration of episodes in the season */
duration?: string;
/** The average rating vote for the season */

@@ -1084,3 +1095,3 @@ vote_average: number;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series, added by this library */

@@ -1091,13 +1102,13 @@ series_id?: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -1112,5 +1123,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -1135,3 +1146,3 @@ category_id: string;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series */

@@ -1144,13 +1155,13 @@ series_id: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -1165,5 +1176,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -1170,0 +1181,0 @@ category_id: string;

@@ -0,1 +1,3 @@

import { CamelCaseKeys } from 'camelcase-keys';
/**

@@ -97,12 +99,6 @@ * JSON API serializers for the Xtream API

number: number;
/** Custom stream identifier */
customSid: string;
/** Flag indicating if TV archive is available */
tvArchive: boolean;
/** The direct URL to the channel's source */
directSource: string;
/** The duration of available archive in days */
tvArchiveDuration: number;
/** The URL for the channel's cover image */
thumbnail: string;
/** The URL for the channel's logo */

@@ -146,5 +142,5 @@ logo: string;

/** The synopsis/description of the episode */
plot: string;
plot: string | null;
/** The release date of the episode */
releaseDate: Date;
releaseDate: Date | null;
/** The duration of the episode in seconds */

@@ -162,4 +158,14 @@ duration: number;

createdAt: Date;
/** The vote average of ratings */
voteAverage: number;
/** URL to access the stream */
url?: string;
/** Video stream information */
video?: Partial<CamelCaseKeys<XtreamVideoInfo, true>>;
/** Audio stream information */
audio?: Partial<CamelCaseKeys<XtreamAudioInfo, true>>;
/** Bitrate of the stream */
bitrate?: number;
/** Array of available subtitles */
subtitles: string[];
};

@@ -253,5 +259,5 @@ /** The episode relationships */

/** The release date of the movie */
releaseDate: Date;
releaseDate: Date | null;
/** The YouTube ID or URL for the trailer */
youtubeId: string;
youtubeId: string | null;
/** The director(s) of the movie */

@@ -264,5 +270,5 @@ director: string[];

/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age abd MPAA rating of the movie */

@@ -281,4 +287,8 @@ rating: {

durationFormatted: string;
/** The bitrate of the movie */
bitrate: number;
/** Video stream information */
video?: Partial<CamelCaseKeys<XtreamVideoInfo, true>>;
/** Audio stream information */
audio?: Partial<CamelCaseKeys<XtreamAudioInfo, true>>;
/** Bitrate of the stream */
bitrate?: number;
/** Array of available subtitles */

@@ -290,8 +300,2 @@ subtitles: string[];

createdAt: Date;
/** The file format extension */
containerExtension: string;
/** Custom stream identifier */
customSid: string;
/** The direct URL to the movie's source */
directSource: string;
/** URL to access the stream */

@@ -329,3 +333,3 @@ url?: string;

/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** The movie's rating */

@@ -336,13 +340,13 @@ voteAverage: number;

/** The release date of the movie */
releaseDate: Date;
releaseDate: Date | null;
/** The runtime of the movie in seconds */
duration: number;
/** The cast of the movie as an array */
cast: string[];
cast: string[] | [];
/** The director(s) of the movie as an array */
director: string[];
director: string[] | [];
/** The youtube id of the trailer */
youtubeId: string;
youtubeId: string | null;
/** The genres of the movie as an array */
genre: string[];
genre: string[] | [];
/** The date when the movie was added to the system */

@@ -415,3 +419,3 @@ createdAt: Date;

/** The date when the season first aired */
releaseDate: Date;
releaseDate: Date | null;
};

@@ -429,2 +433,11 @@ /** The season relationships */

};
/** The episodes relationship */
episodes: {
data: {
/** The episode type */
type: 'episode';
/** The episode ID */
id: string;
}[];
};
};

@@ -516,3 +529,3 @@ };

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The show's rating */

@@ -525,3 +538,3 @@ voteAverage: number;

/** The release date of the show */
releaseDate: Date;
releaseDate: Date | null;
/** The average runtime of episodes in seconds */

@@ -536,3 +549,3 @@ duration: number;

/** Youtube ID of trailer */
youtubeId: string;
youtubeId: string | null;
/** The date when the show was last updated */

@@ -634,21 +647,21 @@ updatedAt: Date;

/** Hearing impaired flag */
hearing_impaired: 0;
hearing_impaired: number;
/** Visual impaired flag */
visual_impaired: 0;
visual_impaired: number;
/** Clean effects flag */
clean_effects: 0;
clean_effects: number;
/** Attached picture flag */
attached_pic: 0;
attached_pic: number;
/** Timed thumbnails flag */
timed_thumbnails: 0;
timed_thumbnails: number;
/** Captions flag */
captions: 0;
captions: number;
/** Descriptions flag */
descriptions: 0;
descriptions: number;
/** Metadata flag */
metadata: 0;
metadata: number;
/** Dependent flag */
dependent: 0;
dependent: number;
/** Still image flag */
still_image: 0;
still_image: number;
};

@@ -782,5 +795,5 @@ /** The metadata tags */

/** The release date of the episode */
release_date: string;
release_date: string | null;
/** The plot of the episdoe */
plot: string;
plot: string | null;
/** The rating of the episode */

@@ -856,3 +869,3 @@ rating: number;

/** The year the movie was released */
year: string;
year: string | null;
/** The date when the movie was added to the system */

@@ -891,17 +904,17 @@ added: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The actors in the movie */
actors: string;
actors: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age rating of the movie */

@@ -916,3 +929,3 @@ age: string;

/** The genre(s) of the movie */
genre: string;
genre: string | null;
/** Array of backdrop image URLs */

@@ -927,3 +940,3 @@ backdrop_path: string[];

/** The release date of the movie */
releasedate: string;
releasedate: string | null;
/** Array of available subtitles */

@@ -946,3 +959,3 @@ subtitles: string[];

/** Year released */
year: string;
year: string | null;
/** The title of the movie */

@@ -961,7 +974,7 @@ title: string;

/** The genres of the movie */
genre: string;
genre: string | null;
/** The date when the movie was added to the system */
added: string;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The primary category ID of the movie */

@@ -978,11 +991,11 @@ category_id: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** Youtube ID of the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The URL to access the movie */

@@ -1007,3 +1020,3 @@ url?: string;

/** The date when the season first aired */
air_date: string;
air_date: string | null;
/** The URL for the season's cover image */

@@ -1015,4 +1028,2 @@ cover: string;

cover_big: string;
/** The average duration of episodes in the season */
duration?: string;
/** The average rating vote for the season */

@@ -1084,3 +1095,3 @@ vote_average: number;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series, added by this library */

@@ -1091,13 +1102,13 @@ series_id?: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -1112,5 +1123,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -1135,3 +1146,3 @@ category_id: string;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series */

@@ -1144,13 +1155,13 @@ series_id: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -1165,5 +1176,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -1170,0 +1181,0 @@ category_id: string;

@@ -0,1 +1,3 @@

import { CamelCaseKeys } from 'camelcase-keys';
declare type Prettify<T> = {

@@ -22,3 +24,3 @@ [K in keyof T]: T[K];

movie: (input: XtreamMovie) => StandardXtreamMovie;
shows: (input: XtreamShowListing[]) => Prettify<Omit<StandardXtreamShow, "seasons">>[];
shows: (input: XtreamShowListing[]) => Omit<StandardXtreamShow, "seasons">[];
show: (input: XtreamShow) => StandardXtreamShow;

@@ -58,12 +60,6 @@ shortEPG: (input: XtreamShortEPG) => StandardXtreamShortEPGListing[];

number: number;
/** Custom stream identifier */
customSid: string;
/** Flag indicating if TV archive is available */
tvArchive: boolean;
/** The direct URL to the channel's source */
directSource: string;
/** The duration of available archive in days */
tvArchiveDuration: number;
/** The URL for the channel's cover image */
thumbnail: string;
/** The URL for the channel's logo */

@@ -92,5 +88,5 @@ logo: string;

/** The synopsis/description of the episode */
plot: string;
plot: string | null;
/** The release date of the episode */
releaseDate: Date;
releaseDate: Date | null;
/** The duration of the episode in seconds */

@@ -112,4 +108,14 @@ duration: number;

showId: string;
/** Vote average from rating votes */
voteAverage: number;
/** URL to access the stream */
url?: string;
/** Array of available subtitles */
subtitles: string[];
/** Video stream information */
video?: Partial<CamelCaseKeys<XtreamVideoInfo, true>>;
/** Audio stream information */
audio?: Partial<CamelCaseKeys<XtreamAudioInfo, true>>;
/** Bitrate of the stream */
bitrate?: number;
};

@@ -164,5 +170,5 @@

/** The release date of the movie */
releaseDate: Date;
releaseDate: Date | null;
/** The YouTube ID or URL for the trailer */
youtubeId: string;
youtubeId: string | null;
/** The director(s) of the movie */

@@ -175,5 +181,5 @@ director: string[];

/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age abd MPAA rating of the movie */

@@ -192,4 +198,2 @@ rating: {

durationFormatted: string;
/** The bitrate of the movie */
bitrate: number;
/** Array of available subtitles */

@@ -203,10 +207,10 @@ subtitles: string[];

categoryIds: string[];
/** The file format extension */
containerExtension: string;
/** Custom stream identifier */
customSid: string;
/** The direct URL to the movie's source */
directSource: string;
/** URL to access the stream */
url?: string;
/** Video stream information */
video?: Partial<CamelCaseKeys<XtreamVideoInfo, true>>;
/** Audio stream information */
audio?: Partial<CamelCaseKeys<XtreamAudioInfo, true>>;
/** Bitrate of the stream */
bitrate?: number;
};

@@ -225,3 +229,3 @@

/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** The movie's rating */

@@ -232,5 +236,7 @@ voteAverage: number;

/** The release date of the movie */
releaseDate: Date;
releaseDate: Date | null;
/** The runtime of the movie in seconds */
duration: number;
/** Youtube ID of trailer */
youtubeId: string | null;
/** The cast of the movie as an array */

@@ -284,8 +290,16 @@ cast: string[];

id: string;
/** The name of the season */
name: string;
/** The number of episodes in the season */
episodeCount: number;
/** The overview/synopsis of the season */
overview: string;
/** The season number */
number: number;
/** The vote average of the season */
voteAverage: number;
/** The URL for the season's cover image */
cover: string;
/** The date when the season first aired */
releaseDate: Date;
releaseDate: Date | null;
/** The ID of the show this season belongs to */

@@ -356,3 +370,3 @@ showId: string;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The show's rating */

@@ -365,7 +379,7 @@ voteAverage: number;

/** The release date of the show */
releaseDate: Date;
releaseDate: Date | null;
/** The average runtime of episodes in seconds */
duration: number;
/** Youtube ID of trailer */
youtubeId: string;
youtubeId: string | null;
/** The cast members of the show as an array */

@@ -442,21 +456,21 @@ cast: string[];

/** Hearing impaired flag */
hearing_impaired: 0;
hearing_impaired: number;
/** Visual impaired flag */
visual_impaired: 0;
visual_impaired: number;
/** Clean effects flag */
clean_effects: 0;
clean_effects: number;
/** Attached picture flag */
attached_pic: 0;
attached_pic: number;
/** Timed thumbnails flag */
timed_thumbnails: 0;
timed_thumbnails: number;
/** Captions flag */
captions: 0;
captions: number;
/** Descriptions flag */
descriptions: 0;
descriptions: number;
/** Metadata flag */
metadata: 0;
metadata: number;
/** Dependent flag */
dependent: 0;
dependent: number;
/** Still image flag */
still_image: 0;
still_image: number;
};

@@ -590,5 +604,5 @@ /** The metadata tags */

/** The release date of the episode */
release_date: string;
release_date: string | null;
/** The plot of the episdoe */
plot: string;
plot: string | null;
/** The rating of the episode */

@@ -664,3 +678,3 @@ rating: number;

/** The year the movie was released */
year: string;
year: string | null;
/** The date when the movie was added to the system */

@@ -699,17 +713,17 @@ added: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The actors in the movie */
actors: string;
actors: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age rating of the movie */

@@ -724,3 +738,3 @@ age: string;

/** The genre(s) of the movie */
genre: string;
genre: string | null;
/** Array of backdrop image URLs */

@@ -735,3 +749,3 @@ backdrop_path: string[];

/** The release date of the movie */
releasedate: string;
releasedate: string | null;
/** Array of available subtitles */

@@ -754,3 +768,3 @@ subtitles: string[];

/** Year released */
year: string;
year: string | null;
/** The title of the movie */

@@ -769,7 +783,7 @@ title: string;

/** The genres of the movie */
genre: string;
genre: string | null;
/** The date when the movie was added to the system */
added: string;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The primary category ID of the movie */

@@ -786,11 +800,11 @@ category_id: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** Youtube ID of the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The URL to access the movie */

@@ -815,3 +829,3 @@ url?: string;

/** The date when the season first aired */
air_date: string;
air_date: string | null;
/** The URL for the season's cover image */

@@ -823,4 +837,2 @@ cover: string;

cover_big: string;
/** The average duration of episodes in the season */
duration?: string;
/** The average rating vote for the season */

@@ -892,3 +904,3 @@ vote_average: number;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series, added by this library */

@@ -899,13 +911,13 @@ series_id?: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -920,5 +932,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -943,3 +955,3 @@ category_id: string;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series */

@@ -952,13 +964,13 @@ series_id: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -973,5 +985,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -978,0 +990,0 @@ category_id: string;

@@ -0,1 +1,3 @@

import { CamelCaseKeys } from 'camelcase-keys';
declare type Prettify<T> = {

@@ -22,3 +24,3 @@ [K in keyof T]: T[K];

movie: (input: XtreamMovie) => StandardXtreamMovie;
shows: (input: XtreamShowListing[]) => Prettify<Omit<StandardXtreamShow, "seasons">>[];
shows: (input: XtreamShowListing[]) => Omit<StandardXtreamShow, "seasons">[];
show: (input: XtreamShow) => StandardXtreamShow;

@@ -58,12 +60,6 @@ shortEPG: (input: XtreamShortEPG) => StandardXtreamShortEPGListing[];

number: number;
/** Custom stream identifier */
customSid: string;
/** Flag indicating if TV archive is available */
tvArchive: boolean;
/** The direct URL to the channel's source */
directSource: string;
/** The duration of available archive in days */
tvArchiveDuration: number;
/** The URL for the channel's cover image */
thumbnail: string;
/** The URL for the channel's logo */

@@ -92,5 +88,5 @@ logo: string;

/** The synopsis/description of the episode */
plot: string;
plot: string | null;
/** The release date of the episode */
releaseDate: Date;
releaseDate: Date | null;
/** The duration of the episode in seconds */

@@ -112,4 +108,14 @@ duration: number;

showId: string;
/** Vote average from rating votes */
voteAverage: number;
/** URL to access the stream */
url?: string;
/** Array of available subtitles */
subtitles: string[];
/** Video stream information */
video?: Partial<CamelCaseKeys<XtreamVideoInfo, true>>;
/** Audio stream information */
audio?: Partial<CamelCaseKeys<XtreamAudioInfo, true>>;
/** Bitrate of the stream */
bitrate?: number;
};

@@ -164,5 +170,5 @@

/** The release date of the movie */
releaseDate: Date;
releaseDate: Date | null;
/** The YouTube ID or URL for the trailer */
youtubeId: string;
youtubeId: string | null;
/** The director(s) of the movie */

@@ -175,5 +181,5 @@ director: string[];

/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age abd MPAA rating of the movie */

@@ -192,4 +198,2 @@ rating: {

durationFormatted: string;
/** The bitrate of the movie */
bitrate: number;
/** Array of available subtitles */

@@ -203,10 +207,10 @@ subtitles: string[];

categoryIds: string[];
/** The file format extension */
containerExtension: string;
/** Custom stream identifier */
customSid: string;
/** The direct URL to the movie's source */
directSource: string;
/** URL to access the stream */
url?: string;
/** Video stream information */
video?: Partial<CamelCaseKeys<XtreamVideoInfo, true>>;
/** Audio stream information */
audio?: Partial<CamelCaseKeys<XtreamAudioInfo, true>>;
/** Bitrate of the stream */
bitrate?: number;
};

@@ -225,3 +229,3 @@

/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** The movie's rating */

@@ -232,5 +236,7 @@ voteAverage: number;

/** The release date of the movie */
releaseDate: Date;
releaseDate: Date | null;
/** The runtime of the movie in seconds */
duration: number;
/** Youtube ID of trailer */
youtubeId: string | null;
/** The cast of the movie as an array */

@@ -284,8 +290,16 @@ cast: string[];

id: string;
/** The name of the season */
name: string;
/** The number of episodes in the season */
episodeCount: number;
/** The overview/synopsis of the season */
overview: string;
/** The season number */
number: number;
/** The vote average of the season */
voteAverage: number;
/** The URL for the season's cover image */
cover: string;
/** The date when the season first aired */
releaseDate: Date;
releaseDate: Date | null;
/** The ID of the show this season belongs to */

@@ -356,3 +370,3 @@ showId: string;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The show's rating */

@@ -365,7 +379,7 @@ voteAverage: number;

/** The release date of the show */
releaseDate: Date;
releaseDate: Date | null;
/** The average runtime of episodes in seconds */
duration: number;
/** Youtube ID of trailer */
youtubeId: string;
youtubeId: string | null;
/** The cast members of the show as an array */

@@ -442,21 +456,21 @@ cast: string[];

/** Hearing impaired flag */
hearing_impaired: 0;
hearing_impaired: number;
/** Visual impaired flag */
visual_impaired: 0;
visual_impaired: number;
/** Clean effects flag */
clean_effects: 0;
clean_effects: number;
/** Attached picture flag */
attached_pic: 0;
attached_pic: number;
/** Timed thumbnails flag */
timed_thumbnails: 0;
timed_thumbnails: number;
/** Captions flag */
captions: 0;
captions: number;
/** Descriptions flag */
descriptions: 0;
descriptions: number;
/** Metadata flag */
metadata: 0;
metadata: number;
/** Dependent flag */
dependent: 0;
dependent: number;
/** Still image flag */
still_image: 0;
still_image: number;
};

@@ -590,5 +604,5 @@ /** The metadata tags */

/** The release date of the episode */
release_date: string;
release_date: string | null;
/** The plot of the episdoe */
plot: string;
plot: string | null;
/** The rating of the episode */

@@ -664,3 +678,3 @@ rating: number;

/** The year the movie was released */
year: string;
year: string | null;
/** The date when the movie was added to the system */

@@ -699,17 +713,17 @@ added: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The actors in the movie */
actors: string;
actors: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The synopsis/description of the movie */
description: string;
description: string | null;
/** The plot of the movie */
plot: string;
plot: string | null;
/** The age rating of the movie */

@@ -724,3 +738,3 @@ age: string;

/** The genre(s) of the movie */
genre: string;
genre: string | null;
/** Array of backdrop image URLs */

@@ -735,3 +749,3 @@ backdrop_path: string[];

/** The release date of the movie */
releasedate: string;
releasedate: string | null;
/** Array of available subtitles */

@@ -754,3 +768,3 @@ subtitles: string[];

/** Year released */
year: string;
year: string | null;
/** The title of the movie */

@@ -769,7 +783,7 @@ title: string;

/** The genres of the movie */
genre: string;
genre: string | null;
/** The date when the movie was added to the system */
added: string;
/** The runtime of the movie in minutes */
episode_run_time: number;
episode_run_time: number | null;
/** The primary category ID of the movie */

@@ -786,11 +800,11 @@ category_id: string;

/** The release date of the movie */
release_date: string;
release_date: string | null;
/** The cast of the movie */
cast: string;
cast: string | null;
/** The director(s) of the movie */
director: string;
director: string | null;
/** The synopsis/description of the movie */
plot: string;
plot: string | null;
/** Youtube ID of the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The URL to access the movie */

@@ -815,3 +829,3 @@ url?: string;

/** The date when the season first aired */
air_date: string;
air_date: string | null;
/** The URL for the season's cover image */

@@ -823,4 +837,2 @@ cover: string;

cover_big: string;
/** The average duration of episodes in the season */
duration?: string;
/** The average rating vote for the season */

@@ -892,3 +904,3 @@ vote_average: number;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series, added by this library */

@@ -899,13 +911,13 @@ series_id?: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -920,5 +932,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -943,3 +955,3 @@ category_id: string;

/** The year of release */
year: string;
year: string | null;
/** The unique identifier for the series */

@@ -952,13 +964,13 @@ series_id: number;

/** The synopsis/description of the show */
plot: string;
plot: string | null;
/** The cast members of the show */
cast: string;
cast: string | null;
/** The director(s) of the show */
director: string;
director: string | null;
/** The genre(s) of the show */
genre: string;
genre: string | null;
/** The release date of the show (alternate format) */
releaseDate: string;
releaseDate: string | null;
/** The release date of the show */
release_date: string;
release_date: string | null;
/** The date when the show was last updated */

@@ -973,5 +985,5 @@ last_modified: string;

/** The YouTube ID or URL for the trailer */
youtube_trailer: string;
youtube_trailer: string | null;
/** The average runtime of episodes as a string */
episode_run_time: string;
episode_run_time: string | null;
/** The primary category ID of the show */

@@ -978,0 +990,0 @@ category_id: string;

{
"name": "@iptv/xtream-api",
"version": "1.2.4",
"version": "1.3.0",
"description": "Standardized access to Xtream compatible player API",

@@ -83,2 +83,3 @@ "keywords": [

"release-plan": "^0.13.1",
"replace-in-file": "^8.3.0",
"typedoc": "^0.27.9",

@@ -98,3 +99,3 @@ "typescript": "^5.7.3",

"scripts": {
"build": "vite build",
"build": "vite build && node ./post-build.mjs",
"coverage": "vitest run --coverage",

@@ -101,0 +102,0 @@ "dev": "vite",