예제 #1
0
        public static AlbumDetails UpdateDetails(string albumPath, AlbumDetails incoming)
        {
            var fileName = System.IO.Path.Combine(albumPath, DETAILS_FILE_NAME);
            var details  = AlbumDetails.Load(fileName);

            details.Merge(incoming);
            details.Save(fileName);
            return(details);
        }
예제 #2
0
        public void LoadDetails()
        {
            var details = AlbumDetails.Load(DetailsFilePath);

            if (string.IsNullOrWhiteSpace(details.CoverImageUrl))
            {
                details.CoverImageUrl = Images?.FirstOrDefault()?.Url;
            }
            if (string.IsNullOrWhiteSpace(details.Name))
            {
                details.Name = Path.AsDirectoryPath().Name;
            }
            this.Details = details;
        }