Refactor identifiers and add subtitle UI
This commit is contained in:
@@ -25,7 +25,7 @@ namespace BriarQueen.Data.Identifiers
|
||||
|
||||
public static class SubtitleIdentifiers
|
||||
{
|
||||
public static readonly IReadOnlyDictionary<SubtitleKey, SubtitleEntry> Subtitles =
|
||||
private static readonly IReadOnlyDictionary<SubtitleKey, SubtitleEntry> _subtitles =
|
||||
new ReadOnlyDictionary<SubtitleKey, SubtitleEntry>(
|
||||
new Dictionary<SubtitleKey, SubtitleEntry>
|
||||
{
|
||||
@@ -34,22 +34,22 @@ namespace BriarQueen.Data.Identifiers
|
||||
|
||||
public static bool TryGet(SubtitleKey key, out SubtitleEntry entry)
|
||||
{
|
||||
return Subtitles.TryGetValue(key, out entry);
|
||||
return _subtitles.TryGetValue(key, out entry);
|
||||
}
|
||||
|
||||
public static string GetText(SubtitleKey key)
|
||||
{
|
||||
return Subtitles.TryGetValue(key, out var entry) ? entry.Text : string.Empty;
|
||||
return _subtitles.TryGetValue(key, out var entry) ? entry.Text : string.Empty;
|
||||
}
|
||||
|
||||
public static float GetPreferredDuration(SubtitleKey key)
|
||||
{
|
||||
return Subtitles.TryGetValue(key, out var entry) ? entry.PreferredDurationSeconds : 0f;
|
||||
return _subtitles.TryGetValue(key, out var entry) ? entry.PreferredDurationSeconds : 0f;
|
||||
}
|
||||
|
||||
public static IEnumerable<SubtitleKey> GetAllKeys()
|
||||
{
|
||||
return Subtitles.Keys;
|
||||
return _subtitles.Keys;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user