From ccc5f60c01213ecb16ded95df6180b6978763d1a Mon Sep 17 00:00:00 2001 From: Fooxboy Date: Wed, 12 Jun 2024 14:13:59 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20VkBlockHelper.cs"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 01fe732a3eb5ca3a30d5f7eaa652ab67d92758e1. --- MusicX.Core/Helpers/BlockExtensions.Fetch.cs | 129 --- .../Helpers/BlockExtensions.Process.cs | 59 -- .../Helpers/Processors/BlocksProcessor.cs | 29 - .../Helpers/Processors/PlaylistsProcessor.cs | 37 - .../Processors/ReplacementsProcessor.cs | 34 - .../Helpers/Processors/SectionProcessor.cs | 194 ----- MusicX.Core/Helpers/VkBlockHelper.cs | 773 +++++++++++++++++- .../Models/Abstractions/IBlockEntity.cs | 6 - .../Abstractions/IBlockEntityWithOwner.cs | 6 - MusicX.Core/Models/Artist.cs | 49 +- MusicX.Core/Models/Audio.cs | 167 ++-- .../Models/AudioFollowingsUpdateInfo.cs | 9 +- MusicX.Core/Models/CatalogBanner.cs | 60 +- MusicX.Core/Models/Curator.cs | 43 +- MusicX.Core/Models/General/ResponseVk.cs | 6 +- MusicX.Core/Models/Group.cs | 74 +- MusicX.Core/Models/Link.cs | 3 +- MusicX.Core/Models/Longread.cs | 3 +- MusicX.Core/Models/MusicOwner.cs | 5 +- MusicX.Core/Models/Placeholder.cs | 30 +- MusicX.Core/Models/Playlist.cs | 3 +- MusicX.Core/Models/PodcastEpisode.cs | 3 +- MusicX.Core/Models/PodcastSliderItem.cs | 27 +- MusicX.Core/Models/Replacements.cs | 2 +- MusicX.Core/Models/Suggestion.cs | 3 +- MusicX.Core/Models/Text.cs | 22 +- MusicX.Core/Models/Video.cs | 3 +- MusicX.Core/Services/VkService.cs | 20 +- 28 files changed, 1029 insertions(+), 770 deletions(-) delete mode 100644 MusicX.Core/Helpers/BlockExtensions.Fetch.cs delete mode 100644 MusicX.Core/Helpers/BlockExtensions.Process.cs delete mode 100644 MusicX.Core/Helpers/Processors/BlocksProcessor.cs delete mode 100644 MusicX.Core/Helpers/Processors/PlaylistsProcessor.cs delete mode 100644 MusicX.Core/Helpers/Processors/ReplacementsProcessor.cs delete mode 100644 MusicX.Core/Helpers/Processors/SectionProcessor.cs delete mode 100644 MusicX.Core/Models/Abstractions/IBlockEntity.cs delete mode 100644 MusicX.Core/Models/Abstractions/IBlockEntityWithOwner.cs diff --git a/MusicX.Core/Helpers/BlockExtensions.Fetch.cs b/MusicX.Core/Helpers/BlockExtensions.Fetch.cs deleted file mode 100644 index 8054f519..00000000 --- a/MusicX.Core/Helpers/BlockExtensions.Fetch.cs +++ /dev/null @@ -1,129 +0,0 @@ -using MusicX.Core.Models; -using MusicX.Core.Models.Abstractions; - -namespace MusicX.Core.Helpers; - -internal static partial class BlockExtensions -{ - private static IEnumerable GetSuggestionsForBlock(this Block block, List suggestions) => - GetItemsForBlock(block.SuggestionsIds, suggestions); - - private static IEnumerable GetPlaceholdersForBlock(this Block block, List placeholders) => - GetItemsForBlock(block.PlaceholdersIds, placeholders); - - private static IEnumerable GetArtistsForBlock(this Block block, List artists) => - GetItemsForBlock(block.ArtistsIds, artists); - - private static IEnumerable GetTextsForBlock(this Block block, List texts) => - GetItemsForBlock(block.TextIds, texts); - - private static IEnumerable GetGroupsForBlock(this Block block, List groups) - { - var groupIds = block.GroupIds.Concat( - block.GroupsItemsIds.Select(g => (long)g.Id)); - - return GetItemsForBlock(groupIds, groups); - } - - private static IEnumerable GetCuratorsForBlock(this Block block, List curators) => - GetItemsForBlock(block.CuratorsIds, curators); - - private static IEnumerable GetMusicOwnersForBlock(this Block block, List musicOwners) => - GetItemsForBlock(block.MusicOwnerIds, musicOwners); - - - private static IEnumerable GetFollowingsUpdateInfosForBlock( - this Block block, - List followingsUpdateInfos) => - GetItemsForBlock(block.FollowingUpdateInfoIds, followingsUpdateInfos); - - private static IEnumerable GetCatalogBannersForBlock( - this Block block, - List catalogBanners) => - GetItemsForBlock(block.CatalogBannerIds, catalogBanners); - - private static IEnumerable GetLinksForBlock(this Block block, List links) => - GetItemsForBlock(block.LinksIds, links); - - private static IEnumerable