betta-cyber / netease-music-tui

netease cloud music terminal client by rust :zap:
MIT License
420 stars 34 forks source link

Playing some new songs breaks the whole program #9

Open slikie opened 4 years ago

slikie commented 4 years ago

[00:00:07.249] (7fddaaaaf700) DEBUG Response: '400 Bad Request' for http://m701.music.126.net/20200331191119/aced0a81c4a36b33eae1dc5bec16a162/jdymusic/obj/w5zDlMODwrDDiGjCn8Ky/1908976826/b1e0/3f69/41d7/7a37116010b3e13749b4c4e595f50e1d.mp3 [00:00:07.249] (7fddaa6ad700) DEBUG pooling idle connection for "http://m701.music.126.net" [00:00:07.249] (7fddb4678b80) ERROR thread 'main' panicked at 'called Result::unwrap() on an Err value: MP3DurationError { kind: UnexpectedFrame { header: 1010792557 }, offset: 4, at_duration: 0ns }': src/libcore/result.rs:1165 [00:00:07.250] (7fddb4678b80) DEBUG Shutting down player thread ...


[00:00:04.815] (7fb196b50700) DEBUG pooling idle connection for "http://m701.music.126.net" [00:00:04.815] (7fb196b50700) DEBUG Response: '400 Bad Request' for http://m701.music.126.net/20200331190913/2a752d880905be71f1a4d560ff8fdbfa/jdymusic/obj/w5zDlMODwrDDiGjCn8Ky/1982546996/e9f4/7bd8/7593/48cae3e5ebe3198ac37a5243dfc7c821.mp3 [00:00:04.815] (7fb1a07a0b80) ERROR thread 'main' panicked at 'called Result::unwrap() on an Err value: MP3DurationError { kind: UnexpectedFrame { header: 1010792557 }, offset: 4, at_duration: 0ns }': src/libcore/result.rs:1165 [00:00:04.816] (7fb1a07a0b80) DEBUG Shutting down player thread ...

betta-cyber commented 4 years ago

It's seems can't get the whole duration for that music you played.

can you give me the name of the song? It's will helps me a lot for test.

slikie commented 4 years ago

You can go to the latest album of The Weeknd.

betta-cyber commented 4 years ago

netease music add some HOST check rule for get song real url. when i use the wrong HOST to fetch the music resource like http://m701.music.126.net/20200331190913/2a752d880905be71f1a4d560ff8fdbfa/jdymusic/obj/w5zDlMODwrDDiGjCn8Ky/1982546996/e9f4/7bd8/7593/48cae3e5ebe3198ac37a5243dfc7c821.mp3 I got 400 Bad Request. just need to use the right HOST

betta-cyber commented 4 years ago

https://github.com/betta-cyber/netease-music-tui/commit/0a5a5aa872ac4e1953b1fe68da7debaf3c509821

slikie commented 4 years ago

I still find that a failed download and playback panics and exits not the most elegant practice.

betta-cyber commented 4 years ago

I still find that a failed download and playback panics and exits not the most elegant practice.

Maybe give a msg or just jump to the next song better?

slikie commented 4 years ago

There are also premium songs alerting get track url failed(maybe can be specified?) and straight quitting when under network error. On either case, using the universal way to alert the warning seems like a good idea.