Code Monkey home page Code Monkey logo

Comments (19)

JimmyAppelt avatar JimmyAppelt commented on May 26, 2024

Yup that is due to a fact that its hooking to the wrong process. >there are more then one processes of spotify running at the same time. And the Correct one to couple is not always at the same place in the array of coarse.

Like in #50 i commented about this issue

Mrnikbobjeff@53ff432#commitcomment-14114814

Going to need something like int pid = p.Where(o => o.MainWindowHandle != IntPtr.Zero).Select(o => o.Id).First(); because i get more processes back from the Process.GetProcessesByName method.
The correct Id to create the GetVolumeObject(pid) object is not always first in the array.

from spotifyapi-net.

stuntguy3000 avatar stuntguy3000 commented on May 26, 2024

Ah right, damn. No worries :)

from spotifyapi-net.

JimmyAppelt avatar JimmyAppelt commented on May 26, 2024

Don't close it 😄 it has the need to be fixed 👍

from spotifyapi-net.

stuntguy3000 avatar stuntguy3000 commented on May 26, 2024

True :P

from spotifyapi-net.

Mrnikbobjeff avatar Mrnikbobjeff commented on May 26, 2024

I can not reproduce the issue with multiple processes on my Windows 10 Pro x64 system. Could you give me additional information such as os and architecture? And are multiple spotify windows open or why do you have multiple processes

from spotifyapi-net.

JimmyAppelt avatar JimmyAppelt commented on May 26, 2024

Windows 10 Pro x64

  • 1 x process from Apps and
  • 2 x process in background

(so at least 3 processes called spotify.exe are running)

prev

int pid = p.Where(o => o.MainWindowHandle != IntPtr.Zero).Select(o => o.Id).First();

Should get you the process that has a windowhandle (where the other once have not)

from spotifyapi-net.

JohnnyCrazy avatar JohnnyCrazy commented on May 26, 2024

This seems like a windows 10 problem, not ran into this with windows 7.

Could you add your OS @stuntguy3000 ? Maybe this will give us some insights.

I will deploy a fix shortly/tomorrow

from spotifyapi-net.

Mrnikbobjeff avatar Mrnikbobjeff commented on May 26, 2024

I did not know that spotify can have background processes. Are they they when you start spotify or when are they started?

from spotifyapi-net.

JimmyAppelt avatar JimmyAppelt commented on May 26, 2024

@Mrnikbobjeff they are started together when starting spotify itself (and run in the background)

from spotifyapi-net.

stuntguy3000 avatar stuntguy3000 commented on May 26, 2024

@JohnnyCrazy Windows 10, 64Bit, Home Premium.

from spotifyapi-net.

stuntguy3000 avatar stuntguy3000 commented on May 26, 2024

Resolved ^

from spotifyapi-net.

racquemis avatar racquemis commented on May 26, 2024

This bug seems to be back. Unable to control volume using latest binary on Windows 10 with up-to-date spotify client.

from spotifyapi-net.

JimmyAppelt avatar JimmyAppelt commented on May 26, 2024

@racquemis did it work before ?

from spotifyapi-net.

racquemis avatar racquemis commented on May 26, 2024

I couldn't tell. I've started using the Api yesterday.
Everything works great except changing volume, muting and unmuting.

Also doesn't work on the older Windows Server 2012 R2 OS.

from spotifyapi-net.

JohnnyCrazy avatar JohnnyCrazy commented on May 26, 2024

@racquemis Volume-Control is only possible on >Windows 7 (code)

I can't reproduce it, Volume-Control is still working.

from spotifyapi-net.

racquemis avatar racquemis commented on May 26, 2024

Hmm strange, can't get it to work. Throws the CO
Mexception on all my win7 win10, server 2012 systems. It's not like the mute command is difficult to use, so I don't know what I'm doing wrong.

from spotifyapi-net.

JohnnyCrazy avatar JohnnyCrazy commented on May 26, 2024

Does the full exception say anything in particular?

from spotifyapi-net.

racquemis avatar racquemis commented on May 26, 2024

Typical, now it suddenly works first try. Just did a recompile. Sorry for wasting your time. I have no idea why it suddenly starting working, but i won't complain ;)

from spotifyapi-net.

JohnnyCrazy avatar JohnnyCrazy commented on May 26, 2024

Haha, no problem, I know this feeling. 😅
If you run into any other issues, feel free to open an issue

from spotifyapi-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.