Deal correctly wih the case that python-mpv is not installed#83
Deal correctly wih the case that python-mpv is not installed#83marioortizmanero merged 1 commit intovidify:masterfrom Nowa-Ammerlaan:master
Conversation
|
Fixed the flake8 errors, Travis CI should be happy now (I hope) |
|
Hi, thanks for the PR! A few comments/questions:
|
The
Aaah yes, good idea. This shouldn't be to difficult to fix I think, will look into it.
Not so far, but I haven't tested In fact, this should work for every package that is listed as If Vidify is installed with
IMO, it is up to the distribution's package manager to deal with the non-python dependencies of e.g. python-vlc. If python-vlc is installed without vlc actually being installed, then that is a problem with the packaging of python-vlc in that distribution. I think we can safely assume that if python-vlc is present that vlc is also present on the system (On Gentoo at least dev-python/python-vlc depends on media-video/vlc)
Will look into this as well, shouldn't be too hard to get it display an alternative text. |
My idea is using inheritance, having a base of which
I can do that. I'll make sure it doesn't break Windows support.
Ah nice, I didn't know that. I'll just make sure it works well with other packages and leave it be then.
Yes, that's what I was thinking. The only way to do this would be with a
Anyway I really like the idea of not even showing APIs and Players that aren't available on the OS. It's probably confusing for some users, and it's not necessary. |
I've got no clue about this to be honest, but I think I addressed all your other comments. I think we should adjust |
|
Well looks like I broke something with mpv 😢 Not sure why that is all of a sudden not working, I don't think I changed anything related specifically to mpv in the last push |
|
I don't get this error running |
I've thought of moving dependencies like dark mode or tekore to I think it's better that the package has 5 more dependencies by default than that the user has to spend 10 minutes reading documentation and what packages they have to install. I would leave as it is. On the other side, different installation methods can solve this. For example, the binary download is probably the most user-friendly, and already includes all extra requirements. Thus, advanced users like those using Arch, Gentoo, or pip, would be able to customize the installation.
You're right... I've restarted the tests on https://travis-ci.com/github/vidify/vidify/jobs/313324477#L1502 A new version of |
Well it doesn't really matter because I can just sed out the lines in
I was using 0.4.5, just version bumped to 0.4.6, same results. :( |
|
I was working today on the Dockerfile to start using GitHub actions instead of Travis CI, and for some reason this bug doesn't happen anymore on the new CI... https://github.com/vidify/vidify/runs/562797112?check_suite_focus=true Do you still get the error? I can't reproduce it on my machine. |
No, I only get this error in this PR, not when running the tests locally on my system.
How strange 😕 I wonder what is causing this to occur specifically in Travis CI. Do the GitHub actions fetch and install (python-)mpv in the same way that Travis does it? |
|
Travis wasn't using a docker container back then. Only the Travis container itself, which was Ubuntu Xenial 16.04. Now GitHub Actions uses Debian Buster 10, so it might have been that... Anway it's most likely something unrelated to Vidify. Can you do a rebase or a commit so that the new CI does a run? |
It's working now 😄 |
|
Alright! I'm merging the PR, thanks. I'll also (try to) do a small refactor to have a base |
|
Awesome, thanks! |


Hi,
At the moment, if e.g. python-mpv is not installed it is still selectable in the menu. Selecting it an pressing continue (predictably) causes Vidify to crash. This PR checks if packages are installed, and if not, it sets the relevant API/player to unavailable (similar to how swspotify is unavailable on Linux).
I use the
is_installedfunction that we used before insetup.py. I also went ahead and added the platform properties to the players, this makes it possible to (in the future maybe) have players which are platform specific.I added the
is_installedchecks for all APIs and players (and not just python-mpv), this has three reasons:orlogic to set dependencies (e.g. python-vlcorpython-mpv) but Gentoo's portage definitely can. Doing it like this allows me to utilize the full power of Gentoo's portage. Like this I don't have to have the ebuild hard depend on python-vlc/tekore etc. instead I can e.g. check if the user uses media-video/vlc and in that case pull in python-vlc (DEPEND="vlc? ( dev-python/python-vlc )). Or as another example: (DEPEND="dbus? ( dev-python/pydbus )), which would only pull in pydbus as a dependency if the user uses dbus. Handy for users who for whatever reason do not want to use dbus on their system, those can then pull in tekore as a dependency instead. This PR makes sure that vidify doesn't crash if some of these dependencies are missing, thus allowing my ebuild to utilize the full modularity of vidify.I did some testing with this and it is producing the expected results for me. However, I'm not sure if I got
swspotifyright, this might or might not need capitalization (SwSpotify), but I'm not on windows so I can't test that.