Skip to content

Commit

Permalink
Tag prefixes separated by a unicode Block Elements character
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevinjil committed Jan 3, 2025
1 parent 8a51bed commit 3354992
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Jellyfin.Xtream/Service/StreamService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,21 @@ public static ParsedName ParseName(string name)
return string.Empty;
});

// Tag prefixes separated by the a character in the unicode Block Elements range
int stripLength = 0;
for (int i = 0; i < title.Length; i++)
{
char c = title[i];
if (c >= '\u2580' && c <= '\u259F')
{
tags.Add(title[stripLength..i].Trim());
stripLength = i + 1;
}
}

return new ParsedName
{
Title = title.Trim(),
Title = title[stripLength..].Trim(),
Tags = tags.ToArray(),
};
}
Expand Down

0 comments on commit 3354992

Please sign in to comment.