Files
tdarr-plugs/tdarr_install/Tdarr_Node/srcug/workers/workerHelpers.js
Tdarr Plugin Developer 04d7ff59e9 Update plugins: VMAF mode, documentation fixes, version sync
- Added VMAF quality-targeted mode to av1_svt_converter (v2.25)
- Fixed documentation version mismatch (misc_fixes v2.8, stream_organizer v4.10, audio_standardizer v1.15)
- Updated rate control documentation with VMAF mode details
- Added vmaf_target and vmaf_samples input options
- Added ab-av1 binary detection with ABAV1_PATH env var support
2025-12-15 19:55:19 -08:00

1 line
6.7 KiB
JavaScript

'use strict';var a72o=a72b;(function(a,b){var n=a72b,c=a();while(!![]){try{var d=-parseInt(n(0xba))/0x1*(parseInt(n(0xe0))/0x2)+parseInt(n(0xce))/0x3*(parseInt(n(0xc5))/0x4)+parseInt(n(0xe4))/0x5+-parseInt(n(0xd7))/0x6*(parseInt(n(0xab))/0x7)+-parseInt(n(0xdf))/0x8+parseInt(n(0xd5))/0x9*(-parseInt(n(0xa3))/0xa)+-parseInt(n(0xd2))/0xb*(-parseInt(n(0xc4))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a72a,0x93f9e));var __assign=this&&this[a72o(0xd3)]||function(){var p=a72o;return __assign=Object[p(0xc2)]||function(a){var q=p;for(var b,c=0x1,d=arguments['length'];c<d;c++){b=arguments[c];for(var e in b)if(Object[q(0xb8)][q(0xe1)]['call'](b,e))a[e]=b[e];}return a;},__assign[p(0xa6)](this,arguments);},__awaiter=this&&this[a72o(0xb3)]||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){g(f);});}return new(c||(c=Promise))(function(f,g){var t=a72b;function h(k){var r=a72b;try{j(d[r(0xcd)](k));}catch(l){g(l);}}function i(k){try{j(d['throw'](k));}catch(l){g(l);}}function j(k){var s=a72b;k[s(0xb4)]?f(k[s(0xdc)]):e(k[s(0xdc)])[s(0xa4)](h,i);}j((d=d[t(0xa6)](a,b||[]))[t(0xcd)]());});},__generator=this&&this[a72o(0xcc)]||function(a,b){var u=a72o,c={'label':0x0,'sent':function(){if(h[0x0]&0x1)throw h[0x1];return h[0x1];},'trys':[],'ops':[]},d,e,h,i;return i={'next':j(0x0),'throw':j(0x1),'return':j(0x2)},typeof Symbol===u(0xb7)&&(i[Symbol[u(0xca)]]=function(){return this;}),i;function j(l){return function(m){return k([l,m]);};}function k(l){var v=u;if(d)throw new TypeError(v(0xd4));while(i&&(i=0x0,l[0x0]&&(c=0x0)),c)try{if(d=0x1,e&&(h=l[0x0]&0x2?e[v(0xbd)]:l[0x0]?e['throw']||((h=e[v(0xbd)])&&h[v(0xe5)](e),0x0):e[v(0xcd)])&&!(h=h[v(0xe5)](e,l[0x1]))[v(0xb4)])return h;if(e=0x0,h)l=[l[0x0]&0x2,h['value']];switch(l[0x0]){case 0x0:case 0x1:h=l;break;case 0x4:c['label']++;return{'value':l[0x1],'done':![]};case 0x5:c[v(0xc7)]++,e=l[0x1],l=[0x0];continue;case 0x7:l=c[v(0xd0)]['pop'](),c[v(0xbb)][v(0xbe)]();continue;default:if(!(h=c['trys'],h=h[v(0xc1)]>0x0&&h[h['length']-0x1])&&(l[0x0]===0x6||l[0x0]===0x2)){c=0x0;continue;}if(l[0x0]===0x3&&(!h||l[0x1]>h[0x0]&&l[0x1]<h[0x3])){c[v(0xc7)]=l[0x1];break;}if(l[0x0]===0x6&&c['label']<h[0x1]){c[v(0xc7)]=h[0x1],h=l;break;}if(h&&c['label']<h[0x2]){c[v(0xc7)]=h[0x2],c[v(0xd0)]['push'](l);break;}if(h[0x2])c[v(0xd0)]['pop']();c[v(0xbb)]['pop']();continue;}l=b['call'](a,c);}catch(m){l=[0x6,m],e=0x0;}finally{d=h=0x0;}if(l[0x0]&0x5)throw l[0x1];return{'value':l[0x0]?l[0x1]:void 0x0,'done':!![]};}},__importDefault=this&&this[a72o(0xd1)]||function(a){var w=a72o;return a&&a[w(0xb6)]?a:{'default':a};};Object['defineProperty'](exports,a72o(0xb6),{'value':!![]}),exports[a72o(0xc6)]=exports[a72o(0xc8)]=exports['updateTrackTags']=exports[a72o(0xc9)]=void 0x0;var utils_1=require(a72o(0xb9)),axiosMiddleware_1=__importDefault(require(a72o(0xcf))),updateWorkerJob_1=__importDefault(require(a72o(0xde))),workerID=process[a72o(0xda)][0x2],updateWorker=function(a){var x=a72o,b=[workerID,x(0xc9),__assign({},a)];process&&process[x(0xac)]&&process[x(0xac)](b);};function a72b(a,b){var c=a72a();return a72b=function(d,e){d=d-0xa3;var f=c[d];return f;},a72b(a,b);}exports['updateWorker']=updateWorker;var updateTrackTags=function(a){var y=a72o,b=a[y(0xbc)],c=a['job'],d=a[y(0xaa)];return __awaiter(void 0x0,void 0x0,void 0x0,function(){var e;return __generator(this,function(f){var z=a72b;switch(f['label']){case 0x0:(0x0,exports[z(0xc9)])({'status':z(0xb2)}),(0x0,updateWorkerJob_1[z(0xb1)])(workerID,c,z(0xc3)+z(0xa5)),f[z(0xc7)]=0x1;case 0x1:f['trys']['push']([0x1,0x3,,0x4]);return[0x4,(0x0,utils_1[z(0xa8)])(d,['--add-track-statistics-tags',b])];case 0x2:f[z(0xdd)](),(0x0,updateWorkerJob_1[z(0xb1)])(workerID,c,z(0xad));return[0x3,0x4];case 0x3:e=f[z(0xdd)](),(0x0,updateWorkerJob_1[z(0xb1)])(workerID,c,z(0xe2)+z(0xbf)),(0x0,updateWorkerJob_1['default'])(workerID,c,JSON[z(0xd8)](e));(e===null||e===void 0x0?void 0x0:e['message'])&&(0x0,updateWorkerJob_1[z(0xb1)])(workerID,c,JSON[z(0xd8)](e['message']));return[0x3,0x4];case 0x4:return[0x2];}});});};exports[a72o(0xcb)]=updateTrackTags,exports['sourceFileDefault']={'_id':'','file':'','container':'','scannerReads':{'ffProbeRead':a72o(0xae),'exiftoolRead':a72o(0xae),'mediaInfoRead':a72o(0xae),'closedCaptionRead':'not\x20enabled'},'createdAt':0x0,'lastPluginDetails':'','bit_rate':0x0,'statSync':{'mtimeMs':0x0,'ctimeMs':0x0,'ctime':'','mtime':'','atime':''},'file_size':0x0,'ffProbeData':{'streams':[]},'meta':{},'mediaInfo':{},'hasClosedCaptions':![],'DB':'','footprintId':'','bumped':![],'HealthCheck':'','TranscodeDecisionMaker':'','fileMedium':'','video_codec_name':'','audio_codec_name':'','video_resolution':'','lastHealthCheckDate':0x0,'lastTranscodeDate':0x0,'history':'','oldSize':0x0,'newSize':0x0,'newVsOldRatio':0x0,'tPosition':0x0,'hPosition':0x0,'holdUntil':0x0,'videoStreamIndex':-0x1};var scanFile=function(a){var A=a72o,b=a[A(0xdb)],c=a[A(0xe3)],d=a[A(0xe6)],e=a['workerType'],f=a[A(0xd9)],g=a[A(0xaa)];return __awaiter(void 0x0,void 0x0,void 0x0,function(){var h;return __generator(this,function(i){var B=a72b;switch(i[B(0xc7)]){case 0x0:if(!(e[B(0xb5)](B(0xa9))&&d===!![]))return[0x3,0x2];return[0x4,(0x0,exports[B(0xcb)])({'filepath':b[B(0xc0)],'job':f,'mkvpropeditPath':g})];case 0x1:i['sent'](),i[B(0xc7)]=0x2;case 0x2:(0x0,exports[B(0xc9)])({'status':B(0xaf)}),(0x0,updateWorkerJob_1[B(0xb1)])(workerID,f,B(0xd6));return[0x4,(0x0,axiosMiddleware_1[B(0xb1)])(B(0xa7),{'file':b,'scanTypes':c})];case 0x3:h=i[B(0xdd)](),(0x0,updateWorkerJob_1[B(0xb1)])(workerID,f,B(0xb0));return[0x2,h];}});});};function a72a(){var C=['../utils/utils','574SXlwLd','trys','filepath','return','pop','\x20A\x20remux\x20may\x20fix\x20the\x20issue','file','length','assign','Updating\x20file\x20properties\x20using\x20mkvpropedit.\x20','432PyduFi','4HitcfC','scanFile','label','sourceFileDefault','updateWorker','iterator','updateTrackTags','__generator','next','1676469akZZYs','./axiosMiddleware','ops','__importDefault','924924RlDake','__assign','Generator\x20is\x20already\x20executing.','510228jgUDba','Requesting\x20Tdarr\x20Server\x20to\x20scan\x20file','6WpZPiT','stringify','job','argv','sourceFilee','value','sent','./updateWorkerJob','4999608nogrdd','4158FDPqCS','hasOwnProperty','Failed\x20to\x20update\x20file\x20properties\x20using\x20mkvpropedit.','scanTypes','4605635QLeWaf','call','runMkvpropedit','190VHUlng','then','This\x20may\x20take\x20a\x20long\x20time\x20for\x20large\x20files.','apply','api/v2/scan-individual-file','spawnAsync','transcode','mkvpropeditPath','7037933FXZJQi','send','Updated\x20file\x20properties\x20using\x20mkvpropedit','not\x20enabled','Scanning','Scan\x20complete','default','Running\x20mkvpropedit','__awaiter','done','includes','__esModule','function','prototype'];a72a=function(){return C;};return a72a();}exports['scanFile']=scanFile;