Last active
March 19, 2024 06:49
-
-
Save tywtyw2002/b46be1500c85451af357570a802064fa to your computer and use it in GitHub Desktop.
bilibili-Ev-iina
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["video/download/iina-output"]=n():e["video/download/iina-output"]=n()}(globalThis,(()=>(()=>{var e={607:(e,n,t)=>{var o=t(218)((function(e){return e[1]}));o.push([e.id,".rpc-config.download-video-config-section {\n display: flex;\n align-items: center;\n flex-direction: column;\n align-items: stretch;\n}\n.rpc-config.download-video-config-section > * {\n display: flex;\n align-items: center;\n}\n.rpc-config.download-video-config-section > *:not(:last-child) {\n margin-bottom: 12px;\n}\n.rpc-config.download-video-config-section .profile-select .be-textbox,\n.rpc-config.download-video-config-section .profile-select .be-dropdown {\n margin-right: 8px;\n}\n.rpc-config.download-video-config-section .profile-select .be-button {\n padding: 4px;\n}",""]),e.exports=o},218:e=>{"use strict"; // eslint-disable-next-line func-names e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t=e(n);return n[2]?"@media ".concat(n[2]," {").concat(t,"}"):t})).join("")}, // eslint-disable-next-line func-names n.i=function(e,t,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var i={};if(o)for(var r=0;r<this.length;r++){ // eslint-disable-next-line prefer-destructuring var a=this[r][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);o&&i[c[0]]||(t&&(c[2]?c[2]="".concat(t," and ").concat(c[2]):c[2]=t),n.push(c))}},n}},76:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>h});var o=function(){var e=this,n=e._self._c;e._self._setupProxy;return n("div",{staticClass:"rpc-config download-video-config-section"},[n("div",{staticClass:"profile-speed"},[n("div",{staticClass:"profile-item-name"},[e._v("命令路径:")]),e._v(" "),n("VDropdown",{attrs:{items:e.SpeedProfiles},on:{change:function(n){return e.saveInfo()}},scopedSlots:e._u([{key:"item",fn:function({item:n}){return[e._v("\n "+e._s(n)+"\n ")]}}]),model:{value:e.IINAInfo.speed,callback:function(n){e.$set(e.IINAInfo,"speed",n)},expression:"IINAInfo.speed"}})],1)])};o._withStripped=!0;const i=coreApis.settings,r=coreApis.ui,a=["1.0","1.25","1.5","1.75","2.0"],{options:s}=(0,i.getComponentSettings)("downloadVideo"),c={speed:"1.0",...s},d=Vue.extend({components:{VDropdown:r.VDropdown},data:()=>({IINAInfo:c,SpeedProfiles:a}),methods:{saveInfo(){Object.assign(s,c)}}});var l=t(332),u=t.n(l),f=t(607),p=t.n(f),v={insert:"head",singleton:!1};u()(p(),v);p().locals;var m=function(e,n,t,o,i,r,a,s){var c,d="function"==typeof e?e.options:e;if(n&&(d.render=n,d.staticRenderFns=t,d._compiled=!0),o&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=c):i&&(c=s?function(){i.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(d.functional){d._injectStyles=c;var l=d.render;d.render=function(e,n){return c.call(n),l(e,n)}}else{var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:d}}(d,o,[],!1,null,null,null);const h=m.exports},332:(e,n,t)=>{"use strict";var o,i=function(){return void 0===o&&( // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // @see https://github.com/webpack-contrib/style-loader/issues/177 o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}(),a=[];function s(e){for(var n=-1,t=0;t<a.length;t++)if(a[t].identifier===e){n=t;break}return n}function c(e,n){for(var t={},o=[],i=0;i<e.length;i++){var r=e[i],c=n.base?r[0]+n.base:r[0],d=t[c]||0,l="".concat(c," ").concat(d);t[c]=d+1;var u=s(l),f={css:r[1],media:r[2],sourceMap:r[3]};-1!==u?(a[u].references++,a[u].updater(f)):a.push({identifier:l,updater:h(f,n),references:1}),o.push(l)}return o}function d(e){var n=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var i=t.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(e){n.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(n);else{var a=r(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}return n}var l,u=(l=[],function(e,n){return l[e]=n,l.filter(Boolean).join("\n")});function f(e,n,t,o){var i=t?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=u(n,i);else{var r=document.createTextNode(i),a=e.childNodes;a[n]&&e.removeChild(a[n]),a.length?e.insertBefore(r,a[n]):e.appendChild(r)}}function p(e,n,t){var o=t.css,i=t.media,r=t.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var v=null,m=0;function h(e,n){var t,o,i;if(n.singleton){var r=m++;t=v||(v=d(n)),o=f.bind(null,t,r,!1),i=f.bind(null,t,r,!0)}else t=d(n),o=p.bind(null,t,n),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return o(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;o(e=n)}else i()}}e.exports=function(e,n){(n=n||{}).singleton||"boolean"==typeof n.singleton||(n.singleton=i());var t=c(e=e||[],n);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<t.length;o++){var i=s(t[o]);a[i].references--}for(var r=c(e,n),d=0;d<t.length;d++){var l=s(t[d]);0===a[l].references&&(a[l].updater(),a.splice(l,1))}t=r}}}}},n={};function t(o){var i=n[o];if(void 0!==i)return i.exports;var r=n[o]={id:o,exports:{}};return e[o](r,r.exports,t),r.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";t.d(o,{plugin:()=>n});const e=coreApis.toast;const n={name:"downloadVideo.outputs.iina",displayName:"下载视频 - IINA 输出支持",author:{name:"diannaojiang",link:"https://github.com/diannaojiang"},description:"为下载视频增加 IINA 输出支持",setup:n=>{let{addData:o}=n;o("downloadVideo.outputs",(n=>{n.push({name:"iina",displayName:"IINA",description:"弹一条消息显示出播放按钮,点击即可使用IINA进行播放",runAction:async(n,t)=>{const{IINAInfo:o}=t,i=n.infos.flatMap((e=>e.titledFragments)),r={rawUrl:"",urls:[i[0].url],currentLine:0,currentQuality:0,lines:["Line 1"],qualitys:["高清 1080P","高清 720P","清晰 480P","流畅 360P"],mpvScript:`force-media-title="${n.inputs[0].title}",ytdl="no",speed="${o.speed}",referrer="https://www.bilibili.com/",audio-file="${i[1].url}"`};console.log(r);const a=`iina://open?new_window=1&url=-&mpv_script-opts=${encodeURIComponent(`iinaPlusArgs=${s=JSON.stringify(r),Array.from(s).map((e=>e.charCodeAt(0)<128?e.charCodeAt(0).toString(16).padStart(2,"0"):encodeURIComponent(e).replace(/\%/g,"").toLowerCase())).join("")}`)}`;var s;e.Toast.show(`<a class="link" href="${a}" >播放</a>`,"IINA播放"),console.log(a),console.log(n)},component:()=>Promise.resolve().then(t.bind(t,76)).then((e=>e.default))})}))},commitHash:"e7dba14fc8f3d8f1a222088d0b48e1b5cebd94df",coreVersion:"2.8.7"}})(),o=o.plugin})())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment