Various updates.
This commit is contained in:
@@ -23,4 +23,26 @@ public class Song
|
||||
public string? FileDirectory => Directory.GetParent(FileName)?.Name;
|
||||
public string? FileType => Path.GetExtension(FileName)?.Replace(".", "").ToUpper();
|
||||
public string ShortFileName => Path.GetFileNameWithoutExtension(FileName);
|
||||
|
||||
public void Update(Song song)
|
||||
{
|
||||
if (string.Equals(song.FileName, FileName, StringComparison.OrdinalIgnoreCase) == false)
|
||||
return;
|
||||
|
||||
Size = song.Size;
|
||||
LastModified = song.LastModified;
|
||||
Title = song.Title;
|
||||
Album = song.Album;
|
||||
Artists = song.Artists;
|
||||
AlbumArtists = song.AlbumArtists;
|
||||
DiscNumber = song.DiscNumber;
|
||||
TrackNumber = song.TrackNumber;
|
||||
Length = song.Length;
|
||||
Year = song.Year;
|
||||
Genre = song.Genre;
|
||||
BitRate = song.BitRate;
|
||||
SampleRate = song.SampleRate;
|
||||
ImageName = song?.ImageName;
|
||||
ImageHash = song?.ImageHash;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user