• intelligent playlist last played

    1
    0 Votes
    1 Posts
    357 Views
    No one has replied
  • 2 Votes
    2 Posts
    1k Views
    T
    This works great! So, so nice to just be able to directly work with the database. Here is the key new script, that dumps out all the playlists to plain m3us (just relative paths) in the same directory. I am also very happy to have this script as it means there is now little risk in using Strawberry - I can make my playlists there and if needbe, dump them back out to the plain m3us I use with ncmpcpp. #!/usr/bin/env python # Tested with # Strawberry 1.0.17 # macOS 12.2 (Monterey) # Python 3.11.2 # Inspired by code from @TheBlackKoala posted at # https://github.com/clementine-player/Clementine/issues/6214 import os import sqlite3 import urllib.parse # Update with the path to your database (or a copy of it) DATABASE_PATH = os.path.join(os.environ["HOME"], "Library", "Application Support", "Strawberry", "Strawberry", "strawberry.db") # Update with a root to strip from absolute paths LIBRARY_ROOT = os.path.join(os.sep, "Volumes", "BigDrive", "music_library") def _name_for_playlist(c, playlist_id): c.execute("SELECT name FROM playlists WHERE rowid=?", playlist_id) return c.fetchone()[0] def _url_to_path(url): return urllib.parse.unquote( url.removeprefix("file://")).removeprefix(LIBRARY_ROOT).removeprefix( os.sep) def _paths_for_playlist(c, playlist_id): c.execute( "SELECT s.url FROM playlist_items AS p JOIN songs AS s ON p.collection_id = s.rowid WHERE playlist = ?", playlist_id) return [_url_to_path(item[0]) for item in c.fetchall()] def _write_plain_m3u_from_paths(name, paths): with open(f"{name}.m3u", "w") as m3u_file: for path in paths: m3u_file.write(f"{path}\n") def main(): connection = sqlite3.connect(DATABASE_PATH) cursor = connection.cursor() cursor.execute("SELECT DISTINCT playlist FROM playlist_items") for playlist_id in cursor.fetchall(): name = _name_for_playlist(cursor, playlist_id) paths = _paths_for_playlist(cursor, playlist_id) _write_plain_m3u_from_paths(name, paths) if __name__ == "__main__": main()
  • 0 Votes
    1 Posts
    412 Views
    No one has replied
  • FLAC 32-bit ?

    2
    0 Votes
    2 Posts
    857 Views
    J
    I'm no expert, but you'd probably need the rest of your equipment and software (at least until the signal is turned to analog) to support it, and even then it's doubtful there will be any difference (https://www.makeuseof.com/16-bit-vs-24-bit-audio/).
  • Song Fingerprinting and Tracking

    7
    0 Votes
    7 Posts
    3k Views
    M
    @jonas I understand that moving a song within the same music collection directory means renaming it and/or moving it between several possible subfolders of the main folder. It's right ?
  • Wikipedia page in English

    7
    1 Votes
    7 Posts
    4k Views
    jonasJ
    @failafail https://en.wikipedia.org/wiki/Draft:Strawberry_(Software) suggests that Clementine collects data, that's wrong.
  • AppImages for Linux

    1
    1 Votes
    1 Posts
    2k Views
    No one has replied
  • Files -> Source icons look tiny depending on monitor.

    2
    2
    0 Votes
    2 Posts
    608 Views
    jonasJ
    @BerryKing I've fixed this now.
  • Version 1.0.11 not starting on mac os catalina

    5
    0 Votes
    5 Posts
    1k Views
    M
    @dhinaghena Hello, almost all previous versions of the program are available on GitHub, but I have not been able to see which version would be correct either. I also don't understand why developers don't take into account those who can't or don't want to update. One thing is that due to the changes that occur over time and the different libraries and functions used, they are forced to raise requirements. That's right. But if there are fully functional previous versions, which are also available to users, as in this case (fantastic, it is one of the best reasons to use these programs), the logical thing to do is to indicate both on the download page and in the version notes. when those changes happen. What's more, those notes include thousands of notes that developers love and understand, but not the common user. But nothing in relation to the actual use of the program. And the first step is that: indicate the requirements and when they change.
  • Export database

    1
    0 Votes
    1 Posts
    478 Views
    No one has replied
  • Queue icon too dark for dark theme

    1
    1
    0 Votes
    1 Posts
    648 Views
    No one has replied
  • 7 Votes
    13 Posts
    17k Views
    CherryStrawC
    @Gemini62167 Thank you for bothering in writing such a long post about this Apple theme. I'm sad too about the fact things changed for worst since the decease of Steve Jobs; I always knew Tim Cook was making a deplorable job as the new CEO (Remember that iPhone X presentation for the 10th anniversay of the original iPhone which was more a spit to the face of the user than a real tribute to the original phone?) but I didn't knew things were this messed. Looks like you know Apple more than me so I don't have too much to add as a feedback, so I'll thank you again for writing all this for me, and for the rest of the people who's reading in this thread. And thanks to Jonas for doing such an excellent Music Player, even for Mac users; I think Mac users needs a hero since the most recent OS systems doesn't have iTunes anymore and the number of music players is low.
  • raspbian

    2
    0 Votes
    2 Posts
    715 Views
    B
    @viaprenestina Maybe this topic might help you.
  • Problems with the format and content of playlists files

    2
    1 Votes
    2 Posts
    933 Views
    jonasJ
    @Miguel-Ruiz Clementine is not URL encoding / decoding the file paths according to the specifications. Clementine is doing it wrong, and is probably unable to load the playlists saved by strawberry for this reason, since Strawberry URL encodes some characters. Another difference is that Clementine is saving metadata. For Strawberry, there is a setting for enabling saving playlists with metadata, in the settings, under playlist. If you enable that setting it will save metadata like Clementine does.
  • Few Website for the words in Strawberry

    3
    0 Votes
    3 Posts
    1k Views
    jonasJ
    @remelach I've added lyrics from stands4 (lyrics.com) now if you want to test you can try the latest from https://builds.strawberrymusicplayer.org/
  • Max # of Playlists?

    2
    0 Votes
    2 Posts
    956 Views
    P
    @scubaboyc See https://github.com/strawberrymusicplayer/strawberry/issues/1092 I suggest "touch" a file name, then you can overwrite it.
  • Strawberry stops playing

    8
    0 Votes
    8 Posts
    2k Views
    rlkeeneyR
    @jonas Switching to Alsa fixed it. Thanks.
  • Skip certain lenght of song

    1
    0 Votes
    1 Posts
    404 Views
    No one has replied
  • A genuine question.

    4
    0 Votes
    4 Posts
    2k Views
    ash_wA
    @buffalo thank you
  • pls - make error not stop playback queue

    3
    2 Votes
    3 Posts
    790 Views
    ben2talkB
    I just added an old playlist - and got flooded with error windows that mean't I had to physically kill everything. Very nasty...