/// <summary> /// Нормализовать все свойства модели. /// </summary> /// <returns>Нормализованная модель <see cref="Track"/>.</returns> public Track Normalize() { string NormalizeUrl(string url) { return(!url.IsNullOrEmpty() && !url.StartsWith("http") ? $@"https://{url.Trim()}" : url); } Name = Name?.Trim(); LyricsUrl = NormalizeUrl(LyricsUrl); TabsUrl = NormalizeUrl(TabsUrl); BassAndDrumsUrl = NormalizeUrl(BassAndDrumsUrl); Tune = Tune.TrimPhrase(); if (MetronomeSpeed.HasValue && MetronomeSpeed < 0) { MetronomeSpeed = null; } return(this); }