package shakuhachi
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A music collection manager
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.3.0_1.tar.gz
sha256=541a7ac078a520730a71edf4d2fe0f17cc98f0b9ad82060db62120a7d2519ae5
sha512=37b98cb52dab8293adb92f71e91394cf1c5d0d481d03893c320cc8aa550459a30dabdfdc0018f512d3a7a547f2899b493a20d86f450bc084b78e30b40234a911
doc/src/shakuhachi.query/queryArtist.ml.html
Source file queryArtist.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83(*****************************************************************************) (* *) (* Copyright (C) 2026 Yves Ndiaye *) (* *) (* This Source Code Form is subject to the terms of the Mozilla Public *) (* License, v. 2.0. If a copy of the MPL was not distributed with this *) (* file, You can obtain one at https://mozilla.org/MPL/2.0/. *) (* *) (*****************************************************************************) include QueryUtil (* TODO: Change the query to compute other field. *) let matches_node _subfields artist node = let id = SkhcDb.Artist.id artist in let name = SkhcDb.Artist.name artist in let sort_name = SkhcDb.Artist.sort_name artist in let flag = SkhcDb.Artist.flag artist in let artwork = SkhcDb.Artist.artwork artist in let rating = SkhcDb.Artist.rating artist in match node with | Node.Substring s -> let insensible = true in let regex = false in matches ~insensible regex s name || omatches ~insensible regex s sort_name | Field (FString s) -> ( let regex = Field.String.regex s in let insensible = Field.String.insensible s in let field = Field.String.key s in let value = Field.String.value s in match field with | SortName -> omatches ~insensible regex value sort_name | Title -> matches ~insensible regex value name | Artist -> matches ~insensible regex value name | Path -> matches ~insensible regex value name | AlbumArtist -> matches ~insensible regex value name | Composer -> matches ~insensible regex value name | Album -> false | Genre -> false | Arbitrary _ -> false | FileExtension -> false ) | Field (FBool b) -> ( let field = Field.Bool.key b in let b = Field.Bool.value b in match field with | Flag -> flag = b | Art -> let cover = Option.is_some artwork in b = cover ) | Field (FInt64 i64) -> ( let field = Field.Int64.key i64 in let frange = Field.Int64.value i64 in match field with Id -> Range.matches frange id | Size -> false ) | Field (FInt i) -> ( let field = Field.Int.key i in let frange = Field.Int.value i in match field with | Rating -> rating |> Option.map (Range.matches frange) |> Option.value ~default:false | Track | Year | Plays | AlbumCount | Disc | Length -> false ) | Field (FFloat f) -> ( let field = Field.Float.key f in let _frange = Field.Float.value f in match field with AvgDuration | AvgRating | AvgSize -> false )
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>