The Free Software Media System - Server Backend & API
removed ILiveTvItem interface
Luke Pulverentib9082d7e6403
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.csindex 22f688c424..c9fa1cf79d 100644--- a/MediaBrowser.Controller/Entities/BaseItem.cs+++ b/MediaBrowser.Controller/Entities/BaseItem.cs@@ -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>/// If this content came from an external service, the id of the content on that service/// </summary>diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs b/MediaBrowser.Controller/LiveTv/ILiveTvItem.csdeleted file mode 100644index 36727f4aee..0000000000--- 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/ILiveTvRecording.cs b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.csindex 5dc5f68cd2..257024d01e 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.csindex 04e19c92a8..2657ade423 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs@@ -57,8 +57,6 @@ namespace MediaBrowser.Controller.LiveTvreturn 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.csindex bc0b40b30c..24ec3f5e16 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.csindex c01df74642..684af9974d 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.LiveTvreturn 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.csindex f298e89b70..6dff664388 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs@@ -72,8 +72,6 @@ namespace MediaBrowser.Controller.LiveTvreturn 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.csprojindex be041281ff..f4a5c04380 100644--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj@@ -202,7 +202,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.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.csindex e54adc0c5c..5949a65371 100644--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs@@ -358,7 +358,12 @@ namespace MediaBrowser.Server.Implementations.LiveTvreturn list;}- private ILiveTvService GetService(ILiveTvItem item)+ private ILiveTvService GetService(ILiveTvRecording item)+ {+ return GetService(item.ServiceName);+ }++ private ILiveTvService GetService(BaseItem item){return GetService(item.ServiceName);}diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.csindex ff102b0f79..d3bb87bc70 100644--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs@@ -36,15 +36,13 @@ namespace MediaBrowser.Server.Implementations.LiveTvpublic 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/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.csindex 3f50278f60..50662c90fa 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.Persistenceif (!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.csindex ab9ff8e6f2..ab8b2a6738 100644--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs@@ -308,9 +308,9 @@ namespace MediaBrowser.WebDashboard.Apiif (!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.ApiDeleteFoldersByName(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);