• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Strawberry Music Player Forums
    2. Sharky-PI
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 10
    • Posts 50
    • Best 4
    • Controversial 0
    • Groups 0

    Posts made by Sharky-PI

    • RE: Syncing the playlists to disk

      Strawberry Playlist Sync Tool

      Sync your Strawberry Music Player playlists to disk M3U files with duplicate detection, automatic backups, and smart conflict resolution.

      Features

      • Duplicate Detection: Find and remove duplicate tracks within playlists
        • Exact duplicates (same file added multiple times)
        • Optional fuzzy matching (same title/artist, different files)
      • Playlist Sync: Export database playlists to M3U files
        • Creates timestamped backups before overwriting
        • Shows what's added/removed before syncing
        • Add-only mode to preserve disk entries
        • Recursive subdirectory scanning
        • Multiple playlist directory support
      • Backup Rotation: Automatically clean up old backup files
        • Keep N backups per playlist (default: 3)
        • Delete backups older than N days (default: 60)
        • Count takes priority (always keeps minimum backups)
      • Never-Sync List: Skip utility playlists you don't want exported
        • Managed via neversync.txt in your playlist folder
        • Interactive prompts to add playlists during review

      Requirements

      • Python 3.6+ (standard library only, no pip installs needed)
      • Linux, macOS, or Windows

      Installation

      1. Save the script to your preferred location, e.g.:
        ~/.local/share/strawberry/strawberry/strawberry-playlist-sync.py
      2. Make it executable (Linux/macOS):
        chmod +x strawberry-playlist-sync.py
      3. Optionally create a desktop shortcut (see below).

      Usage

      Interactive Mode

      ./strawberry-playlist-sync.py
      Presents a menu to choose between duplicate checking, syncing, and backup cleanup.

      Command-Line Mode

      Dry run (preview changes without writing):
      ./strawberry-playlist-sync.py -s -p ~/Music/playlists --dry-run

      Dry run with full track details:
      ./strawberry-playlist-sync.py -s -p ~/Music/playlists --dry-run -v

      Sync playlists to disk:
      ./strawberry-playlist-sync.py -s -p ~/Music/playlists

      Sync including subdirectories:
      ./strawberry-playlist-sync.py -s -p ~/Music/playlists -r

      Check for duplicates:
      ./strawberry-playlist-sync.py -d

      Include fuzzy duplicates (same song, different files):
      ./strawberry-playlist-sync.py -d --fuzzy

      Clean up old backups:
      ./strawberry-playlist-sync.py -c -n 5 -a 30
      (Keep 5 backups, delete those older than 30 days)

      Run all operations:
      ./strawberry-playlist-sync.py -d -s -c -p ~/Music/playlists

      Automated mode (no prompts):
      ./strawberry-playlist-sync.py -s -p ~/Music/playlists -y

      Multiple Directories

      ./strawberry-playlist-sync.py -s -p ~/Music/playlists -p /media/usb/playlists

      Command-Line Options
      ┌─────────────────────────┬─────────────────────────────────────────────────┐
      │ Option │ Description │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ -d, --check-duplicates │ Find and remove duplicate tracks │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ --fuzzy │ Include fuzzy duplicates in check │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ -s, --sync │ Sync database playlists to disk │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ -c, --cleanup-backups │ Clean up old backup files │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ -p, --playlist-dir PATH │ Playlist folder (can be used multiple times) │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ -r, --recursive │ Scan subdirectories for M3U files │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ --add-only │ Only add tracks, preserve existing disk entries │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ --db-path PATH │ Path to strawberry.db (auto-detects if not set) │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ -n, --keep-count N │ Backups to keep per playlist (default: 3) │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ -a, --max-age DAYS │ Max backup age in days (default: 60) │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ --dry-run │ Preview changes without writing │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ -v, --verbose │ Show full track details (with --dry-run) │
      ├─────────────────────────┼─────────────────────────────────────────────────┤
      │ -y, --yes │ Skip confirmation prompts │
      └─────────────────────────┴─────────────────────────────────────────────────┘
      Never-Sync List

      To exclude playlists from syncing (e.g., utility playlists for finding missing metadata):

      1. During interactive review, when you skip a playlist, you'll be asked if you want to add it to the never-sync list.
      2. Or manually edit neversync.txt in your playlist folder:

      Playlists listed here will be skipped during sync operations.

      NoComposerSP
      BitrateLessThan129SP
      UnratedSP

      Desktop Shortcut (Linux)

      Create a shell script on your desktop:

      #!/bin/bash

      Strawberry Playlist Sync

      ~/.local/share/strawberry/strawberry/strawberry-playlist-sync.py -s -p ~/Music/playlists -r

      Save as strawberry-playlist-sync.sh and make executable with chmod +x.

      Database Locations

      The script auto-detects Strawberry's database in these locations:

      • Linux: ~/.local/share/strawberry/strawberry/strawberry.db
      • macOS: ~/Library/Application Support/Strawberry/strawberry/strawberry.db
      • Windows: ~/AppData/Local/strawberry/strawberry/strawberry.db

      Use --db-path to specify a custom location.

      Notes

      • Safe to run with Strawberry open: The script only reads from the database (except for duplicate removal), so syncing while Strawberry is running is fine. For
        duplicate removal, close Strawberry first.
      • Backups: Before overwriting any M3U file, a timestamped backup is created in a backups/ subfolder.
      • M3U Format: Uses extended M3U with #EXTINF:seconds,Artist - Title lines.
      • Path Handling: Automatically converts database file:// URLs to filesystem paths and handles URL-encoded characters.

      License

      Public domain / CC0. Use however you like.

      Created by me and Claude Code tonight.

      posted in Feature Suggestions
      Sharky-PIS
      Sharky-PI
    • RE: Syncing the playlists to disk

      @jonas any possibility to add this feature - automatically save some/all playlists to disk on edit?

      Paired with duplicate detection, this would mean users aren't solely relying on the strawberry database to preserve the sanctity of their playlists.

      Thanks!

      posted in Feature Suggestions
      Sharky-PIS
      Sharky-PI
    • Prevent duplicate playlist additions

      Hi @jonas , hope you're well.

      Any scope to add a settings option to prevent addition of (what would be) duplicate items to playlists?

      Cheers!

      posted in Feature Suggestions
      Sharky-PIS
      Sharky-PI
    • RE: Solitary date-style composer tag inexplicably under "M" heading

      Another potentially useful datum:

      a0a8971f-b85b-401c-8888-552e8227d7c8-image.png

      All House genre tracks dumped into a playlist, sorted by composer (my 'date added' column): works EXCEPT 2023.01.23, and 2024.10.30, both sort out of order. 2023.01.23 weirdly don't sort next to each other.

      e8c7d396-4d10-42d0-bff5-0d5060ff3107-image.png

      unicode characters are normal for the correctly sorted entries,

      bea93f1b-ab1a-4457-8091-6e73ec6bc161-image.png

      but also the incorrectly sorted ones, so it looks like it's not a characters issue (I've typed all of these manually so inserting unicode seemed unlikely but just in case)

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Solitary date-style composer tag inexplicably under "M" heading

      @jonas potentially useful data point:

      62e63ac3-a576-4866-bf0c-d99d480a8078-image.png

      µ-Ziq, conceptually but not actually beginning with M, is filed under M, but the Georgian deep house artist below is filed under their first character.

      So weird it's fine for you but weird for me though...!

      (edit, this is grouped by Artist/Album, but is potentially useful info)

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Solitary date-style composer tag inexplicably under "M" heading

      Just updated to 1.2.14, no change

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Solitary date-style composer tag inexplicably under "M" heading

      rebooted:

      locale
      LANG=en_GB.UTF-8
      LANGUAGE=en_GB:en
      LC_CTYPE="en_GB.UTF-8"
      LC_NUMERIC=en_GB.UTF-8
      LC_TIME=en_GB.UTF-8
      LC_COLLATE="en_GB.UTF-8"
      LC_MONETARY=en_GB.UTF-8
      LC_MESSAGES="en_GB.UTF-8"
      LC_PAPER=en_GB.UTF-8
      LC_NAME=en_GB.UTF-8
      LC_ADDRESS=en_GB.UTF-8
      LC_TELEPHONE=en_GB.UTF-8
      LC_MEASUREMENT=en_GB.UTF-8
      LC_IDENTIFICATION=en_GB.UTF-8
      LC_ALL=

      No change to those files. The mystery deepens. This is so weird...

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Solitary date-style composer tag inexplicably under "M" heading

      @jonas oh weird.

      Ubuntu 25.04, language English UK, formats USA but I'll change that to UK. Currently:

      locale
      LANG=en_GB.UTF-8
      LANGUAGE=en_GB:en
      LC_CTYPE="en_GB.UTF-8"
      LC_NUMERIC=en_US.UTF-8
      LC_TIME=en_US.UTF-8
      LC_COLLATE="en_GB.UTF-8"
      LC_MONETARY=en_US.UTF-8
      LC_MESSAGES="en_GB.UTF-8"
      LC_PAPER=en_US.UTF-8
      LC_NAME=en_US.UTF-8
      LC_ADDRESS=en_US.UTF-8
      LC_TELEPHONE=en_US.UTF-8
      LC_MEASUREMENT=en_US.UTF-8
      LC_IDENTIFICATION=en_US.UTF-8
      LC_ALL=

      I'll reboot for UK and see if it changes anything.

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Solitary date-style composer tag inexplicably under "M" heading

      Some diagnosis attempts from Claude, unsuccessful:

      All other dates work correctly, including:
      2024.10.31 ✓
      2024.10.20 ✓
      2024.10.10 ✓
      2025.07.30 ✓
      2025.09.30 ✓
      All other October 2024 dates ✓

      What This ISN'T:

      ❌ Integer division (30 // 10 = 3) - would affect 2024.10.31 too
      ❌ Simple format swap (YYYY.DD.MM) - would affect 2024.10.31, 2024.03.10
      ❌ All .30 dates - only 2024.10.30 breaks
      ❌ All month=10 dates - other October 2024 dates work
      ❌ Hash collision or mathematical artifact
      ❌ Hex/binary representation quirk

      Critical Finding
      The sort key starts with 'M'
      The grouping header comes from the first character of the sort key. For 2024.10.30 to appear under 'M', its sort key must start with 'M' (not '2' or '0').
      Possible Explanations:

      Date parsing creates month name string - Parser detects date → converts to "March ..." (month 3) → sort key = "March..." → first char = 'M'
      Specific string replacement - Code replaces "2024.10.30" with month name starting with 'M' (March, May, etc.)
      Locale-specific format string - Date formatter outputs "M..." format for this specific date only
      Sort tag generation bug - Composer field has special date handling that generates month-based sort keys

      Theories That Fit
      Month 3 (March) Connection:

      30 - 27 = 3 → March
      Some wrapping/modulo creating month 3 from day 30
      But why doesn't 31 also break?

      Most Likely:
      Specific pattern/regex matching *.10.30 or 2024.10.30 that triggers date-to-month-name conversion, outputting something like "March 2024" or "Mar..." as the sort key.
      What We Can't Check (Need Codebase Access)

      SortText generation for composer field - does it attempt date parsing?
      Date-to-string conversion - any code converting dates to month names for sorting?
      Sort key logic - what generates the sortable string from composer tag?
      Hardcoded patterns - search for "10.30", "2024.10.30", or month name generation
      Article/prefix stripping - any "A"/"The" logic that might affect numbers?
      Sort tags feature (v1.2.12) - recent addition, potential new bug

      Files to Examine

      src/collection/collectionmodel.cpp - sorting/grouping/header logic
      src/core/song.cpp - SortText generation for composer field
      Date parsing utilities
      Any locale/format conversion for sorting
      Recent commits related to sort tags

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Solitary date-style composer tag inexplicably under "M" heading

      @jonas https://drive.google.com/drive/folders/1W4HT_7AmekeCfh6rdav01jfd3Bhx_Ij0?usp=sharing copied them here but I'm >99% sure it's not the files: I personally tagged them with that specific composer string and only that string seems to cause them to be filed under M.

      I just did the same for a random song which wasn't tagged with composed, and it then becomes populated under M like the others:
      2c1f9510-b45f-415b-a672-08b84a395b86-image.png

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Solitary date-style composer tag inexplicably under "M" heading

      @jonas any ideas about this one boss? Would be nice to get it off my desk. Cheers!

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Solitary date-style composer tag inexplicably under "M" heading

      @jonas any thoughts about this one chap? Super weird, I can't conceive what the issue might be, unless "2024.10.30" somehow compiles to the same hex code as M, or some other completely unexpected, arcane, but technically logical reason.

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Strawberry ignores embedded album cover and displays wrong one instead.

      @rik Oh interesting. That definitely looks like it should display. Sorry mate, not sure then 😞

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: "Group by Artist" compilation album issue

      @ruinspc IIRC you fix this on a per-tracks basis by unclicking "compilation" in the track's properties. Or similar option.

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Continuous Buffering

      @rlkeeney very unlikely mate, but: any chance it's a hardware issue, and it's randomly finding segfaults on the disk? Worth running a chkdisk on it just to rule it out?

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Strawberry ignores embedded album cover and displays wrong one instead.

      @rik I ended up using Claude to delete all the publisher art and waveform images that beatport adds ("a brightly colored fish" is the art tag for those for some reason).

      It would be nice if Strawberry defaulted to Cover Art Front though

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Play count: tracks with crazy high numbers

      More sleuthing has uncovered something. Puddletag shows various files with Playcounts with 2 values e.g. 0\0, 0\258, up to 0\65335.

      I tried to delete those screwy counts in puddletag by overwriting them with 0 but it doesn't seem to have taken. Or they've regenerated.

      Checking in kid3 it turns out that one of those files, with 0\258 has
      FMPS_PLAYCOUNT=0
      FMPS_Playcount=258.

      If I listen to it once in strawberry:
      FMPS_PLAYCOUNT=0,
      FMPS_Playcount=259.
      So strawberry increments FMPS_Playcount but not FMPS_PLAYCOUNT.

      I wonder what the official/correct tag name is?
      https://www.exiftool.org/TagNames/ID3.html this says it's "PCNT" for id3 v2.4
      According to https://github.com/strawberrymusicplayer/strawberry/issues/1074 , FMPS_Playcount (Strawberry spelling) is CORRECT, so logically something else has been using FMPS_PLAYCOUNT.

      But why do they (second entry, FMPS_Playcount) go up to 65335?
      And does overwriting them with 0 in puddletag not work because it's displaying 2 variants of the same tag?
      In puddletag I can't create separate columns for the 2 spellings because it automatically uppercases them but displays both.

      posted in Technical Help
      Sharky-PIS
      Sharky-PI
    • RE: Search (find) playlists for song title/artist/album

      non-strawberry solution: if your playlists are in a central location (e.g. /Music/playlists/) then you could 'search within files / search file contents' using whatever OS-default search tool you have handy?

      Now if you were feeling INCREDIBLY saucy, you could setup a cron job to

      1. scan all your playlists
      2. create a database of songs [track URL] (rows) & playlists (columns), with cells filled by the playlist name; have a final column which concatenates all nonblank playlist columns, separated by semicolon
      3. Write that final column to the Performer tag of those files
      4. [manually/auto rescan collection in Strawberry then) search "performer:MyPlaylist" if you want the contents of the playlist in whichever Collection grouping scheme you've chosen (potentially useful/interesting), or (your main objective)
      5. search for the song and look in the tags for the performer, or display the performer tag as a column.
      posted in Feature Suggestions
      Sharky-PIS
      Sharky-PI
    • Add ability to search "lyrics" field from the collection search bar

      Hi @jonas , is there a reason this wasn't added originally?
      Potentially would massively inflate the library if all lyrics data were imported there?
      It would be great to have this... any chance you could talk me though the blockers to implementing?
      Cheers!

      posted in Feature Suggestions lyrics search library
      Sharky-PIS
      Sharky-PI
    • RE: How does a lyrics search launch itself ?

      @nainggolouille I believe it happens automatically in the background

      posted in Technical Help
      Sharky-PIS
      Sharky-PI