PageSourceSearch

https://exode.me/client/en-US/chunk-SSETSBQT.js

js exode.me collected 2026-10-04 16:17:50 UTC 2,816 bytes, 1 lines download raw bytes

1import{b as O,c as l}from"./chunk-Q6I3NOHV.js";import{$d as f,B as c,C as g,D as h,De as y,Q as p,Y as v,aa as d,gf as V,gh as T,hg as S,i as m,j as u,k as E,n as s,nh as A,pd as C,th as D}from"./chunk-HVCWS4IF.js";import{j as b}from"./chunk-KJ7W2O2B.js";var n=class n{authHttp=d(C);serverService=d(D);restExtractor=d(T);confirmService=d(A);listCaptions(t,i){let r=O.buildVideoPasswordHeader(i);return this.authHttp.get(`${l.BASE_VIDEO_URL}/${t}/captions`,{headers:r}).pipe(p(e=>this.serverService.getServerLocale().pipe(s(a=>({captionsResult:e,translations:a})))),s(({captionsResult:e,translations:a})=>{for(let o of e.data)o.language.label=V(o.language.label,a);return e;}),s(e=>(y(e.data,"language","label"),e))).pipe(c(e=>this.restExtractor.handleError(e)));}removeCaption(t,i){return this.authHttp.delete(`${l.BASE_VIDEO_URL}/${t}/captions/${i}`).pipe(c(r=>this.restExtractor.handleError(r)));}addCaption(t,i,r){let a=S({captionfile:r});return this.authHttp.put(`${l.BASE_VIDEO_URL}/${t}/captions/${i}`,a).pipe(c(o=>this.restExtractor.handleError(o)));}updateCaptions(t,i){let r=u(void 0);for(let e of i)e.action==="CREATE"||e.action==="UPDATE"?r=r.pipe(p(()=>this.addCaption(t,e.language.id,e.captionfile))):e.action==="REMOVE"&&(r=r.pipe(p(()=>this.removeCaption(t,e.language.id))));return r;}getCaptionContent({fileUrl:t}){return this.authHttp.get(t,{responseType:"text"});}generateCaption(t){let{videos:i}=t;return m(i).pipe(h(r=>this.generateCaptionOfSpecificVideo({video:r,forceTranscription:!1})),g(),s(r=>r.reduce((e,a)=>(a==="success"&&(e.success+=1),a==="already-has-captions"&&(e.alreadyHasCaptions+=1),a==="already-being-transcribed"&&(e.alreadyBeingTranscribed+=1),e),{success:0,alreadyHasCaptions:0,alreadyBeingTranscribed:0})),c(r=>this.restExtractor.handleError(r)));}generateCaptionOfSpecificVideo(t){let{video:i,forceTranscription:r}=t,e={forceTranscription:r};return this.authHttp.post(`${l.BASE_VIDEO_URL}/${i.id}/captions/generate`,e).pipe(s(()=>"success"),c(a=>{let o=a.error;if(o?.code===f.VIDEO_ALREADY_BEING_TRANSCRIBED&&!r){let I="PeerTube considers video \""+i.name+"\" is already being transcripted."+" If you think PeerTube is wrong (video in broken state after a crash etc.), you can force transcription on this video."+" Do you still want to run transcription?";return m(this.confirmService.confirm(I,"Force transcription")).pipe(p($=>$===!1?E(()=>a):this.generateCaptionOfSpecificVideo({video:i,forceTranscription:!0})));}return o?.code===f.VIDEO_ALREADY_HAS_CAPTIONS?u("already-has-captions"):o?.code===f.VIDEO_ALREADY_BEING_TRANSCRIBED?u("already-being-transcribed"):E(()=>a);}));}};b(n,"\u0275fac",function(i){return new(i||n)();}),b(n,"\u0275prov",v({token:n,factory:n.ɵfac}));var R=n;export{R as a};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*/

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.