commit
1933f15977
11
MediaBrowser.Controller/Channels/IChannelItem.cs
Normal file
11
MediaBrowser.Controller/Channels/IChannelItem.cs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Controller.Channels
|
||||||
|
{
|
||||||
|
public interface IChannelItem : IHasImages, IHasTags
|
||||||
|
{
|
||||||
|
string ChannelId { get; set; }
|
||||||
|
|
||||||
|
string ExternalId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
18
MediaBrowser.Controller/Channels/IChannelMediaItem.cs
Normal file
18
MediaBrowser.Controller/Channels/IChannelMediaItem.cs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
using MediaBrowser.Model.Channels;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Controller.Channels
|
||||||
|
{
|
||||||
|
public interface IChannelMediaItem : IChannelItem
|
||||||
|
{
|
||||||
|
long? RunTimeTicks { get; set; }
|
||||||
|
string MediaType { get; }
|
||||||
|
|
||||||
|
ChannelMediaContentType ContentType { get; set; }
|
||||||
|
|
||||||
|
ExtraType? ExtraType { get; set; }
|
||||||
|
|
||||||
|
List<ChannelMediaInfo> ChannelMediaSources { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -190,6 +190,13 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the name of the service.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name of the service.</value>
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public string ServiceName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If this content came from an external service, the id of the content on that service
|
/// If this content came from an external service, the id of the content on that service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.LiveTv
|
|
||||||
{
|
|
||||||
public interface ILiveTvItem : IHasId
|
|
||||||
{
|
|
||||||
string ServiceName { get; set; }
|
|
||||||
string ExternalId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="recording">The recording.</param>
|
/// <param name="recording">The recording.</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
Task DeleteRecording(ILiveTvRecording recording);
|
Task DeleteRecording(BaseItem recording);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cancels the timer.
|
/// Cancels the timer.
|
||||||
|
@ -156,7 +156,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
/// <param name="id">The identifier.</param>
|
/// <param name="id">The identifier.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <returns>LiveTvRecording.</returns>
|
/// <returns>LiveTvRecording.</returns>
|
||||||
Task<ILiveTvRecording> GetInternalRecording(string id, CancellationToken cancellationToken);
|
Task<BaseItem> GetInternalRecording(string id, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the recording stream.
|
/// Gets the recording stream.
|
||||||
|
@ -396,7 +396,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="recording">The recording.</param>
|
/// <param name="recording">The recording.</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
Task OnRecordingFileDeleted(ILiveTvRecording recording);
|
Task OnRecordingFileDeleted(BaseItem recording);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the sat ini mappings.
|
/// Gets the sat ini mappings.
|
||||||
|
|
|
@ -9,8 +9,10 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.LiveTv
|
namespace MediaBrowser.Controller.LiveTv
|
||||||
{
|
{
|
||||||
public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData, ILiveTvItem, IHasStartDate, IHasProgramAttributes
|
public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData, IHasStartDate, IHasProgramAttributes
|
||||||
{
|
{
|
||||||
|
string ServiceName { get; set; }
|
||||||
|
string ExternalId { get; set; }
|
||||||
string ChannelId { get; }
|
string ChannelId { get; }
|
||||||
string MediaType { get; }
|
string MediaType { get; }
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
return name + "-" + Name + (EpisodeTitle ?? string.Empty);
|
return name + "-" + Name + (EpisodeTitle ?? string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ServiceName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether this instance is owned item.
|
/// Gets a value indicating whether this instance is owned item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -11,7 +11,7 @@ using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.LiveTv
|
namespace MediaBrowser.Controller.LiveTv
|
||||||
{
|
{
|
||||||
public class LiveTvChannel : BaseItem, IHasMediaSources, ILiveTvItem
|
public class LiveTvChannel : BaseItem, IHasMediaSources
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the user data key.
|
/// Gets the user data key.
|
||||||
|
@ -59,12 +59,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
/// <value>The type of the channel.</value>
|
/// <value>The type of the channel.</value>
|
||||||
public ChannelType ChannelType { get; set; }
|
public ChannelType ChannelType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name of the service.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name of the service.</value>
|
|
||||||
public string ServiceName { get; set; }
|
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override LocationType LocationType
|
public override LocationType LocationType
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,7 @@ using MediaBrowser.Model.Entities;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.LiveTv
|
namespace MediaBrowser.Controller.LiveTv
|
||||||
{
|
{
|
||||||
public class LiveTvProgram : BaseItem, ILiveTvItem, IHasLookupInfo<LiveTvProgramLookupInfo>, IHasStartDate, IHasProgramAttributes
|
public class LiveTvProgram : BaseItem, IHasLookupInfo<LiveTvProgramLookupInfo>, IHasStartDate, IHasProgramAttributes
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the user data key.
|
/// Gets the user data key.
|
||||||
|
@ -39,13 +39,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
return base.CreateUserDataKey();
|
return base.CreateUserDataKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public string ServiceName { get; set; }
|
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override SourceType SourceType
|
public override SourceType SourceType
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,8 +72,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
return base.CreateUserDataKey();
|
return base.CreateUserDataKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ServiceName { get; set; }
|
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override string MediaType
|
public override string MediaType
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,8 +85,10 @@
|
||||||
<Compile Include="Channels\ChannelSearchInfo.cs" />
|
<Compile Include="Channels\ChannelSearchInfo.cs" />
|
||||||
<Compile Include="Channels\ChannelVideoItem.cs" />
|
<Compile Include="Channels\ChannelVideoItem.cs" />
|
||||||
<Compile Include="Channels\IChannel.cs" />
|
<Compile Include="Channels\IChannel.cs" />
|
||||||
|
<Compile Include="Channels\IChannelItem.cs" />
|
||||||
<Compile Include="Channels\IChannelManager.cs" />
|
<Compile Include="Channels\IChannelManager.cs" />
|
||||||
<Compile Include="Channels\Channel.cs" />
|
<Compile Include="Channels\Channel.cs" />
|
||||||
|
<Compile Include="Channels\IChannelMediaItem.cs" />
|
||||||
<Compile Include="Channels\IHasCacheKey.cs" />
|
<Compile Include="Channels\IHasCacheKey.cs" />
|
||||||
<Compile Include="Channels\IIndexableChannel.cs" />
|
<Compile Include="Channels\IIndexableChannel.cs" />
|
||||||
<Compile Include="Channels\InternalAllChannelMediaQuery.cs" />
|
<Compile Include="Channels\InternalAllChannelMediaQuery.cs" />
|
||||||
|
@ -202,7 +204,6 @@
|
||||||
<Compile Include="Library\UserDataSaveEventArgs.cs" />
|
<Compile Include="Library\UserDataSaveEventArgs.cs" />
|
||||||
<Compile Include="LiveTv\IHasRegistrationInfo.cs" />
|
<Compile Include="LiveTv\IHasRegistrationInfo.cs" />
|
||||||
<Compile Include="LiveTv\IListingsProvider.cs" />
|
<Compile Include="LiveTv\IListingsProvider.cs" />
|
||||||
<Compile Include="LiveTv\ILiveTvItem.cs" />
|
|
||||||
<Compile Include="LiveTv\ITunerHost.cs" />
|
<Compile Include="LiveTv\ITunerHost.cs" />
|
||||||
<Compile Include="LiveTv\RecordingGroup.cs" />
|
<Compile Include="LiveTv\RecordingGroup.cs" />
|
||||||
<Compile Include="LiveTv\RecordingStatusChangedEventArgs.cs" />
|
<Compile Include="LiveTv\RecordingStatusChangedEventArgs.cs" />
|
||||||
|
|
|
@ -470,9 +470,6 @@
|
||||||
<Compile Include="..\MediaBrowser.Model\Dto\ImageOptions.cs">
|
<Compile Include="..\MediaBrowser.Model\Dto\ImageOptions.cs">
|
||||||
<Link>Dto\ImageOptions.cs</Link>
|
<Link>Dto\ImageOptions.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\Dto\ItemByNameCounts.cs">
|
|
||||||
<Link>Dto\ItemByNameCounts.cs</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\MediaBrowser.Model\Dto\ItemCounts.cs">
|
<Compile Include="..\MediaBrowser.Model\Dto\ItemCounts.cs">
|
||||||
<Link>Dto\ItemCounts.cs</Link>
|
<Link>Dto\ItemCounts.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -444,9 +444,6 @@
|
||||||
<Compile Include="..\MediaBrowser.Model\Dto\ImageOptions.cs">
|
<Compile Include="..\MediaBrowser.Model\Dto\ImageOptions.cs">
|
||||||
<Link>Dto\ImageOptions.cs</Link>
|
<Link>Dto\ImageOptions.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\Dto\ItemByNameCounts.cs">
|
|
||||||
<Link>Dto\ItemByNameCounts.cs</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\MediaBrowser.Model\Dto\ItemCounts.cs">
|
<Compile Include="..\MediaBrowser.Model\Dto\ItemCounts.cs">
|
||||||
<Link>Dto\ItemCounts.cs</Link>
|
<Link>Dto\ItemCounts.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -62,12 +62,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
/// <value><c>true</c> if this instance is port authorized; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is port authorized; otherwise, <c>false</c>.</value>
|
||||||
public bool IsPortAuthorized { get; set; }
|
public bool IsPortAuthorized { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the item by name path.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The item by name path.</value>
|
|
||||||
public string ItemsByNamePath { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the metadata path.
|
/// Gets or sets the metadata path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -792,6 +792,11 @@ namespace MediaBrowser.Model.Dto
|
||||||
/// <value>The locked fields.</value>
|
/// <value>The locked fields.</value>
|
||||||
public List<MetadataFields> LockedFields { get; set; }
|
public List<MetadataFields> LockedFields { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the trailer count.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The trailer count.</value>
|
||||||
|
public int? TrailerCount { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the movie count.
|
/// Gets or sets the movie count.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dto
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Class ItemByNameCounts
|
|
||||||
/// </summary>
|
|
||||||
public class ItemByNameCounts
|
|
||||||
{
|
|
||||||
public string UserId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the total count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The total count.</value>
|
|
||||||
public int TotalCount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the adult video count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The adult video count.</value>
|
|
||||||
public int AdultVideoCount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the movie count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The movie count.</value>
|
|
||||||
public int MovieCount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the series count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The series count.</value>
|
|
||||||
public int SeriesCount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the episode count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The episode count.</value>
|
|
||||||
public int EpisodeCount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the game count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The game count.</value>
|
|
||||||
public int GameCount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the trailer count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The trailer count.</value>
|
|
||||||
public int TrailerCount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the song count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The song count.</value>
|
|
||||||
public int SongCount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the album count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The album count.</value>
|
|
||||||
public int AlbumCount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the music video count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The music video count.</value>
|
|
||||||
public int MusicVideoCount { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -215,7 +215,6 @@
|
||||||
<Compile Include="Dto\IItemDto.cs" />
|
<Compile Include="Dto\IItemDto.cs" />
|
||||||
<Compile Include="Dto\ImageByNameInfo.cs" />
|
<Compile Include="Dto\ImageByNameInfo.cs" />
|
||||||
<Compile Include="Dto\ImageInfo.cs" />
|
<Compile Include="Dto\ImageInfo.cs" />
|
||||||
<Compile Include="Dto\ItemByNameCounts.cs" />
|
|
||||||
<Compile Include="Dto\ItemCounts.cs" />
|
<Compile Include="Dto\ItemCounts.cs" />
|
||||||
<Compile Include="Dto\ItemIndex.cs" />
|
<Compile Include="Dto\ItemIndex.cs" />
|
||||||
<Compile Include="Dto\RatingType.cs" />
|
<Compile Include="Dto\RatingType.cs" />
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace MediaBrowser.Model.Providers
|
||||||
{
|
{
|
||||||
public class SubtitleOptions
|
public class SubtitleOptions
|
||||||
{
|
{
|
||||||
public bool SkipIfGraphicalSubtitlesPresent { get; set; }
|
public bool SkipIfEmbeddedSubtitlesPresent { get; set; }
|
||||||
public bool SkipIfAudioTrackMatches { get; set; }
|
public bool SkipIfAudioTrackMatches { get; set; }
|
||||||
public string[] DownloadLanguages { get; set; }
|
public string[] DownloadLanguages { get; set; }
|
||||||
public bool DownloadMovieSubtitles { get; set; }
|
public bool DownloadMovieSubtitles { get; set; }
|
||||||
|
|
|
@ -532,7 +532,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
_subtitleManager)
|
_subtitleManager)
|
||||||
.DownloadSubtitles(video,
|
.DownloadSubtitles(video,
|
||||||
currentStreams.Concat(externalSubtitleStreams).ToList(),
|
currentStreams.Concat(externalSubtitleStreams).ToList(),
|
||||||
subtitleOptions.SkipIfGraphicalSubtitlesPresent,
|
subtitleOptions.SkipIfEmbeddedSubtitlesPresent,
|
||||||
subtitleOptions.SkipIfAudioTrackMatches,
|
subtitleOptions.SkipIfAudioTrackMatches,
|
||||||
subtitleOptions.DownloadLanguages,
|
subtitleOptions.DownloadLanguages,
|
||||||
cancellationToken).ConfigureAwait(false);
|
cancellationToken).ConfigureAwait(false);
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
|
|
||||||
public async Task<List<string>> DownloadSubtitles(Video video,
|
public async Task<List<string>> DownloadSubtitles(Video video,
|
||||||
List<MediaStream> mediaStreams,
|
List<MediaStream> mediaStreams,
|
||||||
bool skipIfGraphicalSubtitlesPresent,
|
bool skipIfEmbeddedSubtitlesPresent,
|
||||||
bool skipIfAudioTrackMatches,
|
bool skipIfAudioTrackMatches,
|
||||||
IEnumerable<string> languages,
|
IEnumerable<string> languages,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
|
@ -59,7 +59,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var downloaded = await DownloadSubtitles(video, mediaStreams, skipIfGraphicalSubtitlesPresent, skipIfAudioTrackMatches, lang, mediaType, cancellationToken)
|
var downloaded = await DownloadSubtitles(video, mediaStreams, skipIfEmbeddedSubtitlesPresent, skipIfAudioTrackMatches, lang, mediaType, cancellationToken)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
if (downloaded)
|
if (downloaded)
|
||||||
|
@ -78,7 +78,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
|
|
||||||
private async Task<bool> DownloadSubtitles(Video video,
|
private async Task<bool> DownloadSubtitles(Video video,
|
||||||
List<MediaStream> mediaStreams,
|
List<MediaStream> mediaStreams,
|
||||||
bool skipIfGraphicalSubtitlesPresent,
|
bool skipIfEmbeddedSubtitlesPresent,
|
||||||
bool skipIfAudioTrackMatches,
|
bool skipIfAudioTrackMatches,
|
||||||
string language,
|
string language,
|
||||||
VideoContentType mediaType,
|
VideoContentType mediaType,
|
||||||
|
@ -107,8 +107,8 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
// There's an internal subtitle stream for this language
|
// There's an internal subtitle stream for this language
|
||||||
if (skipIfGraphicalSubtitlesPresent &&
|
if (skipIfEmbeddedSubtitlesPresent &&
|
||||||
mediaStreams.Any(i => i.Type == MediaStreamType.Subtitle && !i.IsTextSubtitleStream && string.Equals(i.Language, language, StringComparison.OrdinalIgnoreCase)))
|
mediaStreams.Any(i => i.Type == MediaStreamType.Subtitle && !i.IsExternal && string.Equals(i.Language, language, StringComparison.OrdinalIgnoreCase)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
_subtitleManager)
|
_subtitleManager)
|
||||||
.DownloadSubtitles(video,
|
.DownloadSubtitles(video,
|
||||||
mediaStreams,
|
mediaStreams,
|
||||||
options.SkipIfGraphicalSubtitlesPresent,
|
options.SkipIfEmbeddedSubtitlesPresent,
|
||||||
options.SkipIfAudioTrackMatches,
|
options.SkipIfAudioTrackMatches,
|
||||||
options.DownloadLanguages,
|
options.DownloadLanguages,
|
||||||
cancellationToken).ConfigureAwait(false);
|
cancellationToken).ConfigureAwait(false);
|
||||||
|
|
|
@ -145,7 +145,6 @@ namespace MediaBrowser.Server.Implementations.Configuration
|
||||||
{
|
{
|
||||||
var newConfig = (ServerConfiguration)newConfiguration;
|
var newConfig = (ServerConfiguration)newConfiguration;
|
||||||
|
|
||||||
ValidateItemByNamePath(newConfig);
|
|
||||||
ValidatePathSubstitutions(newConfig);
|
ValidatePathSubstitutions(newConfig);
|
||||||
ValidateMetadataPath(newConfig);
|
ValidateMetadataPath(newConfig);
|
||||||
ValidateSslCertificate(newConfig);
|
ValidateSslCertificate(newConfig);
|
||||||
|
@ -189,28 +188,6 @@ namespace MediaBrowser.Server.Implementations.Configuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Replaces the item by name path.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="newConfig">The new configuration.</param>
|
|
||||||
/// <exception cref="System.IO.DirectoryNotFoundException"></exception>
|
|
||||||
private void ValidateItemByNamePath(ServerConfiguration newConfig)
|
|
||||||
{
|
|
||||||
var newPath = newConfig.ItemsByNamePath;
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(newPath)
|
|
||||||
&& !string.Equals(Configuration.ItemsByNamePath ?? string.Empty, newPath))
|
|
||||||
{
|
|
||||||
// Validate
|
|
||||||
if (!FileSystem.DirectoryExists(newPath))
|
|
||||||
{
|
|
||||||
throw new DirectoryNotFoundException(string.Format("{0} does not exist.", newPath));
|
|
||||||
}
|
|
||||||
|
|
||||||
EnsureWriteAccess(newPath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Validates the metadata path.
|
/// Validates the metadata path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -457,6 +457,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||||
dto.EpisodeCount = taggedItems.Count(i => i is Episode);
|
dto.EpisodeCount = taggedItems.Count(i => i is Episode);
|
||||||
dto.GameCount = taggedItems.Count(i => i is Game);
|
dto.GameCount = taggedItems.Count(i => i is Game);
|
||||||
dto.MovieCount = taggedItems.Count(i => i is Movie);
|
dto.MovieCount = taggedItems.Count(i => i is Movie);
|
||||||
|
dto.TrailerCount = taggedItems.Count(i => i is Trailer);
|
||||||
dto.MusicVideoCount = taggedItems.Count(i => i is MusicVideo);
|
dto.MusicVideoCount = taggedItems.Count(i => i is MusicVideo);
|
||||||
dto.SeriesCount = taggedItems.Count(i => i is Series);
|
dto.SeriesCount = taggedItems.Count(i => i is Series);
|
||||||
dto.SongCount = taggedItems.Count(i => i is Audio);
|
dto.SongCount = taggedItems.Count(i => i is Audio);
|
||||||
|
|
|
@ -300,7 +300,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||||
return _libraryManager.GetItemById(id) as LiveTvProgram;
|
return _libraryManager.GetItemById(id) as LiveTvProgram;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<ILiveTvRecording> GetInternalRecording(string id, CancellationToken cancellationToken)
|
public async Task<BaseItem> GetInternalRecording(string id, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(id))
|
if (string.IsNullOrWhiteSpace(id))
|
||||||
{
|
{
|
||||||
|
@ -313,7 +313,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||||
|
|
||||||
}, cancellationToken).ConfigureAwait(false);
|
}, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
return result.Items.FirstOrDefault() as ILiveTvRecording;
|
return result.Items.FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly SemaphoreSlim _liveStreamSemaphore = new SemaphoreSlim(1, 1);
|
private readonly SemaphoreSlim _liveStreamSemaphore = new SemaphoreSlim(1, 1);
|
||||||
|
@ -358,7 +358,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ILiveTvService GetService(ILiveTvItem item)
|
private ILiveTvService GetService(ILiveTvRecording item)
|
||||||
|
{
|
||||||
|
return GetService(item.ServiceName);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ILiveTvService GetService(BaseItem item)
|
||||||
{
|
{
|
||||||
return GetService(item.ServiceName);
|
return GetService(item.ServiceName);
|
||||||
}
|
}
|
||||||
|
@ -1693,7 +1698,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task OnRecordingFileDeleted(ILiveTvRecording recording)
|
public Task OnRecordingFileDeleted(BaseItem recording)
|
||||||
{
|
{
|
||||||
var service = GetService(recording);
|
var service = GetService(recording);
|
||||||
|
|
||||||
|
@ -1715,10 +1720,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||||
throw new ResourceNotFoundException(string.Format("Recording with Id {0} not found", recordingId));
|
throw new ResourceNotFoundException(string.Format("Recording with Id {0} not found", recordingId));
|
||||||
}
|
}
|
||||||
|
|
||||||
await DeleteRecording(recording).ConfigureAwait(false);
|
await DeleteRecording((BaseItem)recording).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task DeleteRecording(ILiveTvRecording recording)
|
public async Task DeleteRecording(BaseItem recording)
|
||||||
{
|
{
|
||||||
var service = GetService(recording.ServiceName);
|
var service = GetService(recording.ServiceName);
|
||||||
|
|
||||||
|
|
|
@ -36,15 +36,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||||
|
|
||||||
public Task<IEnumerable<MediaSourceInfo>> GetMediaSources(IHasMediaSources item, CancellationToken cancellationToken)
|
public Task<IEnumerable<MediaSourceInfo>> GetMediaSources(IHasMediaSources item, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var channelItem = item as ILiveTvItem;
|
var baseItem = (BaseItem)item;
|
||||||
|
|
||||||
if (channelItem != null)
|
if (baseItem.SourceType == SourceType.LiveTV)
|
||||||
{
|
{
|
||||||
var hasMetadata = (IHasMetadata)channelItem;
|
if (string.IsNullOrWhiteSpace(baseItem.Path))
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(hasMetadata.Path))
|
|
||||||
{
|
{
|
||||||
return GetMediaSourcesInternal(channelItem, cancellationToken);
|
return GetMediaSourcesInternal(item, cancellationToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +53,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||||
private const char StreamIdDelimeter = '_';
|
private const char StreamIdDelimeter = '_';
|
||||||
private const string StreamIdDelimeterString = "_";
|
private const string StreamIdDelimeterString = "_";
|
||||||
|
|
||||||
private async Task<IEnumerable<MediaSourceInfo>> GetMediaSourcesInternal(ILiveTvItem item, CancellationToken cancellationToken)
|
private async Task<IEnumerable<MediaSourceInfo>> GetMediaSourcesInternal(IHasMediaSources item, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
IEnumerable<MediaSourceInfo> sources;
|
IEnumerable<MediaSourceInfo> sources;
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(info.M3UUrl))
|
if (string.IsNullOrWhiteSpace(info.M3UUrl))
|
||||||
{
|
{
|
||||||
return;
|
//return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _liveTvManager.SaveTunerHost(new TunerHostInfo
|
await _liveTvManager.SaveTunerHost(new TunerHostInfo
|
||||||
|
|
|
@ -719,15 +719,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
_saveItemCommand.GetParameter(index++).Value = null;
|
_saveItemCommand.GetParameter(index++).Value = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tvItem = item as ILiveTvItem;
|
_saveItemCommand.GetParameter(index++).Value = item.ServiceName;
|
||||||
if (tvItem != null)
|
|
||||||
{
|
|
||||||
_saveItemCommand.GetParameter(index++).Value = tvItem.ServiceName;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_saveItemCommand.GetParameter(index++).Value = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
_saveItemCommand.GetParameter(index++).Value = string.Join("|", item.Tags.ToArray());
|
_saveItemCommand.GetParameter(index++).Value = string.Join("|", item.Tags.ToArray());
|
||||||
_saveItemCommand.GetParameter(index++).Value = item.IsFolder;
|
_saveItemCommand.GetParameter(index++).Value = item.IsFolder;
|
||||||
|
@ -1095,11 +1087,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
|
|
||||||
if (!reader.IsDBNull(43))
|
if (!reader.IsDBNull(43))
|
||||||
{
|
{
|
||||||
var tvItem = item as ILiveTvItem;
|
item.ServiceName = reader.GetString(43);
|
||||||
if (tvItem != null)
|
|
||||||
{
|
|
||||||
tvItem.ServiceName = reader.GetString(43);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reader.IsDBNull(44))
|
if (!reader.IsDBNull(44))
|
||||||
|
|
|
@ -308,9 +308,9 @@ namespace MediaBrowser.WebDashboard.Api
|
||||||
|
|
||||||
if (!string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
|
if (!string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
var versionedBowerPath = Path.Combine(Path.GetDirectoryName(bowerPath), "bower_components" + _appHost.ApplicationVersion);
|
//var versionedBowerPath = Path.Combine(Path.GetDirectoryName(bowerPath), "bower_components" + _appHost.ApplicationVersion);
|
||||||
Directory.Move(bowerPath, versionedBowerPath);
|
//Directory.Move(bowerPath, versionedBowerPath);
|
||||||
bowerPath = versionedBowerPath;
|
//bowerPath = versionedBowerPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteFilesByExtension(bowerPath, ".log");
|
DeleteFilesByExtension(bowerPath, ".log");
|
||||||
|
@ -340,7 +340,11 @@ namespace MediaBrowser.WebDashboard.Api
|
||||||
DeleteFoldersByName(bowerPath, "guides");
|
DeleteFoldersByName(bowerPath, "guides");
|
||||||
DeleteFoldersByName(bowerPath, "grunt");
|
DeleteFoldersByName(bowerPath, "grunt");
|
||||||
DeleteFoldersByName(bowerPath, "rollups");
|
DeleteFoldersByName(bowerPath, "rollups");
|
||||||
DeleteFoldersByName(Path.Combine(bowerPath, "emby-webcomponents"), "fonts");
|
|
||||||
|
if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
DeleteFoldersByName(Path.Combine(bowerPath, "emby-webcomponents"), "fonts");
|
||||||
|
}
|
||||||
|
|
||||||
_fileSystem.DeleteDirectory(Path.Combine(bowerPath, "jquery", "src"), true);
|
_fileSystem.DeleteDirectory(Path.Combine(bowerPath, "jquery", "src"), true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user