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

怎么播放在线音乐 #11

Closed
cliya opened this issue Jan 30, 2024 · 6 comments
Closed

怎么播放在线音乐 #11

cliya opened this issue Jan 30, 2024 · 6 comments

Comments

@cliya
Copy link

cliya commented Jan 30, 2024

只能本地音乐播放吗

@hanxi
Copy link
Owner

hanxi commented Jan 30, 2024

国内使用的话配置好代理就行, XIAOMUSIC_PROXY 用于配置代理,默认为空,yt-dlp 工具下载歌曲会用到。

对小爱同学说:播放歌曲+歌曲名,就行了,本地找不到会自动使用 yt-dlp 去搜索下载的。

@cliya
Copy link
Author

cliya commented Jan 31, 2024

国内使用的话配置好代理就行, XIAOMUSIC_PROXY 用于配置代理,默认为空,yt-dlp 工具下载歌曲会用到。

对小爱同学说:播放歌曲+歌曲名,就行了,本地找不到会自动使用 yt-dlp 去搜索下载的。

XIAOMUSIC_PROXY= -e
比如用的V2RAY
这里要怎么修改呢

@hanxi
Copy link
Owner

hanxi commented Jan 31, 2024

@cliya 要看你的v2ray客户端的配置的,局域网的v2ray客户端配好inbounds开启http端口。

比如这样配

"inbounds": [
       {
      "listen": "0.0.0.0",
      "port": 8080,
      "protocol": "http",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      }
    }
  ],

那么 XIAOMUSIC_PROXY 就是 http://192.168.2.5:8080

192.168.2.5 是 v2ray 客户端所在机器的局域网ip

@hanxi hanxi closed this as completed Feb 1, 2024
@kingszhe9664
Copy link

  • `
  • 2024/03/09 09:02:19 | stdout |  
  • -- | -- | --
  • 2024/03/09 09:02:19 | stdout | such file or directory: ''
  • 2024/03/09 09:02:19 | stdout | mutagen.MutagenError: [Errno 2] No
  • 2024/03/09 09:02:19 | stdout | raise MutagenError(e)
  • 2024/03/09 09:02:19 | stdout | 272, in _openfile
  • 2024/03/09 09:02:19 | stdout | ckages/mutagen/_util.py", line
  • 2024/03/09 09:02:19 | stdout | "/app/.venv/lib/python3.10/site-pa
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | return next(self.gen)
  • 2024/03/09 09:02:19 | stdout | lib.py", line 135, in enter
  • 2024/03/09 09:02:19 | stdout | "/usr/local/lib/python3.10/context
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | filething, filename, fileobj,
  • 2024/03/09 09:02:19 | stdout | with _openfile(None,
  • 2024/03/09 09:02:19 | stdout | 162, in wrapper_func
  • 2024/03/09 09:02:19 | stdout | ckages/mutagen/_util.py", line
  • 2024/03/09 09:02:19 | stdout | "/app/.venv/lib/python3.10/site-pa
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | audio = mutagen.File(filename)
  • 2024/03/09 09:02:19 | stdout | line 402, in get_file_duration
  • 2024/03/09 09:02:19 | stdout | "/app/xiaomusic/xiaomusic.py",
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | e))
  • 2024/03/09 09:02:19 | stdout | int(self.get_file_duration(filenam
  • 2024/03/09 09:02:19 | stdout | sec =
  • 2024/03/09 09:02:19 | stdout | set_next_music_timeout
  • 2024/03/09 09:02:19 | stdout | line 410, in
  • 2024/03/09 09:02:19 | stdout | "/app/xiaomusic/xiaomusic.py",
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | self.set_next_music_timeout()
  • 2024/03/09 09:02:19 | stdout | line 508, in play
  • 2024/03/09 09:02:19 | stdout | "/app/xiaomusic/xiaomusic.py",
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | await func(arg1=oparg)
  • 2024/03/09 09:02:19 | stdout | line 455, in run_forever
  • 2024/03/09 09:02:19 | stdout | "/app/xiaomusic/xiaomusic.py",
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | Traceback (most recent call last):
  • 2024/03/09 09:02:19 | stdout |  
  • 2024/03/09 09:02:19 | stdout | occurred:
  • 2024/03/09 09:02:19 | stdout | exception, another exception
  • 2024/03/09 09:02:19 | stdout | During handling of the above
  • 2024/03/09 09:02:19 | stdout |  
  • 2024/03/09 09:02:19 | stdout | such file or directory: ''
  • 2024/03/09 09:02:19 | stdout | FileNotFoundError: [Errno 2] No
  • 2024/03/09 09:02:19 | stdout | if writable else "rb")
  • 2024/03/09 09:02:19 | stdout | fileobj = open(filename, "rb+"
  • 2024/03/09 09:02:19 | stdout | 251, in _openfile
  • 2024/03/09 09:02:19 | stdout | ckages/mutagen/_util.py", line
  • 2024/03/09 09:02:19 | stdout | "/app/.venv/lib/python3.10/site-pa
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | Traceback (most recent call last):
  • 2024/03/09 09:02:19 | stdout | directory: ''
  • 2024/03/09 09:02:19 | stdout | WARNING  执行出错 [Errno 2] No such file or xiaomusic.py:457
  • 2024/03/09 09:02:19 | stdout | INFO     已经开始播放了                     xiaomusic.py:506
  • 2024/03/09 09:02:19 | stdout | INFO     播放 http://192.168.0.39:8090/     xiaomusic.py:503
  • 2024/03/09 09:02:19 | stdout | [03/09/24 01:02:19] INFO     cur_music 奥特曼                   xiaomusic.py:501
  • 2024/03/09 09:02:19 | stdout | [download] Finished downloading playlist: 奥特曼
  • 2024/03/09 09:02:19 | stdout | [BiliBili] 745273948: Downloading webpage
  • 2024/03/09 09:02:19 | stderr | ERROR: Failed to parse: http://192.168.0.1:80index.asp/
  • 2024/03/09 09:02:19 | stdout | [BiliBili] Extracting URL: http://www.bilibili.com/video/av745273948
  • 2024/03/09 09:02:19 | stdout | [download] Downloading item 1 of 1
  • 2024/03/09 09:02:19 | stdout | [BiliBiliSearch] Playlist 奥特曼: Downloading 1 items of 1
  • 2024/03/09 09:02:18 | stdout | [BiliBiliSearch] 奥特曼: Extracting results from page 1
  • 2024/03/09 09:02:18 | stdout | [download] Downloading playlist: 奥特曼
  • `

这个是哪里设置错了吗? 我是NAS上装的docker ,配置的HOSTNAME是NAS的地址
- 2024/03/09 09:02:19 | stderr | ERROR: Failed to parse: http://192.168.0.1:80index.asp/
这一行ERROR 访问的路由器的地址,不知道在哪配置的

@cliya
Copy link
Author

cliya commented Mar 9, 2024 via email

@hanxi
Copy link
Owner

hanxi commented Mar 9, 2024

  • `
  • 2024/03/09 09:02:19 | stdout |
  • -- | -- | --
  • 2024/03/09 09:02:19 | stdout | such file or directory: ''
  • 2024/03/09 09:02:19 | stdout | mutagen.MutagenError: [Errno 2] No
  • 2024/03/09 09:02:19 | stdout | raise MutagenError(e)
  • 2024/03/09 09:02:19 | stdout | 272, in _openfile
  • 2024/03/09 09:02:19 | stdout | ckages/mutagen/_util.py", line
  • 2024/03/09 09:02:19 | stdout | "/app/.venv/lib/python3.10/site-pa
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | return next(self.gen)
  • 2024/03/09 09:02:19 | stdout | lib.py", line 135, in enter
  • 2024/03/09 09:02:19 | stdout | "/usr/local/lib/python3.10/context
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | filething, filename, fileobj,
  • 2024/03/09 09:02:19 | stdout | with _openfile(None,
  • 2024/03/09 09:02:19 | stdout | 162, in wrapper_func
  • 2024/03/09 09:02:19 | stdout | ckages/mutagen/_util.py", line
  • 2024/03/09 09:02:19 | stdout | "/app/.venv/lib/python3.10/site-pa
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | audio = mutagen.File(filename)
  • 2024/03/09 09:02:19 | stdout | line 402, in get_file_duration
  • 2024/03/09 09:02:19 | stdout | "/app/xiaomusic/xiaomusic.py",
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | e))
  • 2024/03/09 09:02:19 | stdout | int(self.get_file_duration(filenam
  • 2024/03/09 09:02:19 | stdout | sec =
  • 2024/03/09 09:02:19 | stdout | set_next_music_timeout
  • 2024/03/09 09:02:19 | stdout | line 410, in
  • 2024/03/09 09:02:19 | stdout | "/app/xiaomusic/xiaomusic.py",
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | self.set_next_music_timeout()
  • 2024/03/09 09:02:19 | stdout | line 508, in play
  • 2024/03/09 09:02:19 | stdout | "/app/xiaomusic/xiaomusic.py",
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | await func(arg1=oparg)
  • 2024/03/09 09:02:19 | stdout | line 455, in run_forever
  • 2024/03/09 09:02:19 | stdout | "/app/xiaomusic/xiaomusic.py",
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | Traceback (most recent call last):
  • 2024/03/09 09:02:19 | stdout |
  • 2024/03/09 09:02:19 | stdout | occurred:
  • 2024/03/09 09:02:19 | stdout | exception, another exception
  • 2024/03/09 09:02:19 | stdout | During handling of the above
  • 2024/03/09 09:02:19 | stdout |
  • 2024/03/09 09:02:19 | stdout | such file or directory: ''
  • 2024/03/09 09:02:19 | stdout | FileNotFoundError: [Errno 2] No
  • 2024/03/09 09:02:19 | stdout | if writable else "rb")
  • 2024/03/09 09:02:19 | stdout | fileobj = open(filename, "rb+"
  • 2024/03/09 09:02:19 | stdout | 251, in _openfile
  • 2024/03/09 09:02:19 | stdout | ckages/mutagen/_util.py", line
  • 2024/03/09 09:02:19 | stdout | "/app/.venv/lib/python3.10/site-pa
  • 2024/03/09 09:02:19 | stdout | File
  • 2024/03/09 09:02:19 | stdout | Traceback (most recent call last):
  • 2024/03/09 09:02:19 | stdout | directory: ''
  • 2024/03/09 09:02:19 | stdout | WARNING  执行出错 [Errno 2] No such file or xiaomusic.py:457
  • 2024/03/09 09:02:19 | stdout | INFO     已经开始播放了                     xiaomusic.py:506
  • 2024/03/09 09:02:19 | stdout | INFO     播放 http://192.168.0.39:8090/     xiaomusic.py:503
  • 2024/03/09 09:02:19 | stdout | [03/09/24 01:02:19] INFO     cur_music 奥特曼                   xiaomusic.py:501
  • 2024/03/09 09:02:19 | stdout | [download] Finished downloading playlist: 奥特曼
  • 2024/03/09 09:02:19 | stdout | [BiliBili] 745273948: Downloading webpage
  • 2024/03/09 09:02:19 | stderr | ERROR: Failed to parse: http://192.168.0.1:80index.asp/
  • 2024/03/09 09:02:19 | stdout | [BiliBili] Extracting URL: http://www.bilibili.com/video/av745273948
  • 2024/03/09 09:02:19 | stdout | [download] Downloading item 1 of 1
  • 2024/03/09 09:02:19 | stdout | [BiliBiliSearch] Playlist 奥特曼: Downloading 1 items of 1
  • 2024/03/09 09:02:18 | stdout | [BiliBiliSearch] 奥特曼: Extracting results from page 1
  • 2024/03/09 09:02:18 | stdout | [download] Downloading playlist: 奥特曼
  • `

这个是哪里设置错了吗? 我是NAS上装的docker ,配置的HOSTNAME是NAS的地址 - 2024/03/09 09:02:19 | stderr | ERROR: Failed to parse: http://192.168.0.1:80index.asp/ 这一行ERROR 访问的路由器的地址,不知道在哪配置的

是 HOSTNAME 是配置为 192.168.0.39 吗?8090端口转发出来了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants