Skip to content

Commit

Permalink
Fix an exception that is thrown when the manifest is valid but does n…
Browse files Browse the repository at this point in the history
…ot contain trackId data (#248)
  • Loading branch information
schuettecarsten authored May 29, 2024
1 parent 6102723 commit 8caf933
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migrationTool/contracts/Manifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public Track(StreamType type)
// Check if the track is stored as one file per fragment.
public bool IsMultiFile => string.IsNullOrEmpty(Path.GetExtension(Source));

public uint TrackID => uint.Parse(Parameters.Single(p => p.Name == "trackID").Value);
public uint TrackID => uint.Parse(Parameters?.SingleOrDefault(p => p.Name == "trackID")?.Value ?? "1");

public string TrackName => Parameters.SingleOrDefault(p => p.Name == "trackName")?.Value ?? Type.ToString().ToLower();
public string TrackName => Parameters?.SingleOrDefault(p => p.Name == "trackName")?.Value ?? Type.ToString().ToLower();
}

public class VideoTrack : Track
Expand Down

0 comments on commit 8caf933

Please sign in to comment.