celluloid-player / celluloid

A simple GTK+ frontend for mpv
https://celluloid-player.github.io
GNU General Public License v3.0
1.14k stars 90 forks source link

Incorrect minimum version calculation seems to result wrong log #921

Closed ilsubyeega closed 8 months ago

ilsubyeega commented 8 months ago

(io.github.celluloid_player.Celluloid:772985): celluloid-WARNING **: 19:54:34.026: Minimum mpv version requirement (0.29.0) not met

After changing the code on src/celluloid-mpv.c into this:

@@ -435,10 +435,11 @@

        if(!check_mpv_version(mpv_version))
        {
-               g_warning(      "Minimum mpv version requirement (%d.%d.%d) not met",
+               g_warning(      "Minimum mpv version requirement (%d.%d.%d) not met, has (%s)",
                                MIN_MPV_MAJOR,
                                MIN_MPV_MINOR,
-                               MIN_MPV_PATCH );
+                               MIN_MPV_PATCH,
+                mpv_version );
        }

Results Minimum mpv version requirement (0.29.0) not met, has (mpv v0.37.0), which is higher than minimum version requirement. If this was intentional, I think a different log message would be better.

gnome-mpv commented 8 months ago

For some reason, the version string format is inconsistent between distros. On my Gentoo machine, there's no 'v' prefix before the version number, but on my Arch machine, there is one. I'll update the version checking code to handle both.