mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	Merge pull request #4315 from Jan-PieterBaert/fix-warnings
Fix some warnings
This commit is contained in:
		
						commit
						d54de29485
					
				@ -157,7 +157,8 @@ namespace Emby.Server.Implementations.Data
 | 
			
		||||
 | 
			
		||||
        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"))
 | 
			
		||||
                {
 | 
			
		||||
 | 
			
		||||
@ -219,7 +219,8 @@ namespace Emby.Server.Implementations.Data
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunQueries(queries);
 | 
			
		||||
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    var existingColumnNames = GetColumnNames(db, "AncestorIds");
 | 
			
		||||
                    AddColumn(db, "AncestorIds", "AncestorIdText", "Text", existingColumnNames);
 | 
			
		||||
@ -495,7 +496,8 @@ namespace Emby.Server.Implementations.Data
 | 
			
		||||
 | 
			
		||||
            using (var connection = GetConnection())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    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())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    SaveItemsInTranscation(db, tuples);
 | 
			
		||||
                }, TransactionMode);
 | 
			
		||||
@ -2032,7 +2035,8 @@ namespace Emby.Server.Implementations.Data
 | 
			
		||||
 | 
			
		||||
            using (var connection = GetConnection())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    // First delete chapters
 | 
			
		||||
                    db.Execute("delete from " + ChaptersTableName + " where ItemId=@ItemId", idBlob);
 | 
			
		||||
@ -2921,7 +2925,8 @@ namespace Emby.Server.Implementations.Data
 | 
			
		||||
            var result = new QueryResult<BaseItem>();
 | 
			
		||||
            using (var connection = GetConnection(true))
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    var statements = PrepareAll(db, statementTexts);
 | 
			
		||||
 | 
			
		||||
@ -3324,7 +3329,8 @@ namespace Emby.Server.Implementations.Data
 | 
			
		||||
            var result = new QueryResult<Guid>();
 | 
			
		||||
            using (var connection = GetConnection(true))
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    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())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    connection.ExecuteAll(sql);
 | 
			
		||||
                }, TransactionMode);
 | 
			
		||||
@ -4950,7 +4957,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
 | 
			
		||||
 | 
			
		||||
            using (var connection = GetConnection())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    var idBlob = id.ToByteArray();
 | 
			
		||||
 | 
			
		||||
@ -5357,7 +5365,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
 | 
			
		||||
 | 
			
		||||
                itemCountColumns = new Dictionary<string, string>()
 | 
			
		||||
                {
 | 
			
		||||
                    { "itemTypes", "(" + itemCountColumnQuery + ") as itemTypes"}
 | 
			
		||||
                    { "itemTypes", "(" + itemCountColumnQuery + ") as itemTypes" }
 | 
			
		||||
                };
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@ -5744,7 +5752,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
 | 
			
		||||
 | 
			
		||||
            using (var connection = GetConnection())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    var itemIdBlob = itemId.ToByteArray();
 | 
			
		||||
 | 
			
		||||
@ -5898,7 +5907,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
 | 
			
		||||
 | 
			
		||||
            using (var connection = GetConnection())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    var itemIdBlob = id.ToByteArray();
 | 
			
		||||
 | 
			
		||||
@ -6232,7 +6242,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
 | 
			
		||||
 | 
			
		||||
            using (var connection = GetConnection())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    var itemIdBlob = id.ToByteArray();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -44,7 +44,8 @@ namespace Emby.Server.Implementations.Data
 | 
			
		||||
 | 
			
		||||
                var users = userDatasTableExists ? null : userManager.Users;
 | 
			
		||||
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    db.ExecuteAll(string.Join(";", new[] {
 | 
			
		||||
 | 
			
		||||
@ -178,7 +179,8 @@ namespace Emby.Server.Implementations.Data
 | 
			
		||||
 | 
			
		||||
            using (var connection = GetConnection())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    SaveUserData(db, internalUserId, key, userData);
 | 
			
		||||
                }, TransactionMode);
 | 
			
		||||
@ -246,7 +248,8 @@ namespace Emby.Server.Implementations.Data
 | 
			
		||||
 | 
			
		||||
            using (var connection = GetConnection())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    foreach (var userItemData in userDataList)
 | 
			
		||||
                    {
 | 
			
		||||
 | 
			
		||||
@ -32,7 +32,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
 | 
			
		||||
        /// <value>The priority.</value>
 | 
			
		||||
        public override ResolverPriority Priority => ResolverPriority.Fourth;
 | 
			
		||||
 | 
			
		||||
        public MultiItemResolverResult ResolveMultiple(Folder parent,
 | 
			
		||||
        public MultiItemResolverResult ResolveMultiple(
 | 
			
		||||
            Folder parent,
 | 
			
		||||
            List<FileSystemMetadata> files,
 | 
			
		||||
            string collectionType,
 | 
			
		||||
            IDirectoryService directoryService)
 | 
			
		||||
@ -50,7 +51,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
 | 
			
		||||
            return result;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private MultiItemResolverResult ResolveMultipleInternal(Folder parent,
 | 
			
		||||
        private MultiItemResolverResult ResolveMultipleInternal(
 | 
			
		||||
            Folder parent,
 | 
			
		||||
            List<FileSystemMetadata> files,
 | 
			
		||||
            string collectionType,
 | 
			
		||||
            IDirectoryService directoryService)
 | 
			
		||||
 | 
			
		||||
@ -50,7 +50,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Books
 | 
			
		||||
                var fileExtension = Path.GetExtension(f.FullName) ??
 | 
			
		||||
                                    string.Empty;
 | 
			
		||||
 | 
			
		||||
                return _validExtensions.Contains(fileExtension,
 | 
			
		||||
                return _validExtensions.Contains(
 | 
			
		||||
                    fileExtension,
 | 
			
		||||
                                                StringComparer
 | 
			
		||||
                                                    .OrdinalIgnoreCase);
 | 
			
		||||
            }).ToList();
 | 
			
		||||
 | 
			
		||||
@ -43,7 +43,7 @@ namespace Emby.Server.Implementations.LiveTv
 | 
			
		||||
            return new[]
 | 
			
		||||
            {
 | 
			
		||||
                // Every so often
 | 
			
		||||
                new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}
 | 
			
		||||
                new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks }
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -71,7 +71,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
 | 
			
		||||
            return new[]
 | 
			
		||||
            {
 | 
			
		||||
                // Every so often
 | 
			
		||||
                new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}
 | 
			
		||||
                new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks }
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -65,7 +65,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
 | 
			
		||||
        {
 | 
			
		||||
            return new[]
 | 
			
		||||
            {
 | 
			
		||||
                new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}
 | 
			
		||||
                new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks }
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -54,7 +54,8 @@ namespace Emby.Server.Implementations.Security
 | 
			
		||||
            {
 | 
			
		||||
                if (tableNewlyCreated && TableExists(connection, "AccessTokens"))
 | 
			
		||||
                {
 | 
			
		||||
                    connection.RunInTransaction(db =>
 | 
			
		||||
                    connection.RunInTransaction(
 | 
			
		||||
                    db =>
 | 
			
		||||
                    {
 | 
			
		||||
                        var existingColumnNames = GetColumnNames(db, "AccessTokens");
 | 
			
		||||
 | 
			
		||||
@ -88,7 +89,8 @@ namespace Emby.Server.Implementations.Security
 | 
			
		||||
 | 
			
		||||
            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)"))
 | 
			
		||||
                    {
 | 
			
		||||
@ -119,7 +121,8 @@ namespace Emby.Server.Implementations.Security
 | 
			
		||||
 | 
			
		||||
            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"))
 | 
			
		||||
                    {
 | 
			
		||||
@ -151,7 +154,8 @@ namespace Emby.Server.Implementations.Security
 | 
			
		||||
 | 
			
		||||
            using (var connection = GetConnection())
 | 
			
		||||
            {
 | 
			
		||||
                connection.RunInTransaction(db =>
 | 
			
		||||
                connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    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))
 | 
			
		||||
            {
 | 
			
		||||
                return connection.RunInTransaction(db =>
 | 
			
		||||
                return connection.RunInTransaction(
 | 
			
		||||
                db =>
 | 
			
		||||
                {
 | 
			
		||||
                    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())
 | 
			
		||||
            {
 | 
			
		||||
                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))"))
 | 
			
		||||
                    {
 | 
			
		||||
 | 
			
		||||
@ -45,7 +45,8 @@ namespace MediaBrowser.Controller.Entities
 | 
			
		||||
        {
 | 
			
		||||
            if (file.StartsWith("http", System.StringComparison.OrdinalIgnoreCase))
 | 
			
		||||
            {
 | 
			
		||||
                item.SetImage(new ItemImageInfo
 | 
			
		||||
                item.SetImage(
 | 
			
		||||
                new ItemImageInfo
 | 
			
		||||
                {
 | 
			
		||||
                    Path = file,
 | 
			
		||||
                    Type = imageType
 | 
			
		||||
 | 
			
		||||
@ -255,7 +255,8 @@ namespace MediaBrowser.Controller.Entities
 | 
			
		||||
                var id = child.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,
 | 
			
		||||
                        child.Path ?? child.Name);
 | 
			
		||||
                }
 | 
			
		||||
@ -984,7 +985,8 @@ namespace MediaBrowser.Controller.Entities
 | 
			
		||||
            return items;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private static bool CollapseBoxSetItems(InternalItemsQuery query,
 | 
			
		||||
        private static bool CollapseBoxSetItems(
 | 
			
		||||
            InternalItemsQuery query,
 | 
			
		||||
            BaseItem queryParent,
 | 
			
		||||
            User user,
 | 
			
		||||
            IServerConfigurationManager configurationManager)
 | 
			
		||||
@ -1593,7 +1595,8 @@ namespace MediaBrowser.Controller.Entities
 | 
			
		||||
        /// <param name="datePlayed">The date played.</param>
 | 
			
		||||
        /// <param name="resetPosition">if set to <c>true</c> [reset position].</param>
 | 
			
		||||
        /// <returns>Task.</returns>
 | 
			
		||||
        public override void MarkPlayed(User user,
 | 
			
		||||
        public override void MarkPlayed(
 | 
			
		||||
            User user,
 | 
			
		||||
            DateTime? datePlayed,
 | 
			
		||||
            bool resetPosition)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
@ -343,7 +343,8 @@ namespace MediaBrowser.Controller.Entities
 | 
			
		||||
        {
 | 
			
		||||
            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,
 | 
			
		||||
                StartIndex = query.StartIndex,
 | 
			
		||||
@ -443,7 +444,8 @@ namespace MediaBrowser.Controller.Entities
 | 
			
		||||
            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,
 | 
			
		||||
            int? totalRecordLimit,
 | 
			
		||||
            InternalItemsQuery query,
 | 
			
		||||
 | 
			
		||||
@ -566,7 +566,8 @@ namespace MediaBrowser.Controller.Library
 | 
			
		||||
 | 
			
		||||
        int GetCount(InternalItemsQuery query);
 | 
			
		||||
 | 
			
		||||
        void AddExternalSubtitleStreams(List<MediaStream> streams,
 | 
			
		||||
        void AddExternalSubtitleStreams(
 | 
			
		||||
            List<MediaStream> streams,
 | 
			
		||||
            string videoPath,
 | 
			
		||||
            string[] files);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -70,15 +70,15 @@ namespace MediaBrowser.Controller.MediaEncoding
 | 
			
		||||
 | 
			
		||||
                var codecMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
 | 
			
		||||
                {
 | 
			
		||||
                    {"qsv",                  hwEncoder + "_qsv"},
 | 
			
		||||
                    {hwEncoder + "_qsv",     hwEncoder + "_qsv"},
 | 
			
		||||
                    {"nvenc",                hwEncoder + "_nvenc"},
 | 
			
		||||
                    {"amf",                  hwEncoder + "_amf"},
 | 
			
		||||
                    {"omx",                  hwEncoder + "_omx"},
 | 
			
		||||
                    {hwEncoder + "_v4l2m2m", hwEncoder + "_v4l2m2m"},
 | 
			
		||||
                    {"mediacodec",           hwEncoder + "_mediacodec"},
 | 
			
		||||
                    {"vaapi",                hwEncoder + "_vaapi"},
 | 
			
		||||
                    {"videotoolbox",         hwEncoder + "_videotoolbox"}
 | 
			
		||||
                    { "qsv",                  hwEncoder + "_qsv" },
 | 
			
		||||
                    { hwEncoder + "_qsv",     hwEncoder + "_qsv" },
 | 
			
		||||
                    { "nvenc",                hwEncoder + "_nvenc" },
 | 
			
		||||
                    { "amf",                  hwEncoder + "_amf" },
 | 
			
		||||
                    { "omx",                  hwEncoder + "_omx" },
 | 
			
		||||
                    { hwEncoder + "_v4l2m2m", hwEncoder + "_v4l2m2m" },
 | 
			
		||||
                    { "mediacodec",           hwEncoder + "_mediacodec" },
 | 
			
		||||
                    { "vaapi",                hwEncoder + "_vaapi" },
 | 
			
		||||
                    { "videotoolbox",         hwEncoder + "_videotoolbox" }
 | 
			
		||||
                };
 | 
			
		||||
 | 
			
		||||
                if (!string.IsNullOrEmpty(hwType)
 | 
			
		||||
@ -1822,7 +1822,8 @@ namespace MediaBrowser.Controller.MediaEncoding
 | 
			
		||||
            return (Convert.ToInt32(outputWidth), Convert.ToInt32(outputHeight));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public List<string> GetScalingFilters(EncodingJobInfo state,
 | 
			
		||||
        public List<string> GetScalingFilters(
 | 
			
		||||
            EncodingJobInfo state,
 | 
			
		||||
            int? videoWidth,
 | 
			
		||||
            int? videoHeight,
 | 
			
		||||
            Video3DFormat? threedFormat,
 | 
			
		||||
 | 
			
		||||
@ -342,7 +342,8 @@ namespace MediaBrowser.Controller.MediaEncoding
 | 
			
		||||
                {
 | 
			
		||||
                    var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
 | 
			
		||||
 | 
			
		||||
                    var newSize = DrawingUtils.Resize(size,
 | 
			
		||||
                    var newSize = DrawingUtils.Resize(
 | 
			
		||||
                        size,
 | 
			
		||||
                        BaseRequest.Width ?? 0,
 | 
			
		||||
                        BaseRequest.Height ?? 0,
 | 
			
		||||
                        BaseRequest.MaxWidth ?? 0,
 | 
			
		||||
@ -368,7 +369,8 @@ namespace MediaBrowser.Controller.MediaEncoding
 | 
			
		||||
                {
 | 
			
		||||
                    var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
 | 
			
		||||
 | 
			
		||||
                    var newSize = DrawingUtils.Resize(size,
 | 
			
		||||
                    var newSize = DrawingUtils.Resize(
 | 
			
		||||
                        size,
 | 
			
		||||
                        BaseRequest.Width ?? 0,
 | 
			
		||||
                        BaseRequest.Height ?? 0,
 | 
			
		||||
                        BaseRequest.MaxWidth ?? 0,
 | 
			
		||||
 | 
			
		||||
@ -68,7 +68,8 @@ namespace MediaBrowser.Controller.MediaEncoding
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Extracts the video images on interval.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        Task ExtractVideoImagesOnInterval(string[] inputFiles,
 | 
			
		||||
        Task ExtractVideoImagesOnInterval(
 | 
			
		||||
            string[] inputFiles,
 | 
			
		||||
            string container,
 | 
			
		||||
            MediaStream videoStream,
 | 
			
		||||
            MediaProtocol protocol,
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,8 @@ namespace MediaBrowser.Controller.Resolvers
 | 
			
		||||
 | 
			
		||||
    public interface IMultiItemResolver
 | 
			
		||||
    {
 | 
			
		||||
        MultiItemResolverResult ResolveMultiple(Folder parent,
 | 
			
		||||
        MultiItemResolverResult ResolveMultiple(
 | 
			
		||||
            Folder parent,
 | 
			
		||||
            List<FileSystemMetadata> files,
 | 
			
		||||
            string collectionType,
 | 
			
		||||
            IDirectoryService directoryService);
 | 
			
		||||
 | 
			
		||||
@ -38,7 +38,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
                ";DLNA.ORG_FLAGS={0}",
 | 
			
		||||
                DlnaMaps.FlagsToString(flagValue));
 | 
			
		||||
 | 
			
		||||
            ResponseProfile mediaProfile = _profile.GetImageMediaProfile(container,
 | 
			
		||||
            ResponseProfile mediaProfile = _profile.GetImageMediaProfile(
 | 
			
		||||
                container,
 | 
			
		||||
                width,
 | 
			
		||||
                height);
 | 
			
		||||
 | 
			
		||||
@ -160,7 +161,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
            string dlnaflags = string.Format(CultureInfo.InvariantCulture, ";DLNA.ORG_FLAGS={0}",
 | 
			
		||||
             DlnaMaps.FlagsToString(flagValue));
 | 
			
		||||
 | 
			
		||||
            ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(container,
 | 
			
		||||
            ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(
 | 
			
		||||
                container,
 | 
			
		||||
                audioCodec,
 | 
			
		||||
                videoCodec,
 | 
			
		||||
                width,
 | 
			
		||||
@ -221,7 +223,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
        private static string GetImageOrgPnValue(string container, int? width, int? height)
 | 
			
		||||
        {
 | 
			
		||||
            MediaFormatProfile? format = new MediaFormatProfileResolver()
 | 
			
		||||
                .ResolveImageFormat(container,
 | 
			
		||||
                .ResolveImageFormat(
 | 
			
		||||
                container,
 | 
			
		||||
                width,
 | 
			
		||||
                height);
 | 
			
		||||
 | 
			
		||||
@ -231,7 +234,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
        private static string GetAudioOrgPnValue(string container, int? audioBitrate, int? audioSampleRate, int? audioChannels)
 | 
			
		||||
        {
 | 
			
		||||
            MediaFormatProfile? format = new MediaFormatProfileResolver()
 | 
			
		||||
                .ResolveAudioFormat(container,
 | 
			
		||||
                .ResolveAudioFormat(
 | 
			
		||||
                container,
 | 
			
		||||
                audioBitrate,
 | 
			
		||||
                audioSampleRate,
 | 
			
		||||
                audioChannels);
 | 
			
		||||
 | 
			
		||||
@ -277,7 +277,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public ResponseProfile GetVideoMediaProfile(string container,
 | 
			
		||||
        public ResponseProfile GetVideoMediaProfile(
 | 
			
		||||
            string container,
 | 
			
		||||
            string audioCodec,
 | 
			
		||||
            string videoCodec,
 | 
			
		||||
            int? width,
 | 
			
		||||
 | 
			
		||||
@ -455,7 +455,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
 | 
			
		||||
            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",
 | 
			
		||||
                    item.Path ?? "Unknown path",
 | 
			
		||||
                    audioStream.Codec ?? "Unknown codec");
 | 
			
		||||
@ -679,7 +680,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
            bool isEligibleForDirectPlay = options.EnableDirectPlay && (options.ForceDirectPlay || directPlayEligibilityResult.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",
 | 
			
		||||
                item.Path ?? "Unknown path",
 | 
			
		||||
                isEligibleForDirectPlay,
 | 
			
		||||
@ -973,7 +975,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
 | 
			
		||||
            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",
 | 
			
		||||
                    mediaSource.Path ?? "Unknown path",
 | 
			
		||||
                    videoStream.Codec ?? "Unknown codec");
 | 
			
		||||
@ -1137,7 +1140,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
 | 
			
		||||
        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,
 | 
			
		||||
                profile.Name ?? "Unknown Profile",
 | 
			
		||||
                condition.Property,
 | 
			
		||||
@ -1342,7 +1346,8 @@ namespace MediaBrowser.Model.Dlna
 | 
			
		||||
 | 
			
		||||
            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);
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@ -214,7 +214,7 @@ namespace MediaBrowser.Providers.MediaInfo
 | 
			
		||||
            return new[]
 | 
			
		||||
            {
 | 
			
		||||
                // Every so often
 | 
			
		||||
                new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}
 | 
			
		||||
                new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks }
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -150,7 +150,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
 | 
			
		||||
            string language,
 | 
			
		||||
            CancellationToken cancellationToken)
 | 
			
		||||
        {
 | 
			
		||||
            searchInfo.SeriesProviderIds.TryGetValue(nameof(MetadataProvider.Tvdb),
 | 
			
		||||
            searchInfo.SeriesProviderIds.TryGetValue(
 | 
			
		||||
                nameof(MetadataProvider.Tvdb),
 | 
			
		||||
                out var seriesTvdbId);
 | 
			
		||||
 | 
			
		||||
            var episodeQuery = new EpisodeQuery();
 | 
			
		||||
 | 
			
		||||
@ -106,7 +106,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
 | 
			
		||||
                    .ConfigureAwait(false);
 | 
			
		||||
                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);
 | 
			
		||||
                    return result;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user