Skip to content

Library index doesn't surface drums for drum+bass sloppaks (extract_meta reads manifest arrangements only) #1027

Open

Description

@gionnibgud

Follow-up to #1017.

#1017 makes the sloppak loader synthesize a Drums placeholder whenever a drum_tab is present with no drum arrangement, so drums appear in the player's arrangement picker for drum+bass packs. But the library scanner path doesn't go through load_song(): extract_meta() (lib/sloppak.py) reads only manifest["arrangements"]. Since the editor strips drum arrangements to drum_tab on save, a drum+bass pack indexes with no drum arrangement — the library's arrangement list and instrument filters won't show drums, while the player picker (post-#1017) does. Picker and library now disagree.

Fix shape: extract_meta() already has the manifest in hand — when manifest.get("drum_tab") is set and no arrangement entry is drum-named, append the same {"name": "Drums", "notes": 0} placeholder to the returned arrangements list (metadata-only; notes is already 0 for all entries in this fast path). Reuse the shared drum-name helper requested on #1017 rather than a third copy of the keyword sniff.

Scope: lib/sloppak.py extract_meta() + a test in tests/. No format surface — reader-side only, same as #1017.

Activity

  1. odntht commented on Oct 14, 2026

    @odntht

    Heads-up before anyone picks this up: the fix shape here predates the review on #1017, and the two now pull in different directions.

    #1017 hasn't merged, and @byrongamatos asked there not to append a "Drums" placeholder to song.arrangements and to surface drum parts through drum_parts (#1020) instead. On current main, a drum+bass pack loads as [Bass] in the player, and drums reach the client via has_drum_tab / drum_parts.

    If extract_meta() appends {"name": "Drums"} to the indexed arrangements, the library card gets a "Drums" chip at index 1, and clicking it opens ?arrangement=1, which the highway doesn't have. That's the same library-vs-highway index mismatch as #1086.

    Suggestion: index drums in their own field (for example drum_part_count or drum_parts names, read from drum_tab plus type: drums entries in the manifest), and let the library render a drums chip or filter from that, routed the way the player selects drum parts. Happy to send a PR for that once the direction on #1017 settles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions