Skip to content

Commit

Permalink
fix: silently suppress the double namespace issue
Browse files Browse the repository at this point in the history
Silently suppress the double namespace issue for the internal plugin id on entities when we encounter it.
  • Loading branch information
revam committed Feb 3, 2025
1 parent bb49486 commit 7c02056
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Shokofin/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ public static bool TryGetSeasonId(this IHasProviderIds providerIds, [NotNullWhen
seasonId = internalId.StartsWith(ShokoInternalId.Namespace, StringComparison.OrdinalIgnoreCase)
? internalId[ShokoInternalId.Namespace.Length..]
: null;

// Fix for dev users with the double namespace issue.
if (!string.IsNullOrEmpty(seasonId) && seasonId.StartsWith(ShokoInternalId.Namespace, StringComparison.OrdinalIgnoreCase))
seasonId = seasonId[ShokoInternalId.Namespace.Length..];

return !string.IsNullOrEmpty(seasonId);
}

Expand Down

0 comments on commit 7c02056

Please sign in to comment.