aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-03-19 18:49:48 -0400
committerLuke <luke.pulverenti@gmail.com>2016-03-19 18:49:48 -0400
commit1933f15977b5d406f406331357e9b5bdb9771b38 (patch)
treef3c92704fd1cd8b59725ef92b1f036293813ffac
parent3b6ade90653cada2df654654e6bc2b48a4d247ed (diff)
parentbcda2a8f0eaa304a946da29485cbc695de4b1519 (diff)
Merge pull request #1565 from MediaBrowser/dev
Dev
-rw-r--r--MediaBrowser.Controller/Channels/IChannelItem.cs11
-rw-r--r--MediaBrowser.Controller/Channels/IChannelMediaItem.cs18
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs7
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvItem.cs10
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs6
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs4
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs2
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs8
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs9
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs2
-rw-r--r--MediaBrowser.Controller/MediaBrowser.Controller.csproj3
-rw-r--r--MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj3
-rw-r--r--MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj3
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs6
-rw-r--r--MediaBrowser.Model/Dto/BaseItemDto.cs5
-rw-r--r--MediaBrowser.Model/Dto/ItemByNameCounts.cs63
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj1
-rw-r--r--MediaBrowser.Model/Providers/SubtitleOptions.cs2
-rw-r--r--MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs2
-rw-r--r--MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs10
-rw-r--r--MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs23
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs1
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs17
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs14
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs16
-rw-r--r--MediaBrowser.WebDashboard/Api/DashboardService.cs12
28 files changed, 88 insertions, 174 deletions
diff --git a/MediaBrowser.Controller/Channels/IChannelItem.cs b/MediaBrowser.Controller/Channels/IChannelItem.cs
new file mode 100644
index 000000000..9b5f0359b
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/IChannelItem.cs
@@ -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; }
+ }
+}
diff --git a/MediaBrowser.Controller/Channels/IChannelMediaItem.cs b/MediaBrowser.Controller/Channels/IChannelMediaItem.cs
new file mode 100644
index 000000000..60a29da90
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/IChannelMediaItem.cs
@@ -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; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 22f688c42..c9fa1cf79 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -191,6 +191,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>
/// If this content came from an external service, the id of the content on that service
/// </summary>
[IgnoreDataMember]
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs b/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
deleted file mode 100644
index 36727f4ae..000000000
--- a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using MediaBrowser.Controller.Entities;
-
-namespace MediaBrowser.Controller.LiveTv
-{
- public interface ILiveTvItem : IHasId
- {
- string ServiceName { get; set; }
- string ExternalId { get; set; }
- }
-}
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index a8f847f53..bd25b23f7 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <param name="recording">The recording.</param>
/// <returns>Task.</returns>
- Task DeleteRecording(ILiveTvRecording recording);
+ Task DeleteRecording(BaseItem recording);
/// <summary>
/// Cancels the timer.
@@ -156,7 +156,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>LiveTvRecording.</returns>
- Task<ILiveTvRecording> GetInternalRecording(string id, CancellationToken cancellationToken);
+ Task<BaseItem> GetInternalRecording(string id, CancellationToken cancellationToken);
/// <summary>
/// Gets the recording stream.
@@ -396,7 +396,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <param name="recording">The recording.</param>
/// <returns>Task.</returns>
- Task OnRecordingFileDeleted(ILiveTvRecording recording);
+ Task OnRecordingFileDeleted(BaseItem recording);
/// <summary>
/// Gets the sat ini mappings.
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
index 5dc5f68cd..257024d01 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
@@ -9,8 +9,10 @@ using System.Threading.Tasks;
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 MediaType { get; }
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
index 04e19c92a..2657ade42 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
@@ -57,8 +57,6 @@ namespace MediaBrowser.Controller.LiveTv
return name + "-" + Name + (EpisodeTitle ?? string.Empty);
}
- public string ServiceName { get; set; }
-
/// <summary>
/// Gets a value indicating whether this instance is owned item.
/// </summary>
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index bc0b40b30..24ec3f5e1 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -11,7 +11,7 @@ using System.Runtime.Serialization;
namespace MediaBrowser.Controller.LiveTv
{
- public class LiveTvChannel : BaseItem, IHasMediaSources, ILiveTvItem
+ public class LiveTvChannel : BaseItem, IHasMediaSources
{
/// <summary>
/// Gets the user data key.
@@ -59,12 +59,6 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The type of the channel.</value>
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]
public override LocationType LocationType
{
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index c01df7464..684af9974 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -11,7 +11,7 @@ using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.LiveTv
{
- public class LiveTvProgram : BaseItem, ILiveTvItem, IHasLookupInfo<LiveTvProgramLookupInfo>, IHasStartDate, IHasProgramAttributes
+ public class LiveTvProgram : BaseItem, IHasLookupInfo<LiveTvProgramLookupInfo>, IHasStartDate, IHasProgramAttributes
{
/// <summary>
/// Gets the user data key.
@@ -39,13 +39,6 @@ namespace MediaBrowser.Controller.LiveTv
return base.CreateUserDataKey();
}
- /// <summary>
- /// Gets or sets the name.
- /// </summary>
- /// <value>The name.</value>
- [IgnoreDataMember]
- public string ServiceName { get; set; }
-
[IgnoreDataMember]
public override SourceType SourceType
{
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
index f298e89b7..6dff66438 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -72,8 +72,6 @@ namespace MediaBrowser.Controller.LiveTv
return base.CreateUserDataKey();
}
- public string ServiceName { get; set; }
-
[IgnoreDataMember]
public override string MediaType
{
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index be041281f..e811d7587 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -85,8 +85,10 @@
<Compile Include="Channels\ChannelSearchInfo.cs" />
<Compile Include="Channels\ChannelVideoItem.cs" />
<Compile Include="Channels\IChannel.cs" />
+ <Compile Include="Channels\IChannelItem.cs" />
<Compile Include="Channels\IChannelManager.cs" />
<Compile Include="Channels\Channel.cs" />
+ <Compile Include="Channels\IChannelMediaItem.cs" />
<Compile Include="Channels\IHasCacheKey.cs" />
<Compile Include="Channels\IIndexableChannel.cs" />
<Compile Include="Channels\InternalAllChannelMediaQuery.cs" />
@@ -202,7 +204,6 @@
<Compile Include="Library\UserDataSaveEventArgs.cs" />
<Compile Include="LiveTv\IHasRegistrationInfo.cs" />
<Compile Include="LiveTv\IListingsProvider.cs" />
- <Compile Include="LiveTv\ILiveTvItem.cs" />
<Compile Include="LiveTv\ITunerHost.cs" />
<Compile Include="LiveTv\RecordingGroup.cs" />
<Compile Include="LiveTv\RecordingStatusChangedEventArgs.cs" />
diff --git a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj
index 5dcfded6f..54fdc6400 100644
--- a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj
+++ b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj
@@ -470,9 +470,6 @@
<Compile Include="..\MediaBrowser.Model\Dto\ImageOptions.cs">
<Link>Dto\ImageOptions.cs</Link>
</Compile>
- <Compile Include="..\MediaBrowser.Model\Dto\ItemByNameCounts.cs">
- <Link>Dto\ItemByNameCounts.cs</Link>
- </Compile>
<Compile Include="..\MediaBrowser.Model\Dto\ItemCounts.cs">
<Link>Dto\ItemCounts.cs</Link>
</Compile>
diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj
index 6c484ffc9..473186a46 100644
--- a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj
+++ b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj
@@ -444,9 +444,6 @@
<Compile Include="..\MediaBrowser.Model\Dto\ImageOptions.cs">
<Link>Dto\ImageOptions.cs</Link>
</Compile>
- <Compile Include="..\MediaBrowser.Model\Dto\ItemByNameCounts.cs">
- <Link>Dto\ItemByNameCounts.cs</Link>
- </Compile>
<Compile Include="..\MediaBrowser.Model\Dto\ItemCounts.cs">
<Link>Dto\ItemCounts.cs</Link>
</Compile>
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 009068dea..bbc6195ff 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -63,12 +63,6 @@ namespace MediaBrowser.Model.Configuration
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>
/// Gets or sets the metadata path.
/// </summary>
/// <value>The metadata path.</value>
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index d9b06dcfd..8f617cadf 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -793,6 +793,11 @@ namespace MediaBrowser.Model.Dto
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>
/// Gets or sets the movie count.
/// </summary>
/// <value>The movie count.</value>
diff --git a/MediaBrowser.Model/Dto/ItemByNameCounts.cs b/MediaBrowser.Model/Dto/ItemByNameCounts.cs
deleted file mode 100644
index 7c51f07bd..000000000
--- a/MediaBrowser.Model/Dto/ItemByNameCounts.cs
+++ /dev/null
@@ -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; }
- }
-}
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 2500a27a8..41952963c 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -215,7 +215,6 @@
<Compile Include="Dto\IItemDto.cs" />
<Compile Include="Dto\ImageByNameInfo.cs" />
<Compile Include="Dto\ImageInfo.cs" />
- <Compile Include="Dto\ItemByNameCounts.cs" />
<Compile Include="Dto\ItemCounts.cs" />
<Compile Include="Dto\ItemIndex.cs" />
<Compile Include="Dto\RatingType.cs" />
diff --git a/MediaBrowser.Model/Providers/SubtitleOptions.cs b/MediaBrowser.Model/Providers/SubtitleOptions.cs
index 84f01e0b7..2b15c0e1f 100644
--- a/MediaBrowser.Model/Providers/SubtitleOptions.cs
+++ b/MediaBrowser.Model/Providers/SubtitleOptions.cs
@@ -2,7 +2,7 @@ namespace MediaBrowser.Model.Providers
{
public class SubtitleOptions
{
- public bool SkipIfGraphicalSubtitlesPresent { get; set; }
+ public bool SkipIfEmbeddedSubtitlesPresent { get; set; }
public bool SkipIfAudioTrackMatches { get; set; }
public string[] DownloadLanguages { get; set; }
public bool DownloadMovieSubtitles { get; set; }
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
index ee05a89a8..5f556bffb 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
@@ -532,7 +532,7 @@ namespace MediaBrowser.Providers.MediaInfo
_subtitleManager)
.DownloadSubtitles(video,
currentStreams.Concat(externalSubtitleStreams).ToList(),
- subtitleOptions.SkipIfGraphicalSubtitlesPresent,
+ subtitleOptions.SkipIfEmbeddedSubtitlesPresent,
subtitleOptions.SkipIfAudioTrackMatches,
subtitleOptions.DownloadLanguages,
cancellationToken).ConfigureAwait(false);
diff --git a/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs b/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs
index 6230e7347..d82289032 100644
--- a/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs
+++ b/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs
@@ -26,7 +26,7 @@ namespace MediaBrowser.Providers.MediaInfo
public async Task<List<string>> DownloadSubtitles(Video video,
List<MediaStream> mediaStreams,
- bool skipIfGraphicalSubtitlesPresent,
+ bool skipIfEmbeddedSubtitlesPresent,
bool skipIfAudioTrackMatches,
IEnumerable<string> languages,
CancellationToken cancellationToken)
@@ -59,7 +59,7 @@ namespace MediaBrowser.Providers.MediaInfo
{
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);
if (downloaded)
@@ -78,7 +78,7 @@ namespace MediaBrowser.Providers.MediaInfo
private async Task<bool> DownloadSubtitles(Video video,
List<MediaStream> mediaStreams,
- bool skipIfGraphicalSubtitlesPresent,
+ bool skipIfEmbeddedSubtitlesPresent,
bool skipIfAudioTrackMatches,
string language,
VideoContentType mediaType,
@@ -107,8 +107,8 @@ namespace MediaBrowser.Providers.MediaInfo
}
// There's an internal subtitle stream for this language
- if (skipIfGraphicalSubtitlesPresent &&
- mediaStreams.Any(i => i.Type == MediaStreamType.Subtitle && !i.IsTextSubtitleStream && string.Equals(i.Language, language, StringComparison.OrdinalIgnoreCase)))
+ if (skipIfEmbeddedSubtitlesPresent &&
+ mediaStreams.Any(i => i.Type == MediaStreamType.Subtitle && !i.IsExternal && string.Equals(i.Language, language, StringComparison.OrdinalIgnoreCase)))
{
return false;
}
diff --git a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
index 4953621f5..b8b17cefe 100644
--- a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
+++ b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
@@ -114,7 +114,7 @@ namespace MediaBrowser.Providers.MediaInfo
_subtitleManager)
.DownloadSubtitles(video,
mediaStreams,
- options.SkipIfGraphicalSubtitlesPresent,
+ options.SkipIfEmbeddedSubtitlesPresent,
options.SkipIfAudioTrackMatches,
options.DownloadLanguages,
cancellationToken).ConfigureAwait(false);
diff --git a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs
index 1a5c35df8..7db457c6e 100644
--- a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs
+++ b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs
@@ -145,7 +145,6 @@ namespace MediaBrowser.Server.Implementations.Configuration
{
var newConfig = (ServerConfiguration)newConfiguration;
- ValidateItemByNamePath(newConfig);
ValidatePathSubstitutions(newConfig);
ValidateMetadataPath(newConfig);
ValidateSslCertificate(newConfig);
@@ -190,28 +189,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>
/// Validates the metadata path.
/// </summary>
/// <param name="newConfig">The new configuration.</param>
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index 3b63eccfc..3ead1a835 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -457,6 +457,7 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.EpisodeCount = taggedItems.Count(i => i is Episode);
dto.GameCount = taggedItems.Count(i => i is Game);
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.SeriesCount = taggedItems.Count(i => i is Series);
dto.SongCount = taggedItems.Count(i => i is Audio);
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index e54adc0c5..47379fcb0 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -300,7 +300,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
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))
{
@@ -313,7 +313,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
}, cancellationToken).ConfigureAwait(false);
- return result.Items.FirstOrDefault() as ILiveTvRecording;
+ return result.Items.FirstOrDefault();
}
private readonly SemaphoreSlim _liveStreamSemaphore = new SemaphoreSlim(1, 1);
@@ -358,7 +358,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv
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);
}
@@ -1693,7 +1698,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
};
}
- public Task OnRecordingFileDeleted(ILiveTvRecording recording)
+ public Task OnRecordingFileDeleted(BaseItem 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));
}
- 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);
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
index ff102b0f7..d3bb87bc7 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
@@ -36,15 +36,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv
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(hasMetadata.Path))
+ if (string.IsNullOrWhiteSpace(baseItem.Path))
{
- return GetMediaSourcesInternal(channelItem, cancellationToken);
+ return GetMediaSourcesInternal(item, cancellationToken);
}
}
@@ -54,8 +52,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
// Do not use a pipe here because Roku http requests to the server will fail, without any explicit error message.
private const char StreamIdDelimeter = '_';
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;
diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs
index cdeb6dfa8..c417cc09c 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs
@@ -100,7 +100,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp
{
if (string.IsNullOrWhiteSpace(info.M3UUrl))
{
- return;
+ //return;
}
await _liveTvManager.SaveTunerHost(new TunerHostInfo
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
index 3f50278f6..50662c90f 100644
--- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
@@ -719,15 +719,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
_saveItemCommand.GetParameter(index++).Value = null;
}
- var tvItem = item as ILiveTvItem;
- if (tvItem != null)
- {
- _saveItemCommand.GetParameter(index++).Value = tvItem.ServiceName;
- }
- else
- {
- _saveItemCommand.GetParameter(index++).Value = null;
- }
+ _saveItemCommand.GetParameter(index++).Value = item.ServiceName;
_saveItemCommand.GetParameter(index++).Value = string.Join("|", item.Tags.ToArray());
_saveItemCommand.GetParameter(index++).Value = item.IsFolder;
@@ -1095,11 +1087,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
if (!reader.IsDBNull(43))
{
- var tvItem = item as ILiveTvItem;
- if (tvItem != null)
- {
- tvItem.ServiceName = reader.GetString(43);
- }
+ item.ServiceName = reader.GetString(43);
}
if (!reader.IsDBNull(44))
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index ab9ff8e6f..ab8b2a673 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -308,9 +308,9 @@ namespace MediaBrowser.WebDashboard.Api
if (!string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
{
- var versionedBowerPath = Path.Combine(Path.GetDirectoryName(bowerPath), "bower_components" + _appHost.ApplicationVersion);
- Directory.Move(bowerPath, versionedBowerPath);
- bowerPath = versionedBowerPath;
+ //var versionedBowerPath = Path.Combine(Path.GetDirectoryName(bowerPath), "bower_components" + _appHost.ApplicationVersion);
+ //Directory.Move(bowerPath, versionedBowerPath);
+ //bowerPath = versionedBowerPath;
}
DeleteFilesByExtension(bowerPath, ".log");
@@ -340,7 +340,11 @@ namespace MediaBrowser.WebDashboard.Api
DeleteFoldersByName(bowerPath, "guides");
DeleteFoldersByName(bowerPath, "grunt");
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);