alist icon indicating copy to clipboard operation
alist copied to clipboard

使用potplayer唤起功能不能播放,提示不存在该文件,经测试是Unicode编码导致的问题

Open hdm9527 opened this issue 2 years ago • 1 comments

Please make sure of the following things

  • [X] I have read the documentation.
  • [X] I'm sure there are no duplicate issues or discussions.
  • [X] I'm sure it's due to alist and not something else(such as Dependencies or Operational).

Alist Version / Alist 版本

v2.6.3-0-g1d3b869-dirty

Driver used / 使用的存储驱动

Onedrive

Describe the bug / 问题描述

在win10上经测试是potplayer唤起后端会把url中的中文转换成Unicode字符,导致找不到该文件,最后播放失败。复制链接使用potplayer播放正常,编码的url和解码的url都可以正常播放。

Reproduction / 复现链接

复现链接 alist的demo站也存在这个问题,url中有中文唤起potplayer提示找不到该文件demo视频

Logs / 日志

potplayer手动播放正常
[GIN] 2022/08/07 - 11:10:24 | 302 |  257.694396ms | 240e:3b3:9234:xxx:xxxx:c3e6:xxxx:5fd6 | GET      "/d/admin/狂赌之渊双/[Nekomoe kissaten][Kakegurui Twin][01][1080p][CHS].mp4?sign=16c07d4d64788a16"

potplayer唤起播放失败
ERRO[2022-08-07 11:10:34] not file                                     
[GIN] 2022/08/07 - 11:10:34 | 200 |   11.879503ms | 240e:3b3:9234:xxx:xxxx:c3e6:xxxx:5fd6 | GET      "/d/admin/ç\u008b\u0082èµ\u008cä¹\u008bæ¸\u008aå\u008f\u008c/[Nekomoe kissaten][Kakegurui Twin][01][1080p][CHS].mp4?sign=16c07d4d64788a16"
ERRO[2022-08-07 11:10:35] not file

hdm9527 avatar Aug 07 '22 04:08 hdm9527

出现相同问题 image

lonzoen avatar Aug 07 '22 12:08 lonzoen

出现相同问题。

chuest avatar Aug 21 '22 00:08 chuest

我也遇到了

JokerZhang66 avatar Aug 24 '22 11:08 JokerZhang66

image 同样

balh55y avatar Sep 06 '22 13:09 balh55y

image 同样

临时解决方法,把路径的中文用字母或字符代替,文件名也不能包含中文

hdm9527 avatar Sep 06 '22 13:09 hdm9527

potplayer调用.zip 把压缩包里的两个文件拷贝到potplayer安装根目录(目录路径不能含中文),然后把两个文件里的potplayer.exe和potplayer.bat的路径换成你的,最后以管理员身份双击运行potplayer.reg添加进注册表

shiji5824666 avatar Sep 07 '22 09:09 shiji5824666

你先看清楚,是路径中不能有中文或文件名有中文,改成英文或其他字符就可以正常使用

hdm9527 avatar Sep 07 '22 09:09 hdm9527

你先看清楚,是路径中不能有中文或文件名有中文,改成英文或其他字符就可以正常使用

老哥,能有点常识吗,我能发出解决方案,自然是亲测的了,算了,信不信随你,溜了溜了

shiji5824666 avatar Sep 07 '22 09:09 shiji5824666

你先看清楚,是路径中不能有中文或文件名有中文,改成英文或其他字符就可以正常使用

老哥,能有点常识吗,我能发出解决方案,自然是亲测的了,算了,信不信随你,溜了溜了

不好意思,不会bat命令,百度了下原来是利用bat进行字符替换

hdm9527 avatar Sep 07 '22 09:09 hdm9527

url编码错误的原因,potplayer中文解码时被当成utf8字符转gbk了,找错方向了,issue先关闭了。v3版本版本解决了这个问题,v2版本可以通过修改注册表解决 win+r输入regedit回车 image image cmd /v /c "set url=%1 & start "" "这里修改为potplayer的路径" !url:potplayer://=!" 例:cmd /v /c "set url=%1 & start "" "C:\Program Files\DAUM\PotPlayer\PotPlayerMini64.exe" !url:potplayer://=!"

hdm9527 avatar Sep 08 '22 08:09 hdm9527

potplayer调用.zip 把压缩包里的两个文件拷贝到potplayer安装根目录(目录路径不能含中文),然后把两个文件里的potplayer.exe和potplayer.bat的路径换成你的,最后以管理员身份双击运行potplayer.reg添加进注册表

厉害啊,老哥。解决了

Think2twice avatar Jul 19 '23 06:07 Think2twice