Добавьте файлы проекта.

This commit is contained in:
FrigaT
2026-04-10 12:12:33 +03:00
parent 9615cf42ee
commit 11d0b0d72f
383 changed files with 9661 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
using YandexMusic.API.Models.Album;
using YandexMusic.API.Models.Artist;
using YandexMusic.API.Models.Common;
namespace YandexMusic.API.Models.Track
{
public class YTrack : YBaseModel, IEquatable<YTrack>
{
public List<YAlbum> Albums { get; set; }
public List<YArtist> Artists { get; set; }
public bool Available { get; set; }
public bool AvailableForPremiumUsers { get; set; }
public bool AvailableFullWithoutPermission { get; set; }
public List<string> AvailableForOptions { get; set; }
public string BackgroundVideoUri { get; set; }
public bool Best { get; set; }
public YChart Chart { get; set; }
public string ContentWarning { get; set; }
public string CoverUri { get; set; }
public List<string> ClipIds { get; set; }
public YDerivedColors DerivedColors { get; set; }
public List<string> Disclaimers { get; set; }
public long DurationMs { get; set; }
public string Error { get; set; }
public YTrackFade Fade { get; set; }
public long FileSize { get; set; }
public string Id { get; set; }
public bool IsSuitableForChildren { get; set; }
public YMajor Major { get; set; }
public YTrackNormalization Normalization { get; set; }
public YTrackNormalizationR128 R128 { get; set; }
public string OgImage { get; set; }
public bool LyricsAvailable { get; set; }
public YLyricsInfo LyricsInfo { get; set; }
public string PlayerId { get; set; }
public long PreviewDurationMs { get; set; }
public YPodcastEpisodeType PodcastEpisodeType { get; set; }
public DateTime PubDate { get; set; }
public string RealId { get; set; }
public bool RememberPosition { get; set; }
public string ShortDescription { get; set; }
public List<string> SpecialAudioResources { get; set; }
public string StorageDir { get; set; }
public YTrack Substituted { get; set; }
public string Title { get; set; }
public YTrackSharingFlag TrackSharingFlag { get; set; }
public YTrackSource TrackSource { get; set; }
public string Type { get; set; }
public string Version { get; set; }
public YTrackAlbumPair GetKey()
{
return new YTrackAlbumPair
{
Id = Id,
AlbumId = Albums?.FirstOrDefault()?.Id
};
}
#region IEquatable
public bool Equals(YTrack other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return GetKey().Equals(other.GetKey());
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != GetType()) return false;
return Equals((YTrack)obj);
}
public override int GetHashCode()
{
return GetKey().GetHashCode();
}
#endregion IEquatable
}
}

View File

@@ -0,0 +1,40 @@
namespace YandexMusic.API.Models.Track
{
public class YTrackAlbumPair : IEquatable<YTrackAlbumPair>
{
public string AlbumId { get; set; }
public string Id { get; set; }
public override string ToString()
{
return string.Join(":", new[] { Id, AlbumId }.Where(s => !string.IsNullOrEmpty(s)));
}
#region IEquatable
public bool Equals(YTrackAlbumPair other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return string.Equals(Id, other.Id) && string.Equals(AlbumId, other.AlbumId);
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != GetType()) return false;
return Equals((YTrackAlbumPair)obj);
}
public override int GetHashCode()
{
unchecked
{
return ((Id != null ? Id.GetHashCode() : 0) * 397) ^ (AlbumId != null ? AlbumId.GetHashCode() : 0);
}
}
#endregion IEquatable
}
}

View File

@@ -0,0 +1,38 @@
namespace YandexMusic.API.Models.Track
{
public class YTrackContainer : IEquatable<YTrackContainer>
{
public string Id { get; set; }
public string AlbumId { get; set; }
public decimal OriginalIndex { get; set; }
public decimal OriginalShuffleIndex { get; set; }
public bool Recent { get; set; }
public DateTime Timestamp { get; set; }
public YTrack Track { get; set; }
#region IEquatable
public bool Equals(YTrackContainer other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Track.GetKey() == other.Track.GetKey();
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != GetType()) return false;
return Equals((YTrackContainer)obj);
}
public override int GetHashCode()
{
return Track != null ? Track.GetHashCode() : 0;
}
#endregion IEquatable
}
}

View File

@@ -0,0 +1,10 @@
namespace YandexMusic.API.Models.Track
{
public class YTrackFade
{
public decimal InStart { get; set; }
public decimal InStop { get; set; }
public decimal OutStart { get; set; }
public decimal OutStop { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace YandexMusic.API.Models.Track
{
public class YTrackNormalization
{
public double Gain { get; set; }
public double Peak { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace YandexMusic.API.Models.Track
{
public class YTrackNormalizationR128
{
public double I { get; set; }
public double Tp { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace YandexMusic.API.Models.Track
{
public class YTrackPosition
{
public int? Index { get; set; }
public int? Volume { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace YandexMusic.API.Models.Track
{
public class YTrackSimilar
{
public YTrack Track { get; set; }
public List<YTrack> SimilarTracks { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using YandexMusic.API.Models.Common;
namespace YandexMusic.API.Models.Track
{
public class YTrackSupplement
{
public string Id { get; set; }
public List<YClip> Clips { get; set; }
public YLyrics Lyrics { get; set; }
public List<YVideo> Videos { get; set; }
}
}