aniyomi: Mpv scrips not working in android 13 and 14
Steps to reproduce
I have been using this script in my android 10 Lenovo tablet to skip openings of untracked local animes, however when I tried this in android 14 OnePlus tablet it doesnt seem to work , both devices are running r7540
local opts = {
skip_min_length = 80, -- Minimum chapter length to skip (in seconds)
skip_max_length = 90, -- Maximum chapter length to skip (in seconds)
}
-- No need for options.read_options(opts) since we define them here
function get_chapter_time(index)
return mp.get_property_number("chapter-list/" .. index .. "/time")
end
function skip_chapters()
local current_chapter = mp.get_property_number("chapter")
local chapter_count = mp.get_property_number("chapter-list/count")
if not current_chapter or not chapter_count then return end
local current_chapter_time = get_chapter_time(current_chapter)
local next_chapter_time = get_chapter_time(current_chapter + 1)
if not current_chapter_time or not next_chapter_time then return end
local chapter_length = next_chapter_time - current_chapter_time
if chapter_length >= opts.skip_min_length and chapter_length <= opts.skip_max_length then
local chapter_title = mp.get_property("chapter-list/" .. current_chapter .. "/title") or "Unknown"
mp.set_property_number("chapter", current_chapter + 1)
mp.osd_message("Skipped chapter: " .. chapter_title, 2) -- Display message for 2 seconds
end
end
mp.observe_property("chapter", "number", function(name, value)
if value then
skip_chapters()
end
end)
I have placed the script file in aniyomi scripts folder in both devices and used same video file for testing.
Expected behavior (Lenovo tablet) video
Version info
-
Lenovo tab (script working) App version: 0.15.3.0-7540 (standard, 9c30b3633, 123, 2024-05-15T00:59Z) Android version: 10 (SDK 29; build TB-8505F_S301106_230914_BMP) Android build ID: TB-8505F_S301106_230914_BMP Device brand: Lenovo Device manufacturer: LENOVO Device name: 8505F (LenovoTB-8505F) Device model: Lenovo TB-8505F WebView: Android System WebView 122.0.6261.119 MPV version: 4d32db2 Libplacebo version: v7.349.0 FFmpeg version: n7.0
-
OnePlus Pad (script not working) App version: 0.15.3.0-7540 (standard, 9c30b3633, 123, 2024-05-15T00:59Z) Android version: 14 (SDK 34; build OPD2203_14.0.0.600(EX01)) Android build ID: OPD2203_14.0.0.600(EX01) Device brand: OnePlus Device manufacturer: OnePlus Device name: OP59BCL1 (OPD2203) Device model: OPD2203 WebView: Android System WebView 123.0.6312.99 MPV version: 4d32db2 Libplacebo version: v7.349.0 FFmpeg version: n7.0
-
Poco X3 pro (script not working) App version: 0.15.3.0-7540 (standard, 9c30b3633, 123, 2024-05-15T00:59Z) Android version: 13 (SDK 33; build TKQ1.221013.002 test-keys) Android build ID: TKQ1.221013.002 test-keys Device brand: POCO Device manufacturer: Xiaomi Device name: bhima (bhima_in) Device model: M2102J20SI WebView: Android System WebView 124.0.6367.123 MPV version: 4d32db2 Libplacebo version: v7.349.0 FFmpeg version: n7.0
Expected behavior
The script should work on all three devices
Actual behavior
Not Working on 2 Devices
Crash logs
No response
Aniyomi version
0.15.3.0-7540
Android version
Android 10 (Lenovo tab),Android 13 (Poco X3 pro),Android 14 (OnePlus Pad))
Device
Lenovo tab M10 HD,OnePlus Pad,Poco X3 pro
Other details
No response
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 extension, I should be opening an issue in the extensions repository.
- If this is an issue with an official manga extension and this issue can be replicated in the Tachiyomi app, that I should be opening an issue in Tachiyomi’s extensions repository.
- 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.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 15 (5 by maintainers)
I definitely want to fix it
Didn’t get much feedback but the fix worked for the person who opened the issue, so closing this for now.
Okay, so I managed to get scripts working by adding a new permission to manage all external files. What you need to do is:
Please tell me if this works for you all.