Closed atridey closed 3 years ago
I tried changing it back to see if it works without this change, but now I run into issue #26. I tried cloning from the repo in PR #27, but it doesn't solve the error. I don't know what's happening anymore.
@daspartho Like i note earlier, please note that this PR breaks the re-launching of Spotify on Linux.
The command on linux is completely lowercase and commands are case-sensitve,
I'll also add that it doesn't change anything on Windows. It broke itself and fixed itself. I reverted the code to how it was before this PR and it worked fine. It's my fault for causing the confusion as I should have drafted the PR.
Ouch! Could be painful.
Actually for windows, the best way would be to use the exact installation path.
Using which
to find Spotify requires that its location be on the PATH environment variable and this is the case on Windows by default.
And as for killing the task, the case doesn't matter on windows, as I've explained earlier.
Yes, that's the solution to the problem. Since it somehow worked earlier without Spotify being on the PATH variable I disregarded the instruction to add it, but adding it fixed it. I'll add this to the documentation and create a PR to revert this one.
I made PR #37 to set it back to as it was before.
As at https://github.com/daspartho/SpotiByeAds/pull/29/commits/0b5668ce05c2c21b61aea7c92b179542be6649cf in my PR #29, it works fine on linux and theoretically should on Windows (i've not tested it because of the lack of windows on my side but i tested the path on wine
and it should be correct for any Windows system).
It's not yet merged though.
Did you test it and it works?... I don't develop on windows, so i'm quite unable to test it.
Nevertheless, i'm still quite experienced with windows and it's CLI and as far as i know, it's case-insensitive, this is also majorly due to how Windows presents/abstracts NTFS, which windows systems use.
Also,
shutil.which()
is primarily for linux OSes in this case since on Windows and Mac, the location of the Spotify executable is not added to the PATH environment variable by default.While on linux where it correctly applies, the common filesystems and CLI are case sensitive. The executable on linux is completely lower-case.
So, I'm not sure this PR actually fixes anything, except you tested it and there was a difference.