Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

网盘挂载为本地,升级后播放里面的歌曲没有声音 #128

Closed
xenofans opened this issue Jul 17, 2024 · 15 comments
Closed

网盘挂载为本地,升级后播放里面的歌曲没有声音 #128

xenofans opened this issue Jul 17, 2024 · 15 comments
Labels
bug Something isn't working 文档 帮助文档

Comments

@xenofans
Copy link

网盘挂载为本地,升级0.3.7后播放里面的歌曲没有声音了,以前的版本可以正常播放。

@africa1207
Copy link

我0.3.6和现在最新的0.3.8也是没声音

@hanxi hanxi added bug Something isn't working 文档 帮助文档 labels Jul 17, 2024
@hanxi
Copy link
Owner

hanxi commented Jul 17, 2024

记录下挂载 alist 的流程

使用 rclone 挂载 webdav

用 rclone config 配置一个名为 alist 的链接,选项可以参考下面的。

[alist]
type = webdav
url = http://192.168.3.102:3898/dav
vendor = other
user = hanxi
pass = *** ENCRYPTED ***

测试连接是否正常

查看 webdav 目录文件

rclone lsd alist:/

启动挂载

新建脚本 mount_xiaoya_alist.sh ,脚本内容如下:

#!/bin/bash

# 挂载点目录
MOUNT_POINT="/home/hanxi/alist"

# Remote 名称
REMOTE="alist:/"

# 创建挂载点目录(如果不存在)
mkdir -p "$MOUNT_POINT"
fusermount -u $MOUNT_POINT

# 使用 rclone 挂载 AList 的 WebDAV 目录
rclone mount $REMOTE "$MOUNT_POINT" \
        --vfs-cache-mode full \
        --dir-cache-time 1h \
        --buffer-size 32M \
        --vfs-read-chunk-size 16M \
        --vfs-read-chunk-size-limit 64M \
        --umask 002 \
        --uid $(id -u) \
        --gid $(id -g) \
        --allow-other \
        --transfers 4 \
        --timeout 10m &

# 检查挂载状态
sleep 2 # 等待挂载完成
if mountpoint -q "$MOUNT_POINT"; then
        echo "小雅 AList WebDAV 目录已成功挂载到 $MOUNT_POINT"
else
        echo "挂载失败,请检查日志输出"
        exit 1
fi

修改音乐文件目录

  "music_path": "/home/hanxi/alist/音乐/2680首mp3/",

@hanxi
Copy link
Owner

hanxi commented Jul 17, 2024

我这样挂载目录是可以播放的。

@africa1207
Copy link

我这样挂载目录是可以播放的。

我是音响pro,更新到0.3.9也不能播放,网页显示播放中但是就没声音,通过docker部署,音乐目录是本地文件,日志显示也没报错显示播放中

@hanxi
Copy link
Owner

hanxi commented Jul 17, 2024

我这样挂载目录是可以播放的。

我是音响pro,更新到0.3.9也不能播放,网页显示播放中但是就没声音,通过docker部署,音乐目录是本地文件,日志显示也没报错显示播放中

日志里的播放链接能不能在浏览器里打开?

@hanxi
Copy link
Owner

hanxi commented Jul 17, 2024

我测试了把软链接放进docker里也是可以的。

    volumes:
      - ./data/music:/app/music
      - /home/hanxi/alist/音乐/2680首mp3:/home/hanxi/alist/音乐/2680首mp3
      - ./conf/xiaomusic:/app/conf

目录结构是这样的

hanxi@ubuntu ~/nas (master) $ ls data/music/tmp1/ -l    
total 24500                                             
lrwxrwxrwx 1 hanxi hanxi       35 Jul 17 09:34 2680首mp3 -> /home/hanxi/alist/音乐/2680首mp3                    
-rw-rw-r-- 1 hanxi hanxi   538808 Jul  3 20:27 TEST1.mp3
drwxrwxr-x 2 hanxi hanxi     4096 Jul 14 08:29 download
-rw-rw-r-- 1 hanxi hanxi   538808 Jul 15 16:42 test.mp3 
drwxrwxr-x 3 hanxi hanxi     4096 Jun 23 03:25 tmp2     
drwxrwxr-x 2 hanxi hanxi     4096 Jul  7 00:38 tmp3     
drwxrwxr-x 2 hanxi hanxi     4096 Jul  7 00:39 林俊杰   
-rw-rw-r-- 1 hanxi hanxi 23990146 Jun 27 14:56 程响-人间  火.flac

@xenofans
Copy link
Author

我是用CloudDrive2直接挂载115网盘,然后播放网盘的歌,但是小爱音箱pro没有声音。没用过rclone+alist。

@hanxi
Copy link
Owner

hanxi commented Jul 17, 2024

我是用CloudDrive2直接挂载115网盘,然后播放网盘的歌,但是小爱音箱pro没有声音。没用过rclone+alist。

老版本能播放,新版本不能播放,我怀疑是路径有问题,可以升级到0.3.9之后,看看播放链接那个url能不能在浏览器打开。

@hanxi
Copy link
Owner

hanxi commented Jul 17, 2024

确实路径有问题,我看看怎么修复。

@xenofans
Copy link
Author

日志里的 12:45:23] [0.3.9] [INFO] xiaomusic.py:908: 播放 http://192.168.1.194:8090/music/The%20Heart%20Strings%20-%20Nina%20And%20Her%20Very%20Long%20Hair.flac
ERROR: Exception in ASGI application
看来是路径错误

@darkrain88
Copy link

[09:58:26] [0.3.9] [INFO] xiaomusic.py:1094: group_player_play http://192.168.50.109:8090/music/%E7%8E%8B%E8%8F%B2%E5%85%A8%E9%9B%86/%E7%8E%8B%E8%8F%B2%20-%E3%80%8A%E9%98%BF%E8%8F%B2%E6%AD%A3%E4%BC%A0%E3%80%8B3CD/%E7%8E%8B%E8%8F%B2%20-%E3%80%8A%E9%98%BF%E8%8F%B2%E6%AD%A3%E4%BC%A0%E3%80%8BCD3/03.%20%E7%8E%8B%E8%8F%B2%20-%20%E8%AA%93%E8%A8%80%EF%BC%88Discovery%20Mix%EF%BC%89.flac ['86e2d53f-1d42-4858-9728-21fa56031eea'] [{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}]

[09:58:26] [0.3.9] [INFO] xiaomusic.py:917: 已经开始播放了

[09:58:26] [0.3.9] [INFO] xiaomusic.py:1208: 下一曲定时器已取消

[09:58:26] [0.3.9] [INFO] xiaomusic.py:1123: 旧定时器已取消

[09:58:26] [0.3.9] [INFO] xiaomusic.py:1135: 237 秒后将会播放下一首歌曲

我的也不能播放了, 我这个是挂载的nfs

@hanxi
Copy link
Owner

hanxi commented Jul 19, 2024

[09:58:26] [0.3.9] [INFO] xiaomusic.py:1094: group_player_play http://192.168.50.109:8090/music/%E7%8E%8B%E8%8F%B2%E5%85%A8%E9%9B%86/%E7%8E%8B%E8%8F%B2%20-%E3%80%8A%E9%98%BF%E8%8F%B2%E6%AD%A3%E4%BC%A0%E3%80%8B3CD/%E7%8E%8B%E8%8F%B2%20-%E3%80%8A%E9%98%BF%E8%8F%B2%E6%AD%A3%E4%BC%A0%E3%80%8BCD3/03.%20%E7%8E%8B%E8%8F%B2%20-%20%E8%AA%93%E8%A8%80%EF%BC%88Discovery%20Mix%EF%BC%89.flac ['86e2d53f-1d42-4858-9728-21fa56031eea'] [{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}]

[09:58:26] [0.3.9] [INFO] xiaomusic.py:917: 已经开始播放了

[09:58:26] [0.3.9] [INFO] xiaomusic.py:1208: 下一曲定时器已取消

[09:58:26] [0.3.9] [INFO] xiaomusic.py:1123: 旧定时器已取消

[09:58:26] [0.3.9] [INFO] xiaomusic.py:1135: 237 秒后将会播放下一首歌曲

我的也不能播放了, 我这个是挂载的nfs

你这个链接 http://192.168.50.109:8090/music/%E7%8E%8B%E8%8F%B2%E5%85%A8%E9%9B%86/%E7%8E%8B%E8%8F%B2%20-%E3%80%8A%E9%98%BF%E8%8F%B2%E6%AD%A3%E4%BC%A0%E3%80%8B3CD/%E7%8E%8B%E8%8F%B2%20-%E3%80%8A%E9%98%BF%E8%8F%B2%E6%AD%A3%E4%BC%A0%E3%80%8BCD3/03.%20%E7%8E%8B%E8%8F%B2%20-%20%E8%AA%93%E8%A8%80%EF%BC%88Discovery%20Mix%EF%BC%89.flac 局域网可以访问到吗?

@hanxi
Copy link
Owner

hanxi commented Jul 19, 2024

等这个 bug encode/starlette#2646 修复了应该就能彻底解决软连接的问题。之前用 flask 没这个 bug 。

@darkrain88
Copy link

QQ_1721480743121
完全没问题

@darkrain88
Copy link

又可以放了, 哈哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 文档 帮助文档
Projects
None yet
Development

No branches or pull requests

4 participants