mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-13 04:56:49 +01:00
add a check for unknown categories
This commit is contained in:
parent
9daa0c84f3
commit
fbcfe1f4a1
@ -585,6 +585,10 @@ public abstract class SponsorBlockUtils {
|
||||
String categoryKey = categorySelectionObject.getString("name");
|
||||
SponsorBlockSettings.SegmentInfo category = SponsorBlockSettings.SegmentInfo.byCategoryKey(categoryKey);
|
||||
|
||||
if (category == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int desktopKey = categorySelectionObject.getInt("option");
|
||||
SponsorBlockSettings.SegmentBehaviour behaviour = SponsorBlockSettings.SegmentBehaviour.byDesktopKey(desktopKey);
|
||||
editor.putString(category.key, behaviour.key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user