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

Include filter for Spotify.exe not working #434

Open
ex0tiq opened this issue Apr 20, 2024 · 7 comments
Open

Include filter for Spotify.exe not working #434

ex0tiq opened this issue Apr 20, 2024 · 7 comments

Comments

@ex0tiq
Copy link

ex0tiq commented Apr 20, 2024

Got everything setup how I need it, however I can't get the filter config option to work.
I want it to only show the music playing on Spotify.

I've tried both Include and Exclude modes with corresponding settings

mode = "Include"
items = ["Spotify.exe"]

or

mode = "Exclude"
items = ["msedge.exe","chrome.exe","firefox.exe"]

However when I use the Include mode with this settings, nothing gets recognized at all (no Spotify, Firefox, etc.).
And when I use the Exclude mode it still recognizes output from Firefox.

I'm on Windows 11 22H2 (Build 22621.3447) with Spotify 1.2.35.663.gb699649e.
Any idea what I'm doing wrong?

@Nerixyz
Copy link
Owner

Nerixyz commented Apr 21, 2024

That's really weird. I noticed that sometimes GSMTC (the underlying API the app uses) fails to recognize Spotify, which is why I opened #300.

If you have a Rust compiler, you can try to see if GSMTC recognizes Spotify by cloning this repo and running

cargo r -p win-gsmtc --example basic

This should output all events from all recognized apps.

@ex0tiq
Copy link
Author

ex0tiq commented Apr 21, 2024

Thanks for the fast response :)
That command results in the following output. Looks to me like Spotify is recognized as a Chromium process?

Created session: {id=0, source=Chromium.T4VOCGBXUNT2JS247C26TRJJY4}
Current session: 0
[0/Chromium.T4VOCGBXUNT2JS247C26TRJJY4] Model updated: SessionModel {
    playback: Some(
        PlaybackModel {
            status: Playing,
            type: Music,
            rate: 1.0,
            shuffle: false,
            auto_repeat: List,
        },
    ),
    timeline: None,
    media: None,
    source: "Chromium.T4VOCGBXUNT2JS247C26TRJJY4",
}
[0/Chromium.T4VOCGBXUNT2JS247C26TRJJY4] Model updated: SessionModel {
    playback: Some(
        PlaybackModel {
            status: Playing,
            type: Music,
            rate: 1.0,
            shuffle: false,
            auto_repeat: List,
        },
    ),
    timeline: Some(
        TimelineModel {
            start: 0ns,
            end: 175.803s,
            position: 31.638s,
            last_updated_at_ms: 1713702137714,
        },
    ),
    media: None,
    source: "Chromium.T4VOCGBXUNT2JS247C26TRJJY4",
}
[0/Chromium.T4VOCGBXUNT2JS247C26TRJJY4] Media updated: SessionModel {
    playback: Some(
        PlaybackModel {
            status: Playing,
            type: Music,
            rate: 1.0,
            shuffle: false,
            auto_repeat: List,
        },
    ),
    timeline: Some(
        TimelineModel {
            start: 0ns,
            end: 175.803s,
            position: 31.638s,
            last_updated_at_ms: 1713702137714,
        },
    ),
    media: Some(
        MediaModel {
            title: "For Life (feat. Nile Rodgers)",
            subtitle: "",
            artist: "Kygo",
            album: Some(
                AlbumModel {
                    artist: "Kygo",
                    title: "For Life (feat. Nile Rodgers)",
                    track_count: 0,
                },
            ),
            track_number: Some(
                1,
            ),
            genres: [],
            playback_type: Music,
        },
    ),
    source: "Chromium.T4VOCGBXUNT2JS247C26TRJJY4",
} - Some(Image { content_type: "image/png" })

@Nerixyz
Copy link
Owner

Nerixyz commented Apr 21, 2024

That's weird. Do you know if you're using the MS-store version or the "regular" version? Afaik, the store version has some other ID.
I've tested it on Spotify for Windows (64 bit) 1.2.34.783.g923721d9 and 1.2.35.663.gb699649e.

One more reason for NPSM is that it has access to the raw HWND.

@ex0tiq
Copy link
Author

ex0tiq commented Apr 21, 2024

As far as I'm aware I have the "regular" version. I've installed it with winget (winget install Spotify.Spotify) which, as far as I'm aware, should have installed the regular, non MS-Store version. Should I install the version directly from their website?

Any idea when NPSM is ready for deployment :D ? In exclude mode it works as it should, but it is annoying that when I run something else in firefox, that it shows that as well as soon as the track on Spotify is paused.

@Nerixyz
Copy link
Owner

Nerixyz commented Apr 21, 2024

Any idea when NPSM is ready for deployment :D ?

It will likely take some time. I have the definitions locally but haven't integrated it yet.

In exclude mode it works as it should, but it is annoying that when I run something else in firefox, that it shows that as well as soon as the track on Spotify is paused.

You should be able to use Chromium.T4VOCGBXUNT2JS247C26TRJJY4 to in-/exclude apps for now (I assume this won't change).

@ex0tiq
Copy link
Author

ex0tiq commented Apr 21, 2024

Oh... you are absolutely right. Using this identifier as include as well it works as it should... could have thought of that myself facepalm

mode = "Include"
items = ["Spotify.exe","Chromium.T4VOCGBXUNT2JS247C26TRJJY4"]

My issue is resolved with this :)

@Nerixyz
Copy link
Owner

Nerixyz commented Apr 21, 2024

I'll keep this open to track this version of Spotify.

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

2 participants