Files
pgsql-jellyfin/Jellyfin.Server/wwwroot/livetv-recordings.2eed0b9a281380a8d82a.chunk.js
2026-07-08 13:13:46 -04:00

1 line
10 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[99072],{78397:function(e,n,t){t.d(n,{M:function(){return l},t:function(){return i}});var r=t(94732),a=t(80401),o=t(69410),i="NamedConfiguration",l=function(e){var n=(0,o.gf)().api;return(0,a.I)({queryKey:[i,e],queryFn:function(t){var a=t.signal;return function(e,n,t){return a=void 0,o=void 0,l=function(){return function(e,n){var t,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(s){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=n.call(e,o)}catch(e){l=[6,e],r=0}finally{t=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}(this,(function(a){switch(a.label){case 0:return[4,(0,r.T)(e).getNamedConfiguration({key:n},t)];case 1:return[2,a.sent().data]}}))},new((i=void 0)||(i=Promise))((function(e,n){function t(e){try{s(l.next(e))}catch(e){n(e)}}function r(e){try{s(l.throw(e))}catch(e){n(e)}}function s(n){var a;n.done?e(n.value):(a=n.value,a instanceof i?a:new i((function(e){e(a)}))).then(t,r)}s((l=l.apply(a,o||[])).next())}));var a,o,i,l}(n,e,{signal:a})},enabled:!!n})}},92163:function(e,n,t){t.r(n),t.d(n,{Component:function(){return T},action:function(){return M}});var r=t(62540),a=t(63696),o=t(92779),i=t(85637),l=t(70140),s=t(57836),c=t(89348),u=t(65242),d=t(78397),h=t(5898),f=t(87404),v=t(9055),g=t(84849),p=t(47891),A=t(6725),b=t(75487),y=t(43361),x=t(21840),P=t(31720),j=t(96441),m=t(70564),S=t(26523),k=t(63703),w=t(67430),R=t(94732),C=t(31297),L=function(){return L=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e},L.apply(this,arguments)},O=function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,a,o=t.call(e),i=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(a)throw a.error}}return i},N="livetv",M=function(e){return n=void 0,t=[e],a=function(e){var n,t,r=e.request;return function(e,n){var t,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(s){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=n.call(e,o)}catch(e){l=[6,e],r=0}finally{t=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}(this,(function(e){switch(e.label){case 0:if(!(n=w.tF.getCurrentApi()))throw new Error("No Api instance available");return[4,r.json()];case 1:return t=e.sent(),[4,(0,R.T)(n).updateNamedConfiguration({key:N,body:t})];case 2:return e.sent(),C.q.invalidateQueries({queryKey:[d.t,N]}),[2,{isSaved:!0}]}}))},new((r=void 0)||(r=Promise))((function(e,o){function i(e){try{s(a.next(e))}catch(e){o(e)}}function l(e){try{s(a.throw(e))}catch(e){o(e)}}function s(n){var t;n.done?e(n.value):(t=n.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}s((a=a.apply(n,t||[])).next())}));var n,t,r,a},T=function(){var e=(0,f.cq)(),n=(0,f.mP)(),t=(0,d.M)(N),w=t.data,R=t.isPending,C=t.isError,M=O((0,a.useState)(null),2),T=M[0],I=M[1],H=O((0,a.useState)(""),2),D=H[0],E=H[1],q=O((0,a.useState)(""),2),F=q[0],G=q[1],W="submitting"===e.state,V=(0,v.of)();(0,a.useEffect)((function(){w&&null==T&&(I(w),w.PrePaddingSeconds&&E((w.PrePaddingSeconds/60).toString()),w.PostPaddingSeconds&&G((w.PostPaddingSeconds/60).toString()))}),[w,T]);var K=(0,a.useCallback)((function(e){E(e.target.value),I(L(L({},T),{PrePaddingSeconds:60*parseInt(e.target.value,10)}))}),[T]),z=(0,a.useCallback)((function(e){G(e.target.value),I(L(L({},T),{PostPaddingSeconds:60*parseInt(e.target.value,10)}))}),[T]),B=(0,a.useCallback)((function(e){var n;I(L(L({},T),((n={})[e.target.name]=e.target.value,n)))}),[T]),J=(0,a.useCallback)((function(e){var n;I(L(L({},T),((n={})[e.target.name]=e.target.checked,n)))}),[T]),Q=(0,a.useCallback)((function(){var e=new x.default;e.show({callback:function(n){n&&I(L(L({},T),{RecordingPath:n})),e.close()},validateWriteable:!0})}),[T]),U=(0,a.useCallback)((function(){var e=new x.default;e.show({callback:function(n){n&&I(L(L({},T),{MovieRecordingPath:n})),e.close()},validateWriteable:!0})}),[T]),X=(0,a.useCallback)((function(){var e=new x.default;e.show({callback:function(n){n&&I(L(L({},T),{SeriesRecordingPath:n})),e.close()},validateWriteable:!0})}),[T]),Y=(0,a.useCallback)((function(){var e=new x.default;e.show({callback:function(n){n&&I(L(L({},T),{RecordingPostProcessor:n})),e.close()},validateWriteable:!0})}),[T]),Z=(0,a.useCallback)((function(e){e.preventDefault(),T&&V(JSON.stringify(T),{method:"post",encType:"application/json"})}),[T,V]);return R||!T?(0,r.jsx)(g.A,{}):(0,r.jsx)(u.A,{id:"liveTvSettingsPage",title:h.Ay.translate("HeaderDVR"),className:"mainAnimatedPage type-interior",children:(0,r.jsx)(o.A,{className:"content-primary",children:C?(0,r.jsx)(p.A,{severity:"error",children:h.Ay.translate("LiveTVPageLoadError")}):(0,r.jsx)(v.lV,{method:"POST",onSubmit:Z,children:(0,r.jsxs)(l.A,{spacing:3,children:[(0,r.jsx)(c.A,{variant:"h1",children:h.Ay.translate("HeaderDVR")}),!W&&(null==n?void 0:n.isSaved)&&(0,r.jsx)(p.A,{severity:"success",children:h.Ay.translate("SettingsSaved")}),(0,r.jsxs)(s.A,{select:!0,name:"GuideDays",label:h.Ay.translate("LabelNumberOfGuideDays"),helperText:h.Ay.translate("LabelNumberOfGuideDaysHelp"),value:T.GuideDays||"",onChange:B,slotProps:{select:{displayEmpty:!0},inputLabel:{shrink:!0}},children:[(0,r.jsx)(i.A,{value:"",children:h.Ay.translate("Auto")}),(0,r.jsx)(i.A,{value:"1",children:"1"}),(0,r.jsx)(i.A,{value:"2",children:"2"}),(0,r.jsx)(i.A,{value:"3",children:"3"}),(0,r.jsx)(i.A,{value:"4",children:"4"}),(0,r.jsx)(i.A,{value:"5",children:"5"}),(0,r.jsx)(i.A,{value:"6",children:"6"}),(0,r.jsx)(i.A,{value:"7",children:"7"}),(0,r.jsx)(i.A,{value:"8",children:"8"}),(0,r.jsx)(i.A,{value:"9",children:"9"}),(0,r.jsx)(i.A,{value:"10",children:"10"}),(0,r.jsx)(i.A,{value:"11",children:"11"}),(0,r.jsx)(i.A,{value:"12",children:"12"}),(0,r.jsx)(i.A,{value:"13",children:"13"}),(0,r.jsx)(i.A,{value:"14",children:"14"})]}),(0,r.jsx)(s.A,{name:"RecordingPath",label:h.Ay.translate("LabelRecordingPath"),helperText:h.Ay.translate("LabelRecordingPathHelp"),value:T.RecordingPath,onChange:B,slotProps:{input:{endAdornment:(0,r.jsx)(A.A,{position:"end",children:(0,r.jsx)(b.A,{edge:"end",onClick:Q,children:(0,r.jsx)(y.A,{})})})},inputLabel:{shrink:!!T.RecordingPath}}}),(0,r.jsx)(s.A,{name:"MovieRecordingPath",label:h.Ay.translate("LabelMovieRecordingPath"),value:T.MovieRecordingPath,onChange:B,slotProps:{input:{endAdornment:(0,r.jsx)(A.A,{position:"end",children:(0,r.jsx)(b.A,{edge:"end",onClick:U,children:(0,r.jsx)(y.A,{})})})},inputLabel:{shrink:!!T.MovieRecordingPath}}}),(0,r.jsx)(s.A,{name:"SeriesRecordingPath",label:h.Ay.translate("LabelSeriesRecordingPath"),value:T.SeriesRecordingPath,onChange:B,slotProps:{input:{endAdornment:(0,r.jsx)(A.A,{position:"end",children:(0,r.jsx)(b.A,{edge:"end",onClick:X,children:(0,r.jsx)(y.A,{})})})},inputLabel:{shrink:!!T.SeriesRecordingPath}}}),(0,r.jsx)(c.A,{variant:"h2",children:h.Ay.translate("HeaderDefaultRecordingSettings")}),(0,r.jsx)(s.A,{name:"PrePaddingMinutes",label:h.Ay.translate("LabelStartWhenPossible"),value:D,onChange:K,slotProps:{input:{endAdornment:(0,r.jsx)(A.A,{position:"end",children:(0,r.jsx)(c.A,{variant:"body1",color:"text.secondary",children:h.Ay.translate("MinutesBefore")})})}}}),(0,r.jsx)(s.A,{name:"PostPaddingMinutes",label:h.Ay.translate("LabelStopWhenPossible"),value:F,onChange:z,slotProps:{input:{endAdornment:(0,r.jsx)(A.A,{position:"end",children:(0,r.jsx)(c.A,{variant:"body1",color:"text.secondary",children:h.Ay.translate("MinutesAfter")})})}}}),(0,r.jsx)(c.A,{variant:"h2",children:h.Ay.translate("HeaderRecordingPostProcessing")}),(0,r.jsx)(s.A,{name:"RecordingPostProcessor",label:h.Ay.translate("LabelPostProcessor"),value:T.RecordingPostProcessor,onChange:B,slotProps:{input:{endAdornment:(0,r.jsx)(A.A,{position:"end",children:(0,r.jsx)(b.A,{edge:"end",onClick:Y,children:(0,r.jsx)(y.A,{})})})},inputLabel:{shrink:!!T.RecordingPostProcessor}}}),(0,r.jsx)(s.A,{name:"RecordingPostProcessorArguments",label:h.Ay.translate("LabelPostProcessorArguments"),helperText:h.Ay.translate("LabelPostProcessorArgumentsHelp"),value:T.RecordingPostProcessorArguments,onChange:B}),(0,r.jsx)(c.A,{variant:"h2",children:h.Ay.translate("HeaderRecordingMetadataSaving")}),(0,r.jsxs)(P.A,{children:[(0,r.jsx)(j.A,{control:(0,r.jsx)(m.A,{name:"SaveRecordingNFO",checked:T.SaveRecordingNFO,onChange:J}),label:h.Ay.translate("SaveRecordingNFO")}),(0,r.jsx)(S.A,{children:h.Ay.translate("SaveRecordingNFOHelp")})]}),(0,r.jsxs)(P.A,{children:[(0,r.jsx)(j.A,{control:(0,r.jsx)(m.A,{name:"SaveRecordingImages",checked:T.SaveRecordingImages,onChange:J}),label:h.Ay.translate("SaveRecordingImages")}),(0,r.jsx)(S.A,{children:h.Ay.translate("SaveRecordingImagesHelp")})]}),(0,r.jsx)(k.A,{type:"submit",size:"large",children:h.Ay.translate("Save")})]})})})})};T.displayName="LiveTvRecordingsPage"}}]);