diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index df3cecbf9..e999f5753 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -3929,15 +3929,6 @@ namespace Emby.Server.Implementations.Data
}
}
- if (!string.IsNullOrWhiteSpace(query.SlugName))
- {
- whereClauses.Add("CleanName=@SlugName");
- if (statement != null)
- {
- statement.TryBind("@SlugName", GetCleanValue(query.SlugName));
- }
- }
-
if (!string.IsNullOrWhiteSpace(query.MinSortName))
{
whereClauses.Add("SortName>=@MinSortName");
diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
index df70680f1..4482bb13b 100644
--- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj
+++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
@@ -167,7 +167,6 @@
-
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
index 1a5e6bddd..8f62670e4 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -1422,18 +1422,6 @@ namespace Emby.Server.Implementations.LiveTv
await _libraryManager.UpdateItem(program, ItemUpdateType.MetadataImport, cancellationToken).ConfigureAwait(false);
}
- if (!(service is EmbyTV.EmbyTV))
- {
- foreach (var program in newPrograms)
- {
- _providerManager.QueueRefresh(program.Id, new MetadataRefreshOptions(_fileSystem), RefreshPriority.Low);
- }
- foreach (var program in updatedPrograms)
- {
- _providerManager.QueueRefresh(program.Id, new MetadataRefreshOptions(_fileSystem), RefreshPriority.Low);
- }
- }
-
currentChannel.IsMovie = isMovie;
currentChannel.IsNews = isNews;
currentChannel.IsSports = isSports;
diff --git a/Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs b/Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs
deleted file mode 100644
index 5cff88a67..000000000
--- a/Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.LiveTv;
-using MediaBrowser.Controller.Providers;
-using MediaBrowser.Model.Entities;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Emby.Server.Implementations.LiveTv
-{
- public class ProgramImageProvider : IDynamicImageProvider, IHasItemChangeMonitor, IHasOrder
- {
- private readonly ILiveTvManager _liveTvManager;
-
- public ProgramImageProvider(ILiveTvManager liveTvManager)
- {
- _liveTvManager = liveTvManager;
- }
-
- public IEnumerable GetSupportedImages(IHasImages item)
- {
- return new[] { ImageType.Primary };
- }
-
- private string GetItemExternalId(BaseItem item)
- {
- var externalId = item.ExternalId;
-
- if (string.IsNullOrWhiteSpace(externalId))
- {
- externalId = item.GetProviderId("ProviderExternalId");
- }
-
- return externalId;
- }
-
- public async Task GetImage(IHasImages item, ImageType type, CancellationToken cancellationToken)
- {
- var liveTvItem = (LiveTvProgram)item;
-
- var imageResponse = new DynamicImageResponse();
-
- var service = _liveTvManager.Services.FirstOrDefault(i => string.Equals(i.Name, liveTvItem.ServiceName, StringComparison.OrdinalIgnoreCase));
-
- if (service != null)
- {
- try
- {
- var channel = _liveTvManager.GetInternalChannel(liveTvItem.ChannelId);
-
- if (channel != null)
- {
- var response = await service.GetProgramImageAsync(GetItemExternalId(liveTvItem), GetItemExternalId(channel), cancellationToken).ConfigureAwait(false);
-
- if (response != null)
- {
- imageResponse.HasImage = true;
- imageResponse.Stream = response.Stream;
- imageResponse.Format = response.Format;
- }
- }
- }
- catch (NotImplementedException)
- {
- }
- }
-
- return imageResponse;
- }
-
- public string Name
- {
- get { return "Live TV Service Provider"; }
- }
-
- public bool Supports(IHasImages item)
- {
- return item is LiveTvProgram;
- }
-
- public int Order
- {
- get
- {
- // Let the better providers run first
- return 100;
- }
- }
-
- public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
- {
- var liveTvItem = item as LiveTvProgram;
-
- if (liveTvItem != null)
- {
- return !liveTvItem.HasImage(ImageType.Primary);
- }
- return false;
- }
- }
-}
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs
index 0f1d240d0..d3cc18d4b 100644
--- a/MediaBrowser.Api/BaseApiService.cs
+++ b/MediaBrowser.Api/BaseApiService.cs
@@ -178,13 +178,7 @@ namespace MediaBrowser.Api
{
if (name.IndexOf(BaseItem.SlugChar) != -1)
{
- var result = libraryManager.GetItemList(new InternalItemsQuery
- {
- SlugName = name,
- IncludeItemTypes = new[] { typeof(MusicArtist).Name },
- DtoOptions = dtoOptions
-
- }).OfType().FirstOrDefault();
+ var result = GetItemFromSlugName(libraryManager, name, dtoOptions);
if (result != null)
{
@@ -199,13 +193,7 @@ namespace MediaBrowser.Api
{
if (name.IndexOf(BaseItem.SlugChar) != -1)
{
- var result = libraryManager.GetItemList(new InternalItemsQuery
- {
- SlugName = name,
- IncludeItemTypes = new[] { typeof(Studio).Name },
- DtoOptions = dtoOptions
-
- }).OfType().FirstOrDefault();
+ var result = GetItemFromSlugName(libraryManager, name, dtoOptions);
if (result != null)
{
@@ -220,13 +208,7 @@ namespace MediaBrowser.Api
{
if (name.IndexOf(BaseItem.SlugChar) != -1)
{
- var result = libraryManager.GetItemList(new InternalItemsQuery
- {
- SlugName = name,
- IncludeItemTypes = new[] { typeof(Genre).Name },
- DtoOptions = dtoOptions
-
- }).OfType().FirstOrDefault();
+ var result = GetItemFromSlugName(libraryManager, name, dtoOptions);
if (result != null)
{
@@ -241,13 +223,7 @@ namespace MediaBrowser.Api
{
if (name.IndexOf(BaseItem.SlugChar) != -1)
{
- var result = libraryManager.GetItemList(new InternalItemsQuery
- {
- SlugName = name,
- IncludeItemTypes = new[] { typeof(MusicGenre).Name },
- DtoOptions = dtoOptions
-
- }).OfType().FirstOrDefault();
+ var result = GetItemFromSlugName(libraryManager, name, dtoOptions);
if (result != null)
{
@@ -262,13 +238,7 @@ namespace MediaBrowser.Api
{
if (name.IndexOf(BaseItem.SlugChar) != -1)
{
- var result = libraryManager.GetItemList(new InternalItemsQuery
- {
- SlugName = name,
- IncludeItemTypes = new[] { typeof(GameGenre).Name },
- DtoOptions = dtoOptions
-
- }).OfType().FirstOrDefault();
+ var result = GetItemFromSlugName(libraryManager, name, dtoOptions);
if (result != null)
{
@@ -283,13 +253,7 @@ namespace MediaBrowser.Api
{
if (name.IndexOf(BaseItem.SlugChar) != -1)
{
- var result = libraryManager.GetItemList(new InternalItemsQuery
- {
- SlugName = name,
- IncludeItemTypes = new[] { typeof(Person).Name },
- DtoOptions = dtoOptions
-
- }).OfType().FirstOrDefault();
+ var result = GetItemFromSlugName(libraryManager, name, dtoOptions);
if (result != null)
{
@@ -300,6 +264,42 @@ namespace MediaBrowser.Api
return libraryManager.GetPerson(name);
}
+ private T GetItemFromSlugName(ILibraryManager libraryManager, string name, DtoOptions dtoOptions)
+ where T : BaseItem, new()
+ {
+ var result = libraryManager.GetItemList(new InternalItemsQuery
+ {
+ Name = name.Replace(BaseItem.SlugChar, '&'),
+ IncludeItemTypes = new[] { typeof(T).Name },
+ DtoOptions = dtoOptions
+
+ }).OfType().FirstOrDefault();
+
+ if (result == null)
+ {
+ result = libraryManager.GetItemList(new InternalItemsQuery
+ {
+ Name = name.Replace(BaseItem.SlugChar, '/'),
+ IncludeItemTypes = new[] { typeof(T).Name },
+ DtoOptions = dtoOptions
+
+ }).OfType().FirstOrDefault();
+ }
+
+ if (result == null)
+ {
+ result = libraryManager.GetItemList(new InternalItemsQuery
+ {
+ Name = name.Replace(BaseItem.SlugChar, '?'),
+ IncludeItemTypes = new[] { typeof(T).Name },
+ DtoOptions = dtoOptions
+
+ }).OfType().FirstOrDefault();
+ }
+
+ return result as T;
+ }
+
protected string GetPathValue(int index)
{
var pathInfo = Parse(Request.PathInfo);
diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
index 4d96c082f..608e3f56c 100644
--- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
+++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
@@ -56,7 +56,6 @@ namespace MediaBrowser.Controller.Entities
public string Path { get; set; }
public string PathNotStartsWith { get; set; }
public string Name { get; set; }
- public string SlugName { get; set; }
public string Person { get; set; }
public string[] PersonIds { get; set; }
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index 87fc58130..9f55a9ff2 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -221,12 +221,6 @@ namespace MediaBrowser.Controller.LiveTv
public override bool IsInternetMetadataEnabled()
{
- if (IsMovie)
- {
- var options = (LiveTvOptions)ConfigurationManager.GetConfiguration("livetv");
- return options.EnableMovieProviders;
- }
-
return false;
}
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index c14b1f416..60583b95b 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -233,7 +233,12 @@ namespace MediaBrowser.Controller.MediaEncoding
return null;
}
- return codec;
+ if (_mediaEncoder.SupportsDecoder(codec))
+ {
+ return codec;
+ }
+
+ return null;
}
///
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
index 338f58c16..59f3576ec 100644
--- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
@@ -92,7 +92,13 @@ namespace MediaBrowser.MediaEncoding.Encoder
"mpeg2_qsv",
"vc1_qsv",
"h264_cuvid",
- "hevc_cuvid"
+ "hevc_cuvid",
+ "dts",
+ "ac3",
+ "aac",
+ "mp3",
+ "h264",
+ "hevc"
};
foreach (var codec in required)
diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs
index 91ea977f7..32153a11c 100644
--- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs
+++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs
@@ -1,13 +1,11 @@
using System.Collections.Generic;
using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Extensions;
namespace MediaBrowser.Model.LiveTv
{
public class LiveTvOptions
{
public int? GuideDays { get; set; }
- public bool EnableMovieProviders { get; set; }
public string RecordingPath { get; set; }
public string MovieRecordingPath { get; set; }
public string SeriesRecordingPath { get; set; }
@@ -30,7 +28,6 @@ namespace MediaBrowser.Model.LiveTv
public LiveTvOptions()
{
- EnableMovieProviders = true;
TunerHosts = new List();
ListingProviders = new List();
MediaLocationsCreated = new string[] { };
diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs
index 2a987ceb1..e2a75c56b 100644
--- a/MediaBrowser.Model/Users/UserPolicy.cs
+++ b/MediaBrowser.Model/Users/UserPolicy.cs
@@ -70,6 +70,8 @@ namespace MediaBrowser.Model.Users
public UserPolicy()
{
+ EnableContentDeletion = true;
+
EnableSyncTranscoding = true;
EnableMediaPlayback = true;
diff --git a/SharedVersion.cs b/SharedVersion.cs
index ca38f525e..f36251773 100644
--- a/SharedVersion.cs
+++ b/SharedVersion.cs
@@ -1,3 +1,3 @@
using System.Reflection;
-[assembly: AssemblyVersion("3.2.20.2")]
+[assembly: AssemblyVersion("3.2.20.3")]