Add GPL modules

This commit is contained in:
Andrew Rabert
2018-12-27 18:27:57 -05:00
parent 9bac3ac616
commit a86b71899e
648 changed files with 50005 additions and 123 deletions

View File

@@ -0,0 +1,27 @@

namespace MediaBrowser.Model.Session
{
/// <summary>
/// Class BrowseRequest
/// </summary>
public class BrowseRequest
{
/// <summary>
/// Artist, Genre, Studio, Person, or any kind of BaseItem
/// </summary>
/// <value>The type of the item.</value>
public string ItemType { get; set; }
/// <summary>
/// Gets or sets the item id.
/// </summary>
/// <value>The item id.</value>
public string ItemId { get; set; }
/// <summary>
/// Gets or sets the name of the item.
/// </summary>
/// <value>The name of the item.</value>
public string ItemName { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
using MediaBrowser.Model.Dlna;
using System;
namespace MediaBrowser.Model.Session
{
public class ClientCapabilities
{
public string[] PlayableMediaTypes { get; set; }
public string[] SupportedCommands { get; set; }
public bool SupportsMediaControl { get; set; }
public bool SupportsContentUploading { get; set; }
public string MessageCallbackUrl { get; set; }
public string PushToken { get; set; }
public string PushTokenType { get; set; }
public bool SupportsPersistentIdentifier { get; set; }
public bool SupportsSync { get; set; }
public DeviceProfile DeviceProfile { get; set; }
public string AppStoreUrl { get; set; }
public string IconUrl { get; set; }
public ClientCapabilities()
{
PlayableMediaTypes = new string[] {};
SupportedCommands = new string[] {};
SupportsPersistentIdentifier = true;
}
}
}

View File

@@ -0,0 +1,19 @@
using System.Collections.Generic;
using System;
namespace MediaBrowser.Model.Session
{
public class GeneralCommand
{
public string Name { get; set; }
public Guid ControllingUserId { get; set; }
public Dictionary<string, string> Arguments { get; set; }
public GeneralCommand()
{
Arguments = new Dictionary<string, string>();
}
}
}

View File

@@ -0,0 +1,46 @@
namespace MediaBrowser.Model.Session
{
/// <summary>
/// This exists simply to identify a set of known commands.
/// </summary>
public enum GeneralCommandType
{
MoveUp = 0,
MoveDown = 1,
MoveLeft = 2,
MoveRight = 3,
PageUp = 4,
PageDown = 5,
PreviousLetter = 6,
NextLetter = 7,
ToggleOsd = 8,
ToggleContextMenu = 9,
Select = 10,
Back = 11,
TakeScreenshot = 12,
SendKey = 13,
SendString = 14,
GoHome = 15,
GoToSettings = 16,
VolumeUp = 17,
VolumeDown = 18,
Mute = 19,
Unmute = 20,
ToggleMute = 21,
SetVolume = 22,
SetAudioStreamIndex = 23,
SetSubtitleStreamIndex = 24,
ToggleFullscreen = 25,
DisplayContent = 26,
GoToSearch = 27,
DisplayMessage = 28,
SetRepeatMode = 29,
ChannelUp = 30,
ChannelDown = 31,
SetMaxStreamingBitrate = 31,
Guide = 32,
ToggleStats = 33,
PlayMediaSource = 34,
PlayTrailers = 35
}
}

View File

@@ -0,0 +1,12 @@

namespace MediaBrowser.Model.Session
{
public class MessageCommand
{
public string Header { get; set; }
public string Text { get; set; }
public long? TimeoutMs { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
namespace MediaBrowser.Model.Session
{
/// <summary>
/// Enum PlayCommand
/// </summary>
public enum PlayCommand
{
/// <summary>
/// The play now
/// </summary>
PlayNow = 0,
/// <summary>
/// The play next
/// </summary>
PlayNext = 1,
/// <summary>
/// The play last
/// </summary>
PlayLast = 2,
/// <summary>
/// The play instant mix
/// </summary>
PlayInstantMix = 3,
/// <summary>
/// The play shuffle
/// </summary>
PlayShuffle = 4
}
}

View File

@@ -0,0 +1,9 @@
namespace MediaBrowser.Model.Session
{
public enum PlayMethod
{
Transcode = 0,
DirectStream = 1,
DirectPlay = 2
}
}

View File

@@ -0,0 +1,43 @@
using MediaBrowser.Model.Services;
using System;
namespace MediaBrowser.Model.Session
{
/// <summary>
/// Class PlayRequest
/// </summary>
public class PlayRequest
{
/// <summary>
/// Gets or sets the item ids.
/// </summary>
/// <value>The item ids.</value>
[ApiMember(Name = "ItemIds", Description = "The ids of the items to play, comma delimited", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST", AllowMultiple = true)]
public Guid[] ItemIds { get; set; }
/// <summary>
/// Gets or sets the start position ticks that the first item should be played at
/// </summary>
/// <value>The start position ticks.</value>
[ApiMember(Name = "StartPositionTicks", Description = "The starting position of the first item.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
public long? StartPositionTicks { get; set; }
/// <summary>
/// Gets or sets the play command.
/// </summary>
/// <value>The play command.</value>
[ApiMember(Name = "PlayCommand", Description = "The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
public PlayCommand PlayCommand { get; set; }
/// <summary>
/// Gets or sets the controlling user identifier.
/// </summary>
/// <value>The controlling user identifier.</value>
public Guid ControllingUserId { get; set; }
public int? SubtitleStreamIndex { get; set; }
public int? AudioStreamIndex { get; set; }
public string MediaSourceId { get; set; }
public int? StartIndex { get; set; }
}
}

View File

@@ -0,0 +1,119 @@
using MediaBrowser.Model.Dto;
using System;
namespace MediaBrowser.Model.Session
{
/// <summary>
/// Class PlaybackProgressInfo.
/// </summary>
public class PlaybackProgressInfo
{
/// <summary>
/// Gets or sets a value indicating whether this instance can seek.
/// </summary>
/// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
public bool CanSeek { get; set; }
/// <summary>
/// Gets or sets the item.
/// </summary>
/// <value>The item.</value>
public BaseItemDto Item { get; set; }
/// <summary>
/// Gets or sets the item identifier.
/// </summary>
/// <value>The item identifier.</value>
public Guid ItemId { get; set; }
/// <summary>
/// Gets or sets the session id.
/// </summary>
/// <value>The session id.</value>
public string SessionId { get; set; }
/// <summary>
/// Gets or sets the media version identifier.
/// </summary>
/// <value>The media version identifier.</value>
public string MediaSourceId { get; set; }
/// <summary>
/// Gets or sets the index of the audio stream.
/// </summary>
/// <value>The index of the audio stream.</value>
public int? AudioStreamIndex { get; set; }
/// <summary>
/// Gets or sets the index of the subtitle stream.
/// </summary>
/// <value>The index of the subtitle stream.</value>
public int? SubtitleStreamIndex { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is paused.
/// </summary>
/// <value><c>true</c> if this instance is paused; otherwise, <c>false</c>.</value>
public bool IsPaused { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is muted.
/// </summary>
/// <value><c>true</c> if this instance is muted; otherwise, <c>false</c>.</value>
public bool IsMuted { get; set; }
/// <summary>
/// Gets or sets the position ticks.
/// </summary>
/// <value>The position ticks.</value>
public long? PositionTicks { get; set; }
public long? PlaybackStartTimeTicks { get; set; }
/// <summary>
/// Gets or sets the volume level.
/// </summary>
/// <value>The volume level.</value>
public int? VolumeLevel { get; set; }
public int? Brightness { get; set; }
public string AspectRatio { get; set; }
/// <summary>
/// Gets or sets the play method.
/// </summary>
/// <value>The play method.</value>
public PlayMethod PlayMethod { get; set; }
/// <summary>
/// Gets or sets the live stream identifier.
/// </summary>
/// <value>The live stream identifier.</value>
public string LiveStreamId { 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 repeat mode.
/// </summary>
/// <value>The repeat mode.</value>
public RepeatMode RepeatMode { get; set; }
public QueueItem[] NowPlayingQueue { get; set; }
public string PlaylistItemId { get; set; }
}
public enum RepeatMode
{
RepeatNone = 0,
RepeatAll = 1,
RepeatOne = 2
}
public class QueueItem {
public Guid Id { get; set; }
public string PlaylistItemId { get; set; }
}
}

View File

@@ -0,0 +1,10 @@

namespace MediaBrowser.Model.Session
{
/// <summary>
/// Class PlaybackStartInfo.
/// </summary>
public class PlaybackStartInfo : PlaybackProgressInfo
{
}
}

View File

@@ -0,0 +1,57 @@
using MediaBrowser.Model.Dto;
using System;
namespace MediaBrowser.Model.Session
{
/// <summary>
/// Class PlaybackStopInfo.
/// </summary>
public class PlaybackStopInfo
{
/// <summary>
/// Gets or sets the item.
/// </summary>
/// <value>The item.</value>
public BaseItemDto Item { get; set; }
/// <summary>
/// Gets or sets the item identifier.
/// </summary>
/// <value>The item identifier.</value>
public Guid ItemId { get; set; }
/// <summary>
/// Gets or sets the session id.
/// </summary>
/// <value>The session id.</value>
public string SessionId { get; set; }
/// <summary>
/// Gets or sets the media version identifier.
/// </summary>
/// <value>The media version identifier.</value>
public string MediaSourceId { get; set; }
/// <summary>
/// Gets or sets the position ticks.
/// </summary>
/// <value>The position ticks.</value>
public long? PositionTicks { get; set; }
/// <summary>
/// Gets or sets the live stream identifier.
/// </summary>
/// <value>The live stream identifier.</value>
public string LiveStreamId { 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 a value indicating whether this <see cref="PlaybackStopInfo"/> is failed.
/// </summary>
/// <value><c>true</c> if failed; otherwise, <c>false</c>.</value>
public bool Failed { get; set; }
public string NextMediaType { get; set; }
public string PlaylistItemId { get; set; }
public QueueItem[] NowPlayingQueue { get; set; }
}
}

View File

@@ -0,0 +1,65 @@
namespace MediaBrowser.Model.Session
{
public class PlayerStateInfo
{
/// <summary>
/// Gets or sets the now playing position ticks.
/// </summary>
/// <value>The now playing position ticks.</value>
public long? PositionTicks { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance can seek.
/// </summary>
/// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
public bool CanSeek { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is paused.
/// </summary>
/// <value><c>true</c> if this instance is paused; otherwise, <c>false</c>.</value>
public bool IsPaused { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is muted.
/// </summary>
/// <value><c>true</c> if this instance is muted; otherwise, <c>false</c>.</value>
public bool IsMuted { get; set; }
/// <summary>
/// Gets or sets the volume level.
/// </summary>
/// <value>The volume level.</value>
public int? VolumeLevel { get; set; }
/// <summary>
/// Gets or sets the index of the now playing audio stream.
/// </summary>
/// <value>The index of the now playing audio stream.</value>
public int? AudioStreamIndex { get; set; }
/// <summary>
/// Gets or sets the index of the now playing subtitle stream.
/// </summary>
/// <value>The index of the now playing subtitle stream.</value>
public int? SubtitleStreamIndex { get; set; }
/// <summary>
/// Gets or sets the now playing media version identifier.
/// </summary>
/// <value>The now playing media version identifier.</value>
public string MediaSourceId { get; set; }
/// <summary>
/// Gets or sets the play method.
/// </summary>
/// <value>The play method.</value>
public PlayMethod? PlayMethod { get; set; }
/// <summary>
/// Gets or sets the repeat mode.
/// </summary>
/// <value>The repeat mode.</value>
public RepeatMode RepeatMode { get; set; }
}
}

View File

@@ -0,0 +1,43 @@

namespace MediaBrowser.Model.Session
{
/// <summary>
/// Enum PlaystateCommand
/// </summary>
public enum PlaystateCommand
{
/// <summary>
/// The stop
/// </summary>
Stop,
/// <summary>
/// The pause
/// </summary>
Pause,
/// <summary>
/// The unpause
/// </summary>
Unpause,
/// <summary>
/// The next track
/// </summary>
NextTrack,
/// <summary>
/// The previous track
/// </summary>
PreviousTrack,
/// <summary>
/// The seek
/// </summary>
Seek,
/// <summary>
/// The rewind
/// </summary>
Rewind,
/// <summary>
/// The fast forward
/// </summary>
FastForward,
PlayPause
}
}

View File

@@ -0,0 +1,15 @@
namespace MediaBrowser.Model.Session
{
public class PlaystateRequest
{
public PlaystateCommand Command { get; set; }
public long? SeekPositionTicks { get; set; }
/// <summary>
/// Gets or sets the controlling user identifier.
/// </summary>
/// <value>The controlling user identifier.</value>
public string ControllingUserId { get; set; }
}
}

View File

@@ -0,0 +1,117 @@
using MediaBrowser.Model.Dto;
using System;
using System.Collections.Generic;
namespace MediaBrowser.Model.Session
{
public class SessionInfoDto
{
/// <summary>
/// Gets or sets the supported commands.
/// </summary>
/// <value>The supported commands.</value>
public string[] SupportedCommands { get; set; }
/// <summary>
/// Gets or sets the playable media types.
/// </summary>
/// <value>The playable media types.</value>
public string[] PlayableMediaTypes { get; set; }
/// <summary>
/// Gets or sets the id.
/// </summary>
/// <value>The id.</value>
public string Id { get; set; }
public string ServerId { get; set; }
/// <summary>
/// Gets or sets the user id.
/// </summary>
/// <value>The user id.</value>
public string UserId { get; set; }
/// <summary>
/// Gets or sets the user primary image tag.
/// </summary>
/// <value>The user primary image tag.</value>
public string UserPrimaryImageTag { get; set; }
public string RemoteEndPoint { get; set; }
/// <summary>
/// Gets or sets the name of the user.
/// </summary>
/// <value>The name of the user.</value>
public string UserName { get; set; }
/// <summary>
/// Gets or sets the additional users present.
/// </summary>
/// <value>The additional users present.</value>
public SessionUserInfo[] AdditionalUsers { get; set; }
/// <summary>
/// Gets or sets the application version.
/// </summary>
/// <value>The application version.</value>
public string ApplicationVersion { get; set; }
/// <summary>
/// Gets or sets the type of the client.
/// </summary>
/// <value>The type of the client.</value>
public string Client { get; set; }
/// <summary>
/// Gets or sets the last activity date.
/// </summary>
/// <value>The last activity date.</value>
public DateTime LastActivityDate { get; set; }
/// <summary>
/// Gets or sets the name of the device.
/// </summary>
/// <value>The name of the device.</value>
public string DeviceName { get; set; }
public string DeviceType { get; set; }
/// <summary>
/// Gets or sets the now playing item.
/// </summary>
/// <value>The now playing item.</value>
public BaseItemDto NowPlayingItem { get; set; }
/// <summary>
/// Gets or sets the device id.
/// </summary>
/// <value>The device id.</value>
public string DeviceId { get; set; }
/// <summary>
/// Gets or sets the application icon URL.
/// </summary>
/// <value>The application icon URL.</value>
public string AppIconUrl { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [supports remote control].
/// </summary>
/// <value><c>true</c> if [supports remote control]; otherwise, <c>false</c>.</value>
public bool SupportsRemoteControl { get; set; }
public PlayerStateInfo PlayState { get; set; }
public TranscodingInfo TranscodingInfo { get; set; }
public SessionInfoDto()
{
AdditionalUsers = new SessionUserInfo[] { };
PlayableMediaTypes = new string[] {};
SupportedCommands = new string[] {};
}
}
}

View File

@@ -0,0 +1,21 @@
using System;
namespace MediaBrowser.Model.Session
{
/// <summary>
/// Class SessionUserInfo.
/// </summary>
public class SessionUserInfo
{
/// <summary>
/// Gets or sets the user identifier.
/// </summary>
/// <value>The user identifier.</value>
public Guid UserId { get; set; }
/// <summary>
/// Gets or sets the name of the user.
/// </summary>
/// <value>The name of the user.</value>
public string UserName { get; set; }
}
}

View File

@@ -0,0 +1,55 @@
using System.Collections.Generic;
namespace MediaBrowser.Model.Session
{
public class TranscodingInfo
{
public string AudioCodec { get; set; }
public string VideoCodec { get; set; }
public string Container { get; set; }
public bool IsVideoDirect { get; set; }
public bool IsAudioDirect { get; set; }
public int? Bitrate { get; set; }
public float? Framerate { get; set; }
public double? CompletionPercentage { get; set; }
public int? Width { get; set; }
public int? Height { get; set; }
public int? AudioChannels { get; set; }
public TranscodeReason[] TranscodeReasons { get; set; }
public TranscodingInfo()
{
TranscodeReasons = new TranscodeReason[] { };
}
}
public enum TranscodeReason
{
ContainerNotSupported = 0,
VideoCodecNotSupported = 1,
AudioCodecNotSupported = 2,
ContainerBitrateExceedsLimit = 3,
AudioBitrateNotSupported = 4,
AudioChannelsNotSupported = 5,
VideoResolutionNotSupported = 6,
UnknownVideoStreamInfo = 7,
UnknownAudioStreamInfo = 8,
AudioProfileNotSupported = 9,
AudioSampleRateNotSupported = 10,
AnamorphicVideoNotSupported = 11,
InterlacedVideoNotSupported = 12,
SecondaryAudioNotSupported = 13,
RefFramesNotSupported = 14,
VideoBitDepthNotSupported = 15,
VideoBitrateNotSupported = 16,
VideoFramerateNotSupported = 17,
VideoLevelNotSupported = 18,
VideoProfileNotSupported = 19,
AudioBitDepthNotSupported = 20,
SubtitleCodecNotSupported = 21,
DirectPlayError = 22
}
}

View File

@@ -0,0 +1,23 @@
using MediaBrowser.Model.Dto;
using System.Collections.Generic;
namespace MediaBrowser.Model.Session
{
/// <summary>
/// Class UserDataChangeInfo
/// </summary>
public class UserDataChangeInfo
{
/// <summary>
/// Gets or sets the user id.
/// </summary>
/// <value>The user id.</value>
public string UserId { get; set; }
/// <summary>
/// Gets or sets the user data list.
/// </summary>
/// <value>The user data list.</value>
public UserItemDataDto[] UserDataList { get; set; }
}
}