allow separate image extractions for each audio book
This commit is contained in:
parent
67cf7da8df
commit
7174ee66d5
|
@ -106,7 +106,7 @@ namespace Emby.Server.Implementations.Networking
|
||||||
endpoint.StartsWith("127.", StringComparison.OrdinalIgnoreCase) ||
|
endpoint.StartsWith("127.", StringComparison.OrdinalIgnoreCase) ||
|
||||||
endpoint.StartsWith("192.168", StringComparison.OrdinalIgnoreCase) ||
|
endpoint.StartsWith("192.168", StringComparison.OrdinalIgnoreCase) ||
|
||||||
endpoint.StartsWith("169.", StringComparison.OrdinalIgnoreCase) ||
|
endpoint.StartsWith("169.", StringComparison.OrdinalIgnoreCase) ||
|
||||||
//endpoint.StartsWith("10.", StringComparison.OrdinalIgnoreCase) ||
|
endpoint.StartsWith("10.", StringComparison.OrdinalIgnoreCase) ||
|
||||||
IsInPrivateAddressSpaceAndLocalSubnet(endpoint);
|
IsInPrivateAddressSpaceAndLocalSubnet(endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,24 +92,34 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
|
|
||||||
private string GetAudioImagePath(Audio item)
|
private string GetAudioImagePath(Audio item)
|
||||||
{
|
{
|
||||||
var filename = item.Album ?? string.Empty;
|
string filename;
|
||||||
filename += string.Join(",", item.Artists);
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(item.Album))
|
if (item.GetType() == typeof(Audio))
|
||||||
{
|
{
|
||||||
filename += "_" + item.Album;
|
filename = item.Album ?? string.Empty;
|
||||||
}
|
filename += string.Join(",", item.Artists);
|
||||||
else if (!string.IsNullOrWhiteSpace(item.Name))
|
|
||||||
{
|
if (!string.IsNullOrWhiteSpace(item.Album))
|
||||||
filename += "_" + item.Name;
|
{
|
||||||
|
filename += "_" + item.Album;
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrWhiteSpace(item.Name))
|
||||||
|
{
|
||||||
|
filename += "_" + item.Name;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
filename += "_" + item.Id.ToString("N");
|
||||||
|
}
|
||||||
|
|
||||||
|
filename = filename.GetMD5() + ".jpg";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
filename += "_" + item.Id.ToString("N");
|
// If it's an audio book or audio podcast, allow unique image per item
|
||||||
|
filename = item.Id.ToString("N") + ".jpg";
|
||||||
}
|
}
|
||||||
|
|
||||||
filename = filename.GetMD5() + ".jpg";
|
|
||||||
|
|
||||||
var prefix = filename.Substring(0, 1);
|
var prefix = filename.Substring(0, 1);
|
||||||
|
|
||||||
return Path.Combine(AudioImagesPath, prefix, filename);
|
return Path.Combine(AudioImagesPath, prefix, filename);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user