Skip to content

Commit c980ab7

Browse files
committed
Adding a helper method.
1 parent 58afb92 commit c980ab7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/SoundFingerprinting/Data/AVHashes.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ public AVHashes(Hashes? audio, Hashes? video, AVFingerprintingTime fingerprintin
6868
/// <summary>
6969
/// Gets relative to timestamp of the current <see cref="AVHashes"/> instance.
7070
/// </summary>
71-
public DateTime RelativeTo => Audio?.RelativeTo ?? Video?.RelativeTo ?? DateTime.MinValue;
71+
public DateTime RelativeTo => (Audio?.RelativeTo ?? Video?.RelativeTo) ?? DateTime.MinValue;
72+
73+
/// <summary>
74+
/// Gets duration in seconds of the current <see cref="AVHashes"/> instance.
75+
/// </summary>
76+
public double DurationInSeconds => (Audio?.DurationInSeconds ?? Video?.DurationInSeconds) ?? 0;
7277

7378
/// <summary>
7479
/// Gets hashes stream id.

0 commit comments

Comments
 (0)