Skip to content

Commit 6fca346

Browse files
committed
Made filter apply to all DMD sources
1 parent 9f77a6c commit 6fca346

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

AlbumShuffler.Tools.sln.DotSettings.user

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJsonConverter_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F265626ef4bed41aa9966319cc8ce0f3c16d400_003Fea_003Fa939c526_003FJsonConverter_00601_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
1010
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJsonConverter_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fad90cdf951354465a314399919c5427616d200_003F41_003F49929306_003FJsonConverter_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
1111
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_002Efs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fd91685971b48374512da7247cc7e6f9e5b1db57fea8beb4cced866780da5d60_003FList_002Efs/@EntryIndexedValue">ForceIncluded</s:String>
12+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003Alist_002Efs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003F14df87aac3cc239128f478f709d441e6984e4e246be3f21e2fde2b892b4056_003Flist_002Efs/@EntryIndexedValue">ForceIncluded</s:String>
13+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003Alocal_002Efs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003F3072d5c3bdf3288be64d51e6921d3039ac6b8d46fc595b56dabdebbf3dfee76a_003Flocal_002Efs/@EntryIndexedValue">ForceIncluded</s:String>
1214
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003Alocal_002Efs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F14653f6ed1c02bf199155bac8583394da90affa58a96d4a64f432fd39ad74e2_003Flocal_002Efs/@EntryIndexedValue">ForceIncluded</s:String>
1315
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003Amap_002Efs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F3e7fd2683497934e8551865981529ea654263d99b5bb75497f76e93ad55f5_003Fmap_002Efs/@EntryIndexedValue">ForceIncluded</s:String>
1416
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANumber_002EParsing_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003F5c9618319c8bb992a410d754c6fd33435b7db8e22e7bdf7763a9b3490c28a_003FNumber_002EParsing_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>

src/data_retriever/Retrievers/DreiMetaDaten.fs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ let private DdfImages : Outputs.Image list = [
152152
Height = 160
153153
Width = 160 } ]
154154

155+
/// <summary>
156+
/// Removes all items from the list that should be excluded according to the filters
157+
/// </summary>
158+
/// <param name="idsToIgnore">Ids to discard</param>
159+
/// <param name="titlesToIgnore">List of strings, each item that contains any of the strings in its name will be removed</param>
160+
/// <param name="items">Items to filter</param>
161+
let filterItems (idsToIgnore: string list) (titlesToIgnore: string list) (items: Outputs.Audiobook list) =
162+
items
163+
|> List.where (fun album ->
164+
(idsToIgnore |> List.contains album.Id = false) &&
165+
(not <| (titlesToIgnore |> List.exists (fun toIgnore -> album.Name.Contains(toIgnore))))
166+
)
155167

156168
let retriever (source: Inputs.Source) : Task<Result<Intermediate.Artist * Outputs.Audiobook list, string>> =
157169
taskResult {
@@ -183,4 +195,5 @@ let retriever (source: Inputs.Source) : Task<Result<Intermediate.Artist * Output
183195
|> urlSelector
184196
|> Option.map (fun url -> albumAsContent url a)
185197
)
198+
|> (filterItems source.IgnoreIds source.ItemNameFilter)
186199
}

0 commit comments

Comments
 (0)