repo creation with initial code after cloning public repo

This commit is contained in:
2026-02-19 07:36:25 -05:00
commit 460884fea3
2860 changed files with 650825 additions and 0 deletions
@@ -0,0 +1,34 @@
#pragma warning disable CS1591
using System;
namespace MediaBrowser.Model.MediaInfo
{
public static class AudioCodec
{
public static string GetFriendlyName(string codec)
{
if (codec.Length == 0)
{
return codec;
}
if (string.Equals(codec, "ac3", StringComparison.OrdinalIgnoreCase))
{
return "Dolby Digital";
}
if (string.Equals(codec, "eac3", StringComparison.OrdinalIgnoreCase))
{
return "Dolby Digital+";
}
if (string.Equals(codec, "dca", StringComparison.OrdinalIgnoreCase))
{
return "DTS";
}
return codec.ToUpperInvariant();
}
}
}
@@ -0,0 +1,30 @@
using System;
namespace MediaBrowser.Model.MediaInfo;
/// <summary>
/// How is the audio index determined.
/// </summary>
[Flags]
public enum AudioIndexSource
{
/// <summary>
/// The default index when no preference is specified.
/// </summary>
None = 0,
/// <summary>
/// The index is calculated whether the track is marked as default or not.
/// </summary>
Default = 1 << 0,
/// <summary>
/// The index is calculated whether the track is in preferred language or not.
/// </summary>
Language = 1 << 1,
/// <summary>
/// The index is specified by the user.
/// </summary>
User = 1 << 2
}
@@ -0,0 +1,41 @@
#nullable disable
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.MediaInfo;
/// <summary>
/// Represents the result of BDInfo output.
/// </summary>
public class BlurayDiscInfo
{
/// <summary>
/// Gets or sets the media streams.
/// </summary>
/// <value>The media streams.</value>
public MediaStream[] MediaStreams { get; set; }
/// <summary>
/// Gets or sets the run time ticks.
/// </summary>
/// <value>The run time ticks.</value>
public long? RunTimeTicks { get; set; }
/// <summary>
/// Gets or sets the files.
/// </summary>
/// <value>The files.</value>
public string[] Files { get; set; }
/// <summary>
/// Gets or sets the playlist name.
/// </summary>
/// <value>The playlist name.</value>
public string PlaylistName { get; set; }
/// <summary>
/// Gets or sets the chapters.
/// </summary>
/// <value>The chapters.</value>
public double[] Chapters { get; set; }
}
@@ -0,0 +1,14 @@
namespace MediaBrowser.Model.MediaInfo;
/// <summary>
/// Interface IBlurayExaminer.
/// </summary>
public interface IBlurayExaminer
{
/// <summary>
/// Gets the disc info.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>BlurayDiscInfo.</returns>
BlurayDiscInfo GetDiscInfo(string path);
}
@@ -0,0 +1,48 @@
#nullable disable
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using MediaBrowser.Model.Dlna;
namespace MediaBrowser.Model.MediaInfo
{
public class LiveStreamRequest
{
public LiveStreamRequest()
{
EnableDirectPlay = true;
EnableDirectStream = true;
AlwaysBurnInSubtitleWhenTranscoding = false;
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
}
public string OpenToken { get; set; }
public Guid UserId { get; set; }
public string PlaySessionId { get; set; }
public int? MaxStreamingBitrate { get; set; }
public long? StartTimeTicks { get; set; }
public int? AudioStreamIndex { get; set; }
public int? SubtitleStreamIndex { get; set; }
public int? MaxAudioChannels { get; set; }
public Guid ItemId { get; set; }
public DeviceProfile DeviceProfile { get; set; }
public bool EnableDirectPlay { get; set; }
public bool EnableDirectStream { get; set; }
public bool AlwaysBurnInSubtitleWhenTranscoding { get; set; }
public IReadOnlyList<MediaProtocol> DirectPlayProtocols { get; set; }
}
}
@@ -0,0 +1,16 @@
#pragma warning disable CS1591
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.MediaInfo
{
public class LiveStreamResponse
{
public LiveStreamResponse(MediaSourceInfo mediaSource)
{
MediaSource = mediaSource;
}
public MediaSourceInfo MediaSource { get; }
}
}
+86
View File
@@ -0,0 +1,86 @@
#nullable disable
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.MediaInfo
{
public class MediaInfo : MediaSourceInfo, IHasProviderIds
{
public MediaInfo()
{
Chapters = Array.Empty<ChapterInfo>();
Artists = Array.Empty<string>();
AlbumArtists = Array.Empty<string>();
Studios = Array.Empty<string>();
Genres = Array.Empty<string>();
People = Array.Empty<BaseItemPerson>();
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
}
public ChapterInfo[] Chapters { get; set; }
/// <summary>
/// Gets or sets the album.
/// </summary>
/// <value>The album.</value>
public string Album { get; set; }
/// <summary>
/// Gets or sets the artists.
/// </summary>
/// <value>The artists.</value>
public string[] Artists { get; set; }
/// <summary>
/// Gets or sets the album artists.
/// </summary>
/// <value>The album artists.</value>
public string[] AlbumArtists { get; set; }
/// <summary>
/// Gets or sets the studios.
/// </summary>
/// <value>The studios.</value>
public string[] Studios { get; set; }
public string[] Genres { get; set; }
public string ShowName { get; set; }
public string ForcedSortName { get; set; }
public int? IndexNumber { get; set; }
public int? ParentIndexNumber { get; set; }
public int? ProductionYear { get; set; }
public DateTime? PremiereDate { get; set; }
public BaseItemPerson[] People { get; set; }
public Dictionary<string, string> ProviderIds { get; set; }
/// <summary>
/// Gets or sets the official rating.
/// </summary>
/// <value>The official rating.</value>
public string OfficialRating { get; set; }
/// <summary>
/// Gets or sets the official rating description.
/// </summary>
/// <value>The official rating description.</value>
public string OfficialRatingDescription { get; set; }
/// <summary>
/// Gets or sets the overview.
/// </summary>
/// <value>The overview.</value>
public string Overview { get; set; }
}
}
@@ -0,0 +1,15 @@
#pragma warning disable CS1591
namespace MediaBrowser.Model.MediaInfo
{
public enum MediaProtocol
{
File = 0,
Http = 1,
Rtmp = 2,
Rtsp = 3,
Udp = 4,
Rtp = 5,
Ftp = 6
}
}
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.MediaInfo
{
/// <summary>
/// Class PlaybackInfoResponse.
/// </summary>
public class PlaybackInfoResponse
{
/// <summary>
/// Initializes a new instance of the <see cref="PlaybackInfoResponse" /> class.
/// </summary>
public PlaybackInfoResponse()
{
MediaSources = Array.Empty<MediaSourceInfo>();
}
/// <summary>
/// Gets or sets the media sources.
/// </summary>
/// <value>The media sources.</value>
public IReadOnlyList<MediaSourceInfo> MediaSources { get; set; }
/// <summary>
/// Gets or sets the play session identifier.
/// </summary>
/// <value>The play session identifier.</value>
public string? PlaySessionId { get; set; }
/// <summary>
/// Gets or sets the error code.
/// </summary>
/// <value>The error code.</value>
public PlaybackErrorCode? ErrorCode { get; set; }
}
}
@@ -0,0 +1,15 @@
#pragma warning disable CS1591
namespace MediaBrowser.Model.MediaInfo
{
public static class SubtitleFormat
{
public const string SRT = "srt";
public const string SUBRIP = "subrip";
public const string SSA = "ssa";
public const string ASS = "ass";
public const string VTT = "vtt";
public const string WEBVTT = "webvtt";
public const string TTML = "ttml";
}
}
@@ -0,0 +1,21 @@
#pragma warning disable CS1591
namespace MediaBrowser.Model.MediaInfo
{
public class SubtitleTrackEvent
{
public SubtitleTrackEvent(string id, string text)
{
Id = id;
Text = text;
}
public string Id { get; set; }
public string Text { get; set; }
public long StartPositionTicks { get; set; }
public long EndPositionTicks { get; set; }
}
}
@@ -0,0 +1,17 @@
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
namespace MediaBrowser.Model.MediaInfo
{
public class SubtitleTrackInfo
{
public SubtitleTrackInfo()
{
TrackEvents = Array.Empty<SubtitleTrackEvent>();
}
public IReadOnlyList<SubtitleTrackEvent> TrackEvents { get; set; }
}
}
@@ -0,0 +1,11 @@
#pragma warning disable CS1591
namespace MediaBrowser.Model.MediaInfo
{
public enum TransportStreamTimestamp
{
None,
Zero,
Valid
}
}