tccoin / Jellyfin-Potplayer

Play with Potplayer
103 stars 26 forks source link

使用Potplayer內建的擴充功能取代powershell #20

Open gwagerw opened 2 weeks ago

gwagerw commented 2 weeks ago

我使用Potplayer內建的擴充功能(MediaPlayParse - Jellyfin.as)去取代powershell的調用,結果會有字串編碼的問題,若是媒體路徑都只使用英文字是可以正常播放,若是媒體路徑也有使用繁體文字那也是可以正常播放,因為我使用繁體中文Windows11,但若是路徑包含了簡體中文或是日韓文字那就無法播放,不知是否有人可以幫忙想辦法解決?有試過想上傳成為你這的分支,無奈沒用過github不會操作先做罷。

gwagerw commented 2 weeks ago

後來修改了腳本,直接將媒體檔案路徑寫入temp.m3u8下載,選擇一律使用Potplayer開啟.m3u8類型的檔案,然後設定永遠開啟此類型檔案,並到 chrome://flags 或 edge://flags 找出 Insecure origins treated as secure,將Jellyfin網址填入,這樣下載檔案才不會被封鎖而無法直接自動播出!這樣方式最簡單,也不會每次有確認提示,但就是會下載temp.m3u8檔案要另刪除。給有需要的人參考!

腳本最上面裡要加這行 // @require https://raw.githubusercontent.com/eligrey/FileSaver.js/master/src/FileSaver.js

然後把 window.open('potplayer://' + path) 換成 let blob = new Blob([path], {type: "text/plain;charset=utf-8"}); saveAs(blob, "temp.m3u8");