-
Notifications
You must be signed in to change notification settings - Fork 105
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
mpd Last.fm 上報錯誤 #151
Comments
是不是應該是 |
Lines 145 to 146 in f944442
這裡是 500,是不是忘了改? |
具体报错/错误是啥 |
沒報錯 |
window目前没发现有问题,我这没有mac环境,你自己测试下是不是mac计时器周期导致的,上报前打印一下 p.PassedTime() |
就是打印出來是 0 (我先改成 p.playedTime了) // 状态监听
go func() {
defer utils.Recover(false)
for {
select {
case <-ctx.Done():
return
case s := <-p.Player.StateChan():
p.stateHandler.SetPlayingInfo(p.PlayingInfo())
if s != player.Stopped {
p.model.Rerender(false)
break
}
utils.Logger().Printf("[LASTFM] StateChan: report complete %f", p.PassedTime().Seconds())
// 上报lastfm
lastfm.Report(p.model.lastfm, lastfm.ReportPhaseComplete, p.curSong, p.playedTime)
// 自动切歌且播放时间不少于(实际歌曲时间-20)秒时,才上报至网易云
if p.CurMusic().Duration.Seconds()-p.playedTime.Seconds() < 20 {
utils.ReportSongEnd(p.curSong.Id, p.PlayingInfo().TrackID, p.playedTime)
}
p.NextSong(false)
}
}
}()
|
你是用 mpd嗎? |
我用的默认的的beep |
|
不应该啊,返回的都是Timer里的passed,这个和播放引擎应该是无关的,奇了怪了 |
|
召唤大佬 @anhoder |
我晚上看下 |
Check for existing issues
检查是否已存在相同issue
Describe the bug and provide steps to reproduce it
描述遇到的bug并提供相应的复现方法
go-musicfox/pkg/ui/player.go
Line 127 in f944442
我在這
go-musicfox/pkg/lastfm/api.go
Line 153 in f944442
加了 logger
log裡,passedSeconds都是 0.
似乎上報前 timer 就被 reset了
go-musicfox/pkg/player/mpd_player.go
Line 196 in f944442
Environment / 运行环境
musicfox master
macOS 10.15.7
If applicable, list the error messages you see
如果有错误输出请一并填入
No response
If applicable, attach your
${MUSICFOX_ROOT}/musicfox.log
file to this issue.如果
${MUSICFOX_ROOT}/musicfox.log
里有错误日志,请一并上传No response
The text was updated successfully, but these errors were encountered: