Skip to content

Commit

Permalink
- Adding error message if End Credits Overlay Widget does not have an…
Browse files Browse the repository at this point in the history
…y captured data for the session to play
  • Loading branch information
Matthew Olivo committed Oct 9, 2024
1 parent 7666f3f commit 5ba24e8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
19 changes: 13 additions & 6 deletions MixItUp.Base/Model/Overlay/OverlayEndCreditsV3Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -570,13 +570,20 @@ public async Task PlayCredits()
}
}

Dictionary<string, object> data = new Dictionary<string, object>();
data["Order"] = applicableSections.Select(s => s.ID);
data["Columns"] = applicableSections.ToDictionary(s => s.ID, s => s.Columns);
data["Types"] = applicableSections.ToDictionary(s => s.ID, s => s.Type.ToString());
data["Items"] = sectionItems;
if (applicableSections.Count > 0)
{
Dictionary<string, object> data = new Dictionary<string, object>();
data["Order"] = applicableSections.Select(s => s.ID);
data["Columns"] = applicableSections.ToDictionary(s => s.ID, s => s.Columns);
data["Types"] = applicableSections.ToDictionary(s => s.ID, s => s.Type.ToString());
data["Items"] = sectionItems;

await this.CallFunction("startCredits", data);
await this.CallFunction("startCredits", data);
}
else
{
await ServiceManager.Get<ChatService>().SendMessage(Resources.OverlayWidgetEndCreditsNoDataCurrentlyAvailable);
}
}

protected override async Task Loaded()
Expand Down
9 changes: 9 additions & 0 deletions MixItUp.Base/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions MixItUp.Base/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -10787,4 +10787,7 @@ We have detected that you have more than 1 Overlay Endpoint created, meaning the
<data name="Head" xml:space="preserve">
<value>Head</value>
</data>
<data name="OverlayWidgetEndCreditsNoDataCurrentlyAvailable" xml:space="preserve">
<value>ERROR: End Credits Overlay Widget could not be run because there is not currently captured data from this session.</value>
</data>
</root>

0 comments on commit 5ba24e8

Please sign in to comment.