Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
8 tasks done
perokhe opened this issue Jun 25, 2024 · 0 comments · Fixed by #1627
Closed
8 tasks done

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

perokhe opened this issue Jun 25, 2024 · 0 comments · Fixed by #1627

Comments

@perokhe
Copy link
Contributor

perokhe commented Jun 25, 2024

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.

if (Environment.isExternalStorageManager()) {
inputFile?.openOutputStream()?.bufferedWriter().use { writer ->
writer?.write(it)
}
mpvConf.set(it)

There is another file that has this method but only for Android 11 and above:

val configDir = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && Environment.isExternalStorageManager()) {
storageManager.getMPVConfigDirectory()!!.filePath!!
} else {
if (playerPreferences.mpvScripts().get()) {
copyScripts()
}
applicationContext.filesDir.path
}

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • If this is an issue with an official anime extension, I should be opening an issue in the extensions repository.
  • If this is an issue with a manga extension, report it to the manga source extension project you added it from.
  • I have gone through the FAQ and troubleshooting guide.
  • I have updated the app to version 0.15.3.0.
  • I have updated all installed extensions.
  • I will fill out all of the requested information in this form.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant