mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-17 19:08:53 -07:00
commit
9f5562bcbc
@ -260,7 +260,7 @@ namespace Emby.Dlna.ContentDirectory
|
|||||||
{
|
{
|
||||||
totalCount = 1;
|
totalCount = 1;
|
||||||
|
|
||||||
if (item.IsFolder || serverItem.StubType.HasValue)
|
if (item.IsDisplayedAsFolder || serverItem.StubType.HasValue)
|
||||||
{
|
{
|
||||||
var childrenResult = (await GetUserItems(item, serverItem.StubType, user, sortCriteria, start, requestedCount).ConfigureAwait(false));
|
var childrenResult = (await GetUserItems(item, serverItem.StubType, user, sortCriteria, start, requestedCount).ConfigureAwait(false));
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ namespace Emby.Dlna.ContentDirectory
|
|||||||
var childItem = i.Item;
|
var childItem = i.Item;
|
||||||
var displayStubType = i.StubType;
|
var displayStubType = i.StubType;
|
||||||
|
|
||||||
if (childItem.IsFolder || displayStubType.HasValue)
|
if (childItem.IsDisplayedAsFolder || displayStubType.HasValue)
|
||||||
{
|
{
|
||||||
var childCount = (await GetUserItems(childItem, displayStubType, user, sortCriteria, null, 0).ConfigureAwait(false))
|
var childCount = (await GetUserItems(childItem, displayStubType, user, sortCriteria, null, 0).ConfigureAwait(false))
|
||||||
.TotalRecordCount;
|
.TotalRecordCount;
|
||||||
@ -381,7 +381,7 @@ namespace Emby.Dlna.ContentDirectory
|
|||||||
|
|
||||||
foreach (var i in childrenResult.Items)
|
foreach (var i in childrenResult.Items)
|
||||||
{
|
{
|
||||||
if (i.IsFolder)
|
if (i.IsDisplayedAsFolder)
|
||||||
{
|
{
|
||||||
var childCount = (await GetChildrenSorted(i, user, searchCriteria, sortCriteria, null, 0).ConfigureAwait(false))
|
var childCount = (await GetChildrenSorted(i, user, searchCriteria, sortCriteria, null, 0).ConfigureAwait(false))
|
||||||
.TotalRecordCount;
|
.TotalRecordCount;
|
||||||
|
@ -686,7 +686,7 @@ namespace Emby.Dlna.Didl
|
|||||||
|
|
||||||
writer.WriteStartElement("upnp", "class", NS_UPNP);
|
writer.WriteStartElement("upnp", "class", NS_UPNP);
|
||||||
|
|
||||||
if (item.IsFolder || stubType.HasValue)
|
if (item.IsDisplayedAsFolder || stubType.HasValue)
|
||||||
{
|
{
|
||||||
string classType = null;
|
string classType = null;
|
||||||
|
|
||||||
|
@ -2710,7 +2710,12 @@ namespace MediaBrowser.Api.Playback
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
|
if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
|
||||||
{
|
{
|
||||||
inputModifier += " -codec:" + stream.Index.ToString(UsCulture) + " " + stream.Codec;
|
var decoder = GetDecoderFromCodec(stream.Codec);
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(decoder))
|
||||||
|
{
|
||||||
|
inputModifier += " -codec:" + stream.Index.ToString(UsCulture) + " " + decoder;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2730,6 +2735,16 @@ namespace MediaBrowser.Api.Playback
|
|||||||
return inputModifier;
|
return inputModifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetDecoderFromCodec(string codec)
|
||||||
|
{
|
||||||
|
if (string.Equals(codec, "mp2", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return codec;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Infers the audio codec based on the url
|
/// Infers the audio codec based on the url
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -44,6 +44,15 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public override bool IsDisplayedAsFolder
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override bool SupportsAddingToPlaylist
|
public override bool SupportsAddingToPlaylist
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,15 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public override bool IsDisplayedAsFolder
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the folder containing the item.
|
/// Returns the folder containing the item.
|
||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
|
@ -1631,6 +1631,15 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public virtual bool IsDisplayedAsFolder
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public virtual string GetClientTypeName()
|
public virtual string GetClientTypeName()
|
||||||
{
|
{
|
||||||
if (IsFolder && SourceType == SourceType.Channel && !(this is Channel))
|
if (IsFolder && SourceType == SourceType.Channel && !(this is Channel))
|
||||||
|
@ -85,6 +85,15 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public override bool IsDisplayedAsFolder
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public virtual bool SupportsCumulativeRunTimeTicks
|
public virtual bool SupportsCumulativeRunTimeTicks
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,15 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public override bool IsDisplayedAsFolder
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override bool SupportsAncestors
|
public override bool SupportsAncestors
|
||||||
{
|
{
|
||||||
|
@ -39,6 +39,15 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public override bool IsDisplayedAsFolder
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override bool SupportsAncestors
|
public override bool SupportsAncestors
|
||||||
{
|
{
|
||||||
|
@ -921,19 +921,19 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
{
|
{
|
||||||
await item.RefreshMetadata(options, CancellationToken.None).ConfigureAwait(false);
|
await item.RefreshMetadata(options, CancellationToken.None).ConfigureAwait(false);
|
||||||
|
|
||||||
if (item.IsFolder)
|
// Collection folders don't validate their children so we'll have to simulate that here
|
||||||
|
var collectionFolder = item as CollectionFolder;
|
||||||
|
|
||||||
|
if (collectionFolder != null)
|
||||||
{
|
{
|
||||||
// Collection folders don't validate their children so we'll have to simulate that here
|
await RefreshCollectionFolderChildren(options, collectionFolder).ConfigureAwait(false);
|
||||||
var collectionFolder = item as CollectionFolder;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var folder = item as Folder;
|
||||||
|
|
||||||
if (collectionFolder != null)
|
if (folder != null)
|
||||||
{
|
{
|
||||||
await RefreshCollectionFolderChildren(options, collectionFolder).ConfigureAwait(false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var folder = (Folder)item;
|
|
||||||
|
|
||||||
await folder.ValidateChildren(new Progress<double>(), cancellationToken, options).ConfigureAwait(false);
|
await folder.ValidateChildren(new Progress<double>(), cancellationToken, options).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user