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

Every time I play a new video I get the following error in current_song2.log (WARN gsmtc::manager: Could not get current sessions, error) #148

Open
gwin7ok opened this issue Sep 27, 2022 · 2 comments
Labels
bug Something isn't working rust

Comments

@gwin7ok
Copy link

gwin7ok commented Sep 27, 2022

When playing a youtube video on chrome and using currentsong2 to display the video information on OBS,
Every time I play a new video I get the following error in current_song2.log

2022-09-27T21:56:40.347934Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。
2022-09-27T21:56:40.348248Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。
2022-09-27T21:56:40.348439Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。
2022-09-27T21:56:40.350553Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。
2022-09-27T21:56:40.350577Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。

However, it does not mean that something is wrong with the operation
Also, this error will not be output if OBS is not started

currentsong2 is running with administrator privileges

Version of current_song2:
v0.1.0-alpha.7

chrome version:
バージョン: 105.0.5195.127(Official Build) (64 ビット)

OBS version:
28.0.02
ss002 - Properties for 'current song2 info'
ss003 - OBS 28 0 2 (64-bit, windows) - Profile: ニコニコ生放送 - Scenes: RemotePlay
ss004 - C:¥CurrentSong2¥current_song2 log * - EmEditor

@Nerixyz
Copy link
Owner

Nerixyz commented Sep 28, 2022

The error you're seeing is probably because I'm not checking for null/None when sessions are updated, I'll try to do that. Though I'm not sure if that's the root of the problem.

@Nerixyz
Copy link
Owner

Nerixyz commented Sep 28, 2022

So the spam is only an indicator that the current session is null i.e. there's no current session (i fixed that in #154). You can observe this by checking the media overlay when e.g. pressing volume up/down or play/pause. There shouldn't be any application listed.

GSMTC uses the information Windows provides. It's 1:1 the information displayed in the media overlay I mentioned. If an application isn't listed there, it can't be picked up by current-song. We don't use the CurrentSessionChanged event however since it's inaccurate. We use the events from each session to compute the current session.

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

No branches or pull requests

2 participants