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

播放一段时间后会发生不停跳至"下一首"的状况 #766

Open
BeautyyuYanli opened this issue Nov 4, 2018 · 14 comments
Open

Comments

@BeautyyuYanli
Copy link

环境:

 ██████████████████  ████████     OS: Manjaro 18.0.0-rc Illyria
 ██████████████████  ████████     Kernel: x86_64 Linux 4.17.19-1-MANJARO
 ██████████████████  ████████     Uptime: 1d 3h 4m
 ████████            ████████     Packages: 1531
 ████████  ████████  ████████     Shell: zsh 5.6.2
 ████████  ████████  ████████     Resolution: 1440x900
 ████████  ████████  ████████     DE: KDE 5.50.0 / Plasma 5.13.5
 ████████  ████████  ████████     WM: KWin
 ████████  ████████  ████████     WM Theme: Breeze Dark
 ████████  ████████  ████████     GTK Theme: Breeze [GTK2/3]
 ████████  ████████  ████████     Icon Theme: Papirus-Light
 ████████  ████████  ████████     Font: Optima Regular
 ████████  ████████  ████████     CPU: Intel Celeron G1610 @ 2x 2.6GHz [41.0°C]
                                  GPU: Mesa DRI Intel(R) Ivybridge Desktop 
                                  RAM: 1031MiB / 1753MiB

歌单播放一段时间后就会不停跳至"下一首",除了下载过的曲目.

@roachsinai
Copy link

我这边是无法播放啊,选中一首歌Enter之后显示评论,没有声音。

按下Space把歌单中所有的歌直接滚了一遍但是不播放音乐。

@roachsinai
Copy link

em,你的应该也是版权问题,可以看一下log。#791 给出了解决方法。

@hehh2001
Copy link

@roachsinai OS: Arch Linux
Kernel: x86_64 Linux 4.19.28-1-lts

按照上述更改后无效,程序都跑不起来,大神给分享一份改过的player.py

@roachsinai
Copy link

你安装的是非Git版本的吧?安装netease-music-git版本修改就可以了。

@hehh2001
Copy link

@roachsinai
OS: Arch Linux
Kernel: x86_64 Linux 4.19.28-1-lts
Shell: zsh 5.7.1
WM: OpenBox
两个版本都装了,都是archlinuxcn库里的,修改后没法运行,我担心是我修改问题,一会给你贴一下日志

@hehh2001
Copy link

@roachsinai
2019-03-16 11:42:52,197 - WARNING - NEMbox.player:149: Song 1351936613 is unavailable due to copyright issue.
2019-03-16 11:42:52,516 - WARNING - NEMbox.player:149: Song 1351874130 is unavailable due to copyright issue.
2019-03-16 11:42:52,816 - WARNING - NEMbox.player:149: Song 1351857854 is unavailable due to copyright issue.
2019-03-16 11:42:53,160 - WARNING - NEMbox.player:149: Song 1351627976 is unavailable due to copyright issue.
2019-03-16 11:42:53,521 - WARNING - NEMbox.player:149: Song 1351441343 is unavailable due to copyright issue.
2019-03-16 11:42:53,896 - WARNING - NEMbox.player:149: Song 1351271639 is unavailable due to copyright issue.
2019-03-16 11:42:54,081 - WARNING - NEMbox.player:149: Song 1350874392 is unavailable due to copyright issue.
2019-03-16 11:42:54,316 - WARNING - NEMbox.player:149: Song 1351048007 is unavailable due to copyright issue.
2019-03-16 11:42:54,528 - WARNING - NEMbox.player:149: Song 1351644331 is unavailable due to copyright issue.
2019-03-16 11:42:54,712 - WARNING - NEMbox.player:149: Song 1350733723 is unavailable due to copyright issue.
2019-03-16 11:42:54,978 - WARNING - NEMbox.player:149: Song 1344942177 is unavailable due to copyright issue.
2019-03-16 11:42:55,257 - WARNING - NEMbox.player:149: Song 1350772999 is unavailable due to copyright issue.
2019-03-16 11:42:55,528 - WARNING - NEMbox.player:149: Song 1350601254 is unavailable due to copyright issue.
2019-03-16 11:42:55,696 - WARNING - NEMbox.player:149: Song 1350601255 is unavailable due to copyright issue.
2019-03-16 11:42:55,983 - WARNING - NEMbox.player:149: Song 1350485030 is unavailable due to copyright issue.
2019-03-16 11:42:56,278 - WARNING - NEMbox.player:149: Song 1350418705 is unavailable due to copyright issue.
2019-03-16 11:42:56,480 - WARNING - NEMbox.player:149: Song 1350408575 is unavailable due to copyright issue.
2019-03-16 11:42:56,726 - WARNING - NEMbox.player:149: Song 1350307202 is unavailable due to copyright issue.
2019-03-16 11:42:56,913 - WARNING - NEMbox.player:149: Song 1350204455 is unavailable due to copyright issue.
2019-03-16 11:42:57,197 - WARNING - NEMbox.player:149: Song 1350147525 is unavailable due to copyright issue.
2019-03-16 11:42:57,475 - WARNING - NEMbox.player:149: Song 544109569 is unavailable due to copyright issue.

@roachsinai
Copy link

看你的日志应该就是这个原因了。

改成这样:

image

        else:
            new_url = NetEase().songs_url([args["song_id"]])[0]["url"]  #使用新地址
            if  not new_url:    #如果没有获得新地址
                new_url = args["mp3_url"]  #使用老地址传给mpg123
            thread = threading.Thread(
                target=self.run_mpg123,
                args=(on_exit, new_url, args["expires"], args["get_time"]),
            )
            cache_thread = threading.Thread(
                target=self.download_song,

@roachsinai
Copy link

roachsinai commented Mar 16, 2019

路径应该一样:/usr/lib/python3.7/site-packages/NEMbox/player.py

你再试一下,还不行,我就folk一下把我的修改push上。或者发个gist。

@hehh2001
Copy link

@roachsinai 这是319-334行的更改
target=self.run_mpg123, args=(on_exit, args["cache"])
)
else:
new_url = NetEase().songs_url([args["song_id"]])[0]["url"] #使用新地址
if not new_url: #如果没有获得新地址
new_url = args["mp3_url"] #使用老地址传给mpg123
thread = threading.Thread(
target=self.run_mpg123,
args=(on_exit, new_url, args["expires"], args["get_time"]),

        )
        cache_thread.start()

    thread.start()
    lyric_download_thread = threading.Thread(target=self.download_lyric)
    lyric_download_thread.start()

@hehh2001
Copy link

@roachsinai

名字 : netease-musicbox-git
版本 : r588.8780d8f-1
描述 : A sexy command line interface musicbox for NetEase based on Python
架构 : any
URL : https://github.com/darknessomi/musicbox
软件许可 : MIT
组 : 无
提供 : netease-musicbox
依赖于 : mpg123 python-pycryptodomex python-requests python-future python-requests-cache
可选依赖 : aria2: music caching [已安装]
libnotify: notifications [已安装]
qt5-base: lyrics support [已安装]
python-pyqt5: lyrics support [已安装]
python-dbus: lyrics support

@hehh2001
Copy link

@roachsinai 路径不会错,/usr/lib/python3.7/site-packages/NEMbox/player.py

@hehh2001
Copy link

@roachsinai 目前情况是播放就跳出terminaltor,

@roachsinai
Copy link

roachsinai@302ff3b

已经修改到我folk的仓库。

@roachsinai
Copy link

你测试一下。

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