Dudemanguy / mpv-manga-reader

Manga reading script for mpv
GNU General Public License v3.0
120 stars 4 forks source link

Fix double page mode crash with vo=libmpv and add .cbr to ext array #16

Closed ripose-jp closed 1 year ago

ripose-jp commented 1 year ago

When using a vo that doesn't support display-width and display-height, the aspect_ratio variable is compared to a number while uninitialized. This leads to the script crashing.

This fixes the issue by returning true out of check_aspect_ratio() when display-width or display-height returns nil. This produces desirable behavior in most cases since it doesn't lock out vos where aspect ratio is inaccessible from using double page mode.


Add .cbr to the extension array. It appears to be a format that's just a wrapper around some standard archive format, so it works without tweaking in mpv.

Dudemanguy commented 1 year ago

Thanks!