mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-07-01 20:30:41 +00:00
feat: Added a comparator for MusicInfo.
This commit is contained in:
parent
d00d735bf0
commit
aa3c45101b
@ -57,5 +57,25 @@ namespace ZonyLrcTools.Common
|
|||||||
|
|
||||||
[GeneratedRegex(@"[<>:""/\\|?*]")]
|
[GeneratedRegex(@"[<>:""/\\|?*]")]
|
||||||
private static partial Regex InvalidFilePathRegex();
|
private static partial Regex InvalidFilePathRegex();
|
||||||
|
|
||||||
|
public static bool operator ==(MusicInfo? left, MusicInfo? right)
|
||||||
|
{
|
||||||
|
if (left is null && right is null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (left is null || right is null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return left.FilePath == right.FilePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool operator !=(MusicInfo? left, MusicInfo? right)
|
||||||
|
{
|
||||||
|
return !(left == right);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user