mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-21 01:07:32 +01:00
add a check for unknown categories
This commit is contained in:
parent
8799e8c995
commit
fd7abd5c32
@ -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