mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
1.4 KiB
JavaScript
1 line
1.4 KiB
JavaScript
!function(o,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/download/mpv-output"]=t():o["video/download/mpv-output"]=t()}(self,(function(){return function(){"use strict";var o={d:function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:function(o,t){return Object.prototype.hasOwnProperty.call(o,t)}},t={};o.d(t,{plugin:function(){return n}});var e=coreApis.toast;const n={name:"downloadVideo.outputs.mpv",displayName:"下载视频 - MPV 输出支持",description:"by [@diannaojiang](https://github.com/diannaojiang)\n\n为下载视频增加 MPV 输出支持, 配置方式请参考 [Bilibili-Playin-Mpv](https://github.com/diannaojiang/Bilibili-Playin-Mpv)",setup:({addData:o})=>{o("downloadVideo.outputs",(o=>{o.push({name:"mpv",displayName:"MPV",description:"弹一条消息显示出播放按钮,点击即可使用MPV进行播放",runAction:async o=>{const t=o.infos.flatMap((o=>o.titledFragments)),n=t.map((o=>o.url)).join("\n"),i=`mpv://--http-header-fields="referer:https://www.bilibili.com/" "${t[0].url}" --audio-file="${t[1].url}"`;console.log(i),e.Toast.show(`<a class="link" href="${encodeURI(i)}" >播放</a>`,"MPV播放"),console.log(n),console.log(o)}})}))},commitHash:"a2dc6949ac3522f9c097380644c0648402bf02d4"};return t=t.plugin}()})); |