mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 15:28:28 +01:00
add chapter image error handling
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
|
||||
namespace MediaBrowser.Controller.Collections
|
||||
{
|
||||
public class ManualCollectionsFolder : BasePluginFolder, IHiddenFromDisplay
|
||||
{
|
||||
public ManualCollectionsFolder()
|
||||
{
|
||||
Name = "Collections";
|
||||
DisplayMediaType = "CollectionFolder";
|
||||
}
|
||||
|
||||
public override bool IsHidden
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsHiddenFromUser(User user)
|
||||
{
|
||||
return !ConfigurationManager.Configuration.DisplayCollectionsView;
|
||||
}
|
||||
|
||||
public override string CollectionType
|
||||
{
|
||||
get { return Model.Entities.CollectionType.BoxSets; }
|
||||
}
|
||||
|
||||
public override string GetClientTypeName()
|
||||
{
|
||||
return typeof(CollectionFolder).Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,8 +113,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var standaloneTypes = new List<string>
|
||||
{
|
||||
CollectionType.Playlists,
|
||||
CollectionType.BoxSets
|
||||
CollectionType.Playlists
|
||||
};
|
||||
|
||||
var collectionFolder = folder as ICollectionFolder;
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<Compile Include="Collections\CollectionCreationOptions.cs" />
|
||||
<Compile Include="Collections\CollectionEvents.cs" />
|
||||
<Compile Include="Collections\ICollectionManager.cs" />
|
||||
<Compile Include="Collections\ManualCollectionsFolder.cs" />
|
||||
<Compile Include="Connect\ConnectSupporterSummary.cs" />
|
||||
<Compile Include="Connect\IConnectManager.cs" />
|
||||
<Compile Include="Connect\UserLinkResult.cs" />
|
||||
|
||||
@@ -790,20 +790,25 @@ namespace MediaBrowser.Controller.Providers
|
||||
}
|
||||
|
||||
default:
|
||||
if (_validProviderIds.ContainsKey(reader.Name))
|
||||
{
|
||||
var id = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
string readerName = reader.Name;
|
||||
string providerIdValue;
|
||||
if (_validProviderIds.TryGetValue(readerName, out providerIdValue))
|
||||
{
|
||||
item.SetProviderId(_validProviderIds[reader.Name], id);
|
||||
var id = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
item.SetProviderId(providerIdValue, id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reader.Skip();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reader.Skip();
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user