mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-05 13:23:03 +02:00
Fix SA 1116 warnings
This commit is contained in:
parent
6f9beef732
commit
ec91d3893d
|
@ -157,7 +157,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
protected bool TableExists(ManagedConnection connection, string name)
|
protected bool TableExists(ManagedConnection connection, string name)
|
||||||
{
|
{
|
||||||
return connection.RunInTransaction(db =>
|
return connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
using (var statement = PrepareStatement(db, "select DISTINCT tbl_name from sqlite_master"))
|
using (var statement = PrepareStatement(db, "select DISTINCT tbl_name from sqlite_master"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -219,7 +219,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
connection.RunQueries(queries);
|
connection.RunQueries(queries);
|
||||||
|
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
var existingColumnNames = GetColumnNames(db, "AncestorIds");
|
var existingColumnNames = GetColumnNames(db, "AncestorIds");
|
||||||
AddColumn(db, "AncestorIds", "AncestorIdText", "Text", existingColumnNames);
|
AddColumn(db, "AncestorIds", "AncestorIdText", "Text", existingColumnNames);
|
||||||
|
@ -495,7 +496,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
using (var saveImagesStatement = base.PrepareStatement(db, "Update TypedBaseItems set Images=@Images where guid=@Id"))
|
using (var saveImagesStatement = base.PrepareStatement(db, "Update TypedBaseItems set Images=@Images where guid=@Id"))
|
||||||
{
|
{
|
||||||
|
@ -546,7 +548,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
SaveItemsInTranscation(db, tuples);
|
SaveItemsInTranscation(db, tuples);
|
||||||
}, TransactionMode);
|
}, TransactionMode);
|
||||||
|
@ -2032,7 +2035,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
// First delete chapters
|
// First delete chapters
|
||||||
db.Execute("delete from " + ChaptersTableName + " where ItemId=@ItemId", idBlob);
|
db.Execute("delete from " + ChaptersTableName + " where ItemId=@ItemId", idBlob);
|
||||||
|
@ -2921,7 +2925,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
var result = new QueryResult<BaseItem>();
|
var result = new QueryResult<BaseItem>();
|
||||||
using (var connection = GetConnection(true))
|
using (var connection = GetConnection(true))
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
var statements = PrepareAll(db, statementTexts);
|
var statements = PrepareAll(db, statementTexts);
|
||||||
|
|
||||||
|
@ -3324,7 +3329,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
var result = new QueryResult<Guid>();
|
var result = new QueryResult<Guid>();
|
||||||
using (var connection = GetConnection(true))
|
using (var connection = GetConnection(true))
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
var statements = PrepareAll(db, statementTexts);
|
var statements = PrepareAll(db, statementTexts);
|
||||||
|
|
||||||
|
@ -4899,7 +4905,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
connection.ExecuteAll(sql);
|
connection.ExecuteAll(sql);
|
||||||
}, TransactionMode);
|
}, TransactionMode);
|
||||||
|
@ -4950,7 +4957,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
var idBlob = id.ToByteArray();
|
var idBlob = id.ToByteArray();
|
||||||
|
|
||||||
|
@ -5744,7 +5752,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
var itemIdBlob = itemId.ToByteArray();
|
var itemIdBlob = itemId.ToByteArray();
|
||||||
|
|
||||||
|
@ -5898,7 +5907,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
var itemIdBlob = id.ToByteArray();
|
var itemIdBlob = id.ToByteArray();
|
||||||
|
|
||||||
|
@ -6232,7 +6242,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
var itemIdBlob = id.ToByteArray();
|
var itemIdBlob = id.ToByteArray();
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
var users = userDatasTableExists ? null : userManager.Users;
|
var users = userDatasTableExists ? null : userManager.Users;
|
||||||
|
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
db.ExecuteAll(string.Join(";", new[] {
|
db.ExecuteAll(string.Join(";", new[] {
|
||||||
|
|
||||||
|
@ -178,7 +179,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
SaveUserData(db, internalUserId, key, userData);
|
SaveUserData(db, internalUserId, key, userData);
|
||||||
}, TransactionMode);
|
}, TransactionMode);
|
||||||
|
@ -246,7 +248,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
foreach (var userItemData in userDataList)
|
foreach (var userItemData in userDataList)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
|
||||||
/// <value>The priority.</value>
|
/// <value>The priority.</value>
|
||||||
public override ResolverPriority Priority => ResolverPriority.Fourth;
|
public override ResolverPriority Priority => ResolverPriority.Fourth;
|
||||||
|
|
||||||
public MultiItemResolverResult ResolveMultiple(Folder parent,
|
public MultiItemResolverResult ResolveMultiple(
|
||||||
|
Folder parent,
|
||||||
List<FileSystemMetadata> files,
|
List<FileSystemMetadata> files,
|
||||||
string collectionType,
|
string collectionType,
|
||||||
IDirectoryService directoryService)
|
IDirectoryService directoryService)
|
||||||
|
@ -50,7 +51,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private MultiItemResolverResult ResolveMultipleInternal(Folder parent,
|
private MultiItemResolverResult ResolveMultipleInternal(
|
||||||
|
Folder parent,
|
||||||
List<FileSystemMetadata> files,
|
List<FileSystemMetadata> files,
|
||||||
string collectionType,
|
string collectionType,
|
||||||
IDirectoryService directoryService)
|
IDirectoryService directoryService)
|
||||||
|
|
|
@ -50,7 +50,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Books
|
||||||
var fileExtension = Path.GetExtension(f.FullName) ??
|
var fileExtension = Path.GetExtension(f.FullName) ??
|
||||||
string.Empty;
|
string.Empty;
|
||||||
|
|
||||||
return _validExtensions.Contains(fileExtension,
|
return _validExtensions.Contains(
|
||||||
|
fileExtension,
|
||||||
StringComparer
|
StringComparer
|
||||||
.OrdinalIgnoreCase);
|
.OrdinalIgnoreCase);
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
|
@ -54,7 +54,8 @@ namespace Emby.Server.Implementations.Security
|
||||||
{
|
{
|
||||||
if (tableNewlyCreated && TableExists(connection, "AccessTokens"))
|
if (tableNewlyCreated && TableExists(connection, "AccessTokens"))
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
var existingColumnNames = GetColumnNames(db, "AccessTokens");
|
var existingColumnNames = GetColumnNames(db, "AccessTokens");
|
||||||
|
|
||||||
|
@ -88,7 +89,8 @@ namespace Emby.Server.Implementations.Security
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
using (var statement = db.PrepareStatement("insert into Tokens (AccessToken, DeviceId, AppName, AppVersion, DeviceName, UserId, UserName, IsActive, DateCreated, DateLastActivity) values (@AccessToken, @DeviceId, @AppName, @AppVersion, @DeviceName, @UserId, @UserName, @IsActive, @DateCreated, @DateLastActivity)"))
|
using (var statement = db.PrepareStatement("insert into Tokens (AccessToken, DeviceId, AppName, AppVersion, DeviceName, UserId, UserName, IsActive, DateCreated, DateLastActivity) values (@AccessToken, @DeviceId, @AppName, @AppVersion, @DeviceName, @UserId, @UserName, @IsActive, @DateCreated, @DateLastActivity)"))
|
||||||
{
|
{
|
||||||
|
@ -119,7 +121,8 @@ namespace Emby.Server.Implementations.Security
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
using (var statement = db.PrepareStatement("Update Tokens set AccessToken=@AccessToken, DeviceId=@DeviceId, AppName=@AppName, AppVersion=@AppVersion, DeviceName=@DeviceName, UserId=@UserId, UserName=@UserName, DateCreated=@DateCreated, DateLastActivity=@DateLastActivity where Id=@Id"))
|
using (var statement = db.PrepareStatement("Update Tokens set AccessToken=@AccessToken, DeviceId=@DeviceId, AppName=@AppName, AppVersion=@AppVersion, DeviceName=@DeviceName, UserId=@UserId, UserName=@UserName, DateCreated=@DateCreated, DateLastActivity=@DateLastActivity where Id=@Id"))
|
||||||
{
|
{
|
||||||
|
@ -151,7 +154,8 @@ namespace Emby.Server.Implementations.Security
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
using (var statement = db.PrepareStatement("Delete from Tokens where Id=@Id"))
|
using (var statement = db.PrepareStatement("Delete from Tokens where Id=@Id"))
|
||||||
{
|
{
|
||||||
|
@ -346,7 +350,8 @@ namespace Emby.Server.Implementations.Security
|
||||||
{
|
{
|
||||||
using (var connection = GetConnection(true))
|
using (var connection = GetConnection(true))
|
||||||
{
|
{
|
||||||
return connection.RunInTransaction(db =>
|
return connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
using (var statement = base.PrepareStatement(db, "select CustomName from Devices where Id=@DeviceId"))
|
using (var statement = base.PrepareStatement(db, "select CustomName from Devices where Id=@DeviceId"))
|
||||||
{
|
{
|
||||||
|
@ -377,7 +382,8 @@ namespace Emby.Server.Implementations.Security
|
||||||
|
|
||||||
using (var connection = GetConnection())
|
using (var connection = GetConnection())
|
||||||
{
|
{
|
||||||
connection.RunInTransaction(db =>
|
connection.RunInTransaction(
|
||||||
|
db =>
|
||||||
{
|
{
|
||||||
using (var statement = db.PrepareStatement("replace into devices (Id, CustomName, Capabilities) VALUES (@Id, @CustomName, (Select Capabilities from Devices where Id=@Id))"))
|
using (var statement = db.PrepareStatement("replace into devices (Id, CustomName, Capabilities) VALUES (@Id, @CustomName, (Select Capabilities from Devices where Id=@Id))"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
if (file.StartsWith("http", System.StringComparison.OrdinalIgnoreCase))
|
if (file.StartsWith("http", System.StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
item.SetImage(new ItemImageInfo
|
item.SetImage(
|
||||||
|
new ItemImageInfo
|
||||||
{
|
{
|
||||||
Path = file,
|
Path = file,
|
||||||
Type = imageType
|
Type = imageType
|
||||||
|
|
|
@ -255,7 +255,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
var id = child.Id;
|
var id = child.Id;
|
||||||
if (dictionary.ContainsKey(id))
|
if (dictionary.ContainsKey(id))
|
||||||
{
|
{
|
||||||
Logger.LogError("Found folder containing items with duplicate id. Path: {path}, Child Name: {ChildName}",
|
Logger.LogError(
|
||||||
|
"Found folder containing items with duplicate id. Path: {path}, Child Name: {ChildName}",
|
||||||
Path ?? Name,
|
Path ?? Name,
|
||||||
child.Path ?? child.Name);
|
child.Path ?? child.Name);
|
||||||
}
|
}
|
||||||
|
@ -984,7 +985,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool CollapseBoxSetItems(InternalItemsQuery query,
|
private static bool CollapseBoxSetItems(
|
||||||
|
InternalItemsQuery query,
|
||||||
BaseItem queryParent,
|
BaseItem queryParent,
|
||||||
User user,
|
User user,
|
||||||
IServerConfigurationManager configurationManager)
|
IServerConfigurationManager configurationManager)
|
||||||
|
@ -1593,7 +1595,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// <param name="datePlayed">The date played.</param>
|
/// <param name="datePlayed">The date played.</param>
|
||||||
/// <param name="resetPosition">if set to <c>true</c> [reset position].</param>
|
/// <param name="resetPosition">if set to <c>true</c> [reset position].</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
public override void MarkPlayed(User user,
|
public override void MarkPlayed(
|
||||||
|
User user,
|
||||||
DateTime? datePlayed,
|
DateTime? datePlayed,
|
||||||
bool resetPosition)
|
bool resetPosition)
|
||||||
{
|
{
|
||||||
|
|
|
@ -343,7 +343,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
var parentFolders = GetMediaFolders(parent, query.User, new[] { CollectionType.TvShows, string.Empty });
|
var parentFolders = GetMediaFolders(parent, query.User, new[] { CollectionType.TvShows, string.Empty });
|
||||||
|
|
||||||
var result = _tvSeriesManager.GetNextUp(new NextUpQuery
|
var result = _tvSeriesManager.GetNextUp(
|
||||||
|
new NextUpQuery
|
||||||
{
|
{
|
||||||
Limit = query.Limit,
|
Limit = query.Limit,
|
||||||
StartIndex = query.StartIndex,
|
StartIndex = query.StartIndex,
|
||||||
|
@ -443,7 +444,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return Filter(item, query.User, query, BaseItem.UserDataManager, BaseItem.LibraryManager);
|
return Filter(item, query.User, query, BaseItem.UserDataManager, BaseItem.LibraryManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static QueryResult<BaseItem> PostFilterAndSort(IEnumerable<BaseItem> items,
|
public static QueryResult<BaseItem> PostFilterAndSort(
|
||||||
|
IEnumerable<BaseItem> items,
|
||||||
BaseItem queryParent,
|
BaseItem queryParent,
|
||||||
int? totalRecordLimit,
|
int? totalRecordLimit,
|
||||||
InternalItemsQuery query,
|
InternalItemsQuery query,
|
||||||
|
|
|
@ -566,7 +566,8 @@ namespace MediaBrowser.Controller.Library
|
||||||
|
|
||||||
int GetCount(InternalItemsQuery query);
|
int GetCount(InternalItemsQuery query);
|
||||||
|
|
||||||
void AddExternalSubtitleStreams(List<MediaStream> streams,
|
void AddExternalSubtitleStreams(
|
||||||
|
List<MediaStream> streams,
|
||||||
string videoPath,
|
string videoPath,
|
||||||
string[] files);
|
string[] files);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1822,7 +1822,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
return (Convert.ToInt32(outputWidth), Convert.ToInt32(outputHeight));
|
return (Convert.ToInt32(outputWidth), Convert.ToInt32(outputHeight));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<string> GetScalingFilters(EncodingJobInfo state,
|
public List<string> GetScalingFilters(
|
||||||
|
EncodingJobInfo state,
|
||||||
int? videoWidth,
|
int? videoWidth,
|
||||||
int? videoHeight,
|
int? videoHeight,
|
||||||
Video3DFormat? threedFormat,
|
Video3DFormat? threedFormat,
|
||||||
|
|
|
@ -342,7 +342,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
{
|
{
|
||||||
var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
|
var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
|
||||||
|
|
||||||
var newSize = DrawingUtils.Resize(size,
|
var newSize = DrawingUtils.Resize(
|
||||||
|
size,
|
||||||
BaseRequest.Width ?? 0,
|
BaseRequest.Width ?? 0,
|
||||||
BaseRequest.Height ?? 0,
|
BaseRequest.Height ?? 0,
|
||||||
BaseRequest.MaxWidth ?? 0,
|
BaseRequest.MaxWidth ?? 0,
|
||||||
|
@ -368,7 +369,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
{
|
{
|
||||||
var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
|
var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
|
||||||
|
|
||||||
var newSize = DrawingUtils.Resize(size,
|
var newSize = DrawingUtils.Resize(
|
||||||
|
size,
|
||||||
BaseRequest.Width ?? 0,
|
BaseRequest.Width ?? 0,
|
||||||
BaseRequest.Height ?? 0,
|
BaseRequest.Height ?? 0,
|
||||||
BaseRequest.MaxWidth ?? 0,
|
BaseRequest.MaxWidth ?? 0,
|
||||||
|
|
|
@ -68,7 +68,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Extracts the video images on interval.
|
/// Extracts the video images on interval.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task ExtractVideoImagesOnInterval(string[] inputFiles,
|
Task ExtractVideoImagesOnInterval(
|
||||||
|
string[] inputFiles,
|
||||||
string container,
|
string container,
|
||||||
MediaStream videoStream,
|
MediaStream videoStream,
|
||||||
MediaProtocol protocol,
|
MediaProtocol protocol,
|
||||||
|
|
|
@ -29,7 +29,8 @@ namespace MediaBrowser.Controller.Resolvers
|
||||||
|
|
||||||
public interface IMultiItemResolver
|
public interface IMultiItemResolver
|
||||||
{
|
{
|
||||||
MultiItemResolverResult ResolveMultiple(Folder parent,
|
MultiItemResolverResult ResolveMultiple(
|
||||||
|
Folder parent,
|
||||||
List<FileSystemMetadata> files,
|
List<FileSystemMetadata> files,
|
||||||
string collectionType,
|
string collectionType,
|
||||||
IDirectoryService directoryService);
|
IDirectoryService directoryService);
|
||||||
|
|
|
@ -38,7 +38,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
";DLNA.ORG_FLAGS={0}",
|
";DLNA.ORG_FLAGS={0}",
|
||||||
DlnaMaps.FlagsToString(flagValue));
|
DlnaMaps.FlagsToString(flagValue));
|
||||||
|
|
||||||
ResponseProfile mediaProfile = _profile.GetImageMediaProfile(container,
|
ResponseProfile mediaProfile = _profile.GetImageMediaProfile(
|
||||||
|
container,
|
||||||
width,
|
width,
|
||||||
height);
|
height);
|
||||||
|
|
||||||
|
@ -160,7 +161,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
string dlnaflags = string.Format(CultureInfo.InvariantCulture, ";DLNA.ORG_FLAGS={0}",
|
string dlnaflags = string.Format(CultureInfo.InvariantCulture, ";DLNA.ORG_FLAGS={0}",
|
||||||
DlnaMaps.FlagsToString(flagValue));
|
DlnaMaps.FlagsToString(flagValue));
|
||||||
|
|
||||||
ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(container,
|
ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(
|
||||||
|
container,
|
||||||
audioCodec,
|
audioCodec,
|
||||||
videoCodec,
|
videoCodec,
|
||||||
width,
|
width,
|
||||||
|
@ -221,7 +223,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
private static string GetImageOrgPnValue(string container, int? width, int? height)
|
private static string GetImageOrgPnValue(string container, int? width, int? height)
|
||||||
{
|
{
|
||||||
MediaFormatProfile? format = new MediaFormatProfileResolver()
|
MediaFormatProfile? format = new MediaFormatProfileResolver()
|
||||||
.ResolveImageFormat(container,
|
.ResolveImageFormat(
|
||||||
|
container,
|
||||||
width,
|
width,
|
||||||
height);
|
height);
|
||||||
|
|
||||||
|
@ -231,7 +234,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
private static string GetAudioOrgPnValue(string container, int? audioBitrate, int? audioSampleRate, int? audioChannels)
|
private static string GetAudioOrgPnValue(string container, int? audioBitrate, int? audioSampleRate, int? audioChannels)
|
||||||
{
|
{
|
||||||
MediaFormatProfile? format = new MediaFormatProfileResolver()
|
MediaFormatProfile? format = new MediaFormatProfileResolver()
|
||||||
.ResolveAudioFormat(container,
|
.ResolveAudioFormat(
|
||||||
|
container,
|
||||||
audioBitrate,
|
audioBitrate,
|
||||||
audioSampleRate,
|
audioSampleRate,
|
||||||
audioChannels);
|
audioChannels);
|
||||||
|
|
|
@ -277,7 +277,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResponseProfile GetVideoMediaProfile(string container,
|
public ResponseProfile GetVideoMediaProfile(
|
||||||
|
string container,
|
||||||
string audioCodec,
|
string audioCodec,
|
||||||
string videoCodec,
|
string videoCodec,
|
||||||
int? width,
|
int? width,
|
||||||
|
|
|
@ -455,7 +455,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
|
|
||||||
if (directPlayProfile == null)
|
if (directPlayProfile == null)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Profile: {0}, No audio direct play profiles found for {1} with codec {2}",
|
_logger.LogInformation(
|
||||||
|
"Profile: {0}, No audio direct play profiles found for {1} with codec {2}",
|
||||||
options.Profile.Name ?? "Unknown Profile",
|
options.Profile.Name ?? "Unknown Profile",
|
||||||
item.Path ?? "Unknown path",
|
item.Path ?? "Unknown path",
|
||||||
audioStream.Codec ?? "Unknown codec");
|
audioStream.Codec ?? "Unknown codec");
|
||||||
|
@ -679,7 +680,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
bool isEligibleForDirectPlay = options.EnableDirectPlay && (options.ForceDirectPlay || directPlayEligibilityResult.Item1);
|
bool isEligibleForDirectPlay = options.EnableDirectPlay && (options.ForceDirectPlay || directPlayEligibilityResult.Item1);
|
||||||
bool isEligibleForDirectStream = options.EnableDirectStream && (options.ForceDirectStream || directStreamEligibilityResult.Item1);
|
bool isEligibleForDirectStream = options.EnableDirectStream && (options.ForceDirectStream || directStreamEligibilityResult.Item1);
|
||||||
|
|
||||||
_logger.LogInformation("Profile: {0}, Path: {1}, isEligibleForDirectPlay: {2}, isEligibleForDirectStream: {3}",
|
_logger.LogInformation(
|
||||||
|
"Profile: {0}, Path: {1}, isEligibleForDirectPlay: {2}, isEligibleForDirectStream: {3}",
|
||||||
options.Profile.Name ?? "Unknown Profile",
|
options.Profile.Name ?? "Unknown Profile",
|
||||||
item.Path ?? "Unknown path",
|
item.Path ?? "Unknown path",
|
||||||
isEligibleForDirectPlay,
|
isEligibleForDirectPlay,
|
||||||
|
@ -973,7 +975,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
|
|
||||||
if (directPlay == null)
|
if (directPlay == null)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Profile: {0}, No video direct play profiles found for {1} with codec {2}",
|
_logger.LogInformation(
|
||||||
|
"Profile: {0}, No video direct play profiles found for {1} with codec {2}",
|
||||||
profile.Name ?? "Unknown Profile",
|
profile.Name ?? "Unknown Profile",
|
||||||
mediaSource.Path ?? "Unknown path",
|
mediaSource.Path ?? "Unknown path",
|
||||||
videoStream.Codec ?? "Unknown codec");
|
videoStream.Codec ?? "Unknown codec");
|
||||||
|
@ -1137,7 +1140,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
|
|
||||||
private void LogConditionFailure(DeviceProfile profile, string type, ProfileCondition condition, MediaSourceInfo mediaSource)
|
private void LogConditionFailure(DeviceProfile profile, string type, ProfileCondition condition, MediaSourceInfo mediaSource)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Profile: {0}, DirectPlay=false. Reason={1}.{2} Condition: {3}. ConditionValue: {4}. IsRequired: {5}. Path: {6}",
|
_logger.LogInformation(
|
||||||
|
"Profile: {0}, DirectPlay=false. Reason={1}.{2} Condition: {3}. ConditionValue: {4}. IsRequired: {5}. Path: {6}",
|
||||||
type,
|
type,
|
||||||
profile.Name ?? "Unknown Profile",
|
profile.Name ?? "Unknown Profile",
|
||||||
condition.Property,
|
condition.Property,
|
||||||
|
@ -1342,7 +1346,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
|
|
||||||
if (itemBitrate > requestedMaxBitrate)
|
if (itemBitrate > requestedMaxBitrate)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Bitrate exceeds {PlayBackMethod} limit: media bitrate: {MediaBitrate}, max bitrate: {MaxBitrate}",
|
_logger.LogInformation(
|
||||||
|
"Bitrate exceeds {PlayBackMethod} limit: media bitrate: {MediaBitrate}, max bitrate: {MaxBitrate}",
|
||||||
playMethod, itemBitrate, requestedMaxBitrate);
|
playMethod, itemBitrate, requestedMaxBitrate);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
||||||
string language,
|
string language,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
searchInfo.SeriesProviderIds.TryGetValue(nameof(MetadataProvider.Tvdb),
|
searchInfo.SeriesProviderIds.TryGetValue(
|
||||||
|
nameof(MetadataProvider.Tvdb),
|
||||||
out var seriesTvdbId);
|
out var seriesTvdbId);
|
||||||
|
|
||||||
var episodeQuery = new EpisodeQuery();
|
var episodeQuery = new EpisodeQuery();
|
||||||
|
|
|
@ -106,7 +106,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
if (string.IsNullOrEmpty(episodeTvdbId))
|
if (string.IsNullOrEmpty(episodeTvdbId))
|
||||||
{
|
{
|
||||||
_logger.LogError("Episode {SeasonNumber}x{EpisodeNumber} not found for series {SeriesTvdbId}",
|
_logger.LogError(
|
||||||
|
"Episode {SeasonNumber}x{EpisodeNumber} not found for series {SeriesTvdbId}",
|
||||||
searchInfo.ParentIndexNumber, searchInfo.IndexNumber, seriesTvdbId);
|
searchInfo.ParentIndexNumber, searchInfo.IndexNumber, seriesTvdbId);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue