aniyomiorg / aniyomi

An app for manga and anime
https://aniyomi.org
Apache License 2.0
4.51k stars 279 forks source link

Advanced player settings not working in Android 10 and below #1626

Closed perokhe closed 2 days ago

perokhe commented 1 week ago

Steps to reproduce

  1. Go to advanced player settings
  2. Modify mpv config, mpv input or enable mpv scripts
  3. App crashes

Expected behavior

Should be able to modify those 3 preferences

Actual behavior

Can't modify them and the app crashes

Crash logs

aniyomi_crash_logs.txt

Aniyomi version

0.15.3.0-7567

Android version

Android 10

Device

Samsung Galaxy Note 9

Other details

I believe the problem is in three lines of the same file that have isExternalStorageManager. This method is for Android 11 and above.

https://github.com/aniyomiorg/aniyomi/blob/9baf6adce541ea5126f841b9043cb767585d0cd1/app/src/main/java/eu/kanade/presentation/more/settings/screen/AdvancedPlayerSettingsScreen.kt#L50-L54

There is another file that has this method but only for Android 11 and above: https://github.com/aniyomiorg/aniyomi/blob/224430ec0d9689f16eb1a63541c7f175761b0a65/app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerActivity.kt#L597-L604

Acknowledgements