Skip to content

Commit

Permalink
fix: key not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Istador committed Apr 27, 2024
1 parent ecc1337 commit 0309a73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Server/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public void CleanMetadataOnNewConnection() {
}

public TagPacket? GetTagPacket() {
var time = (Time?) this.Metadata?["time"];
var seek = (bool?) this.Metadata?["seeking"];
var time = (this.Metadata.ContainsKey("time") ? (Time?) this.Metadata["time"] : null);
var seek = (this.Metadata.ContainsKey("seeking") ? (bool?) this.Metadata["seeking"] : null);
if (time == null && seek == null) { return null; }
return new TagPacket {
UpdateType = (seek != null ? TagPacket.TagUpdate.State : 0) | (time != null ? TagPacket.TagUpdate.Time: 0),
Expand Down

0 comments on commit 0309a73

Please sign in to comment.