Ah, you mean the background You could have drawn the arrow pointing to the bottom part of the sidebar. I thought you meant replacing the Earth icon with a strawberry, which would be also cool, but maybe not very clear.
Posts made by Jellby
-
RE: Put strawberries in the tabbar
-
RE: Playback stops for no reason.
Does it happen after you have paused a track (but not always)? It could it be the same as https://forum.strawberrymusicplayer.org/topic/1166/stuck-after-a-track-is-finished.
In my case, there's no playlist (just a single album in the queue), no shuffle, no repeat, all MP3. -
RE: Moving "through a song" stops the song?
@Peach
I think I have had this happened once (I don't "drag" the songs often). It may be related to https://forum.strawberrymusicplayer.org/topic/1166/stuck-after-a-track-is-finished, at least the symptoms are the same: the song is stuck. -
RE: Stuck after a track is finished
Well, not immediately, but sure enough it happened now. Once again, it happened after I had paused a track, but I don't see anything strange in the terminal:
12:02:12.923 DEBUG MainWindow:1366 Song changed to "John Coltrane" "The Complete 1961 Village Vanguard Recordings" "Impressions (C)" 12:02:12.925 DEBUG Player:733 Playing song "Impressions (C)" QUrl("file:///media/user/FREEAGENT/Jazz/John Coltrane - The Complete 1961 Village Vanguard Recordings/17 - Impressions (C).mp3") position 0 12:02:12.925 DEBUG GstEnginePipeline:751 1 event latency 12:02:13.815 DEBUG PlaylistBackend:330 Saving playlist 1 12:11:25.654 DEBUG GlobalShortcutsBackendKDE:216 Key QKeySequence("Media Play") pressed. 12:29:06.436 DEBUG GlobalShortcutsBackendKDE:216 Key QKeySequence("Media Play") pressed. 12:29:06.437 DEBUG GstEnginePipeline:751 1 event latency
The track in question is 15 minutes long. The first "Media Play" is the pause event, which happened not near the beginning or end of the track. The second "Media Play" is the resume event. Some minutes after that, the track ended, and the player is stuck without advancing to the next track in the playlist or showing anything else in the terminal. The time it was paused was enough to trigger "screen energy saving", but I'm not sure that has anything to do.
-
RE: Stuck after a track is finished
For the record, I've been running Strawberry from command line for a while now (a few weeks), to see if there's any message when this happens. As anyone could expect, it hasn't happened since. I'm just writing this in the hope that by doing so, the problem will appear again immediately after I post it
-
Stuck after a track is finished
I've had this happened several times. I'm playing a playlist (local files), and when some track is finished, the player gets kind of stuck:
- The track that just played does not get its playcount increased
- The track that just played is still highlighted in the playilst
- The player shows the "stop" button, not "play"
- The progress bar is at 0:00
- Nothing is playing
If I click on stop and then play, the same track plays again, and when it finishes playback continues normally with the next track.
This happens for different tracks from different sources, so I don't think it's file-related. It's a bit random, but lately I think I've noticed it tends to happen after I've paused the playback (not every time I pause it happens, but every time it happens I have paused). The tracks are all in an USB hard drive, so that could be related.
Is this something someone else has noticed? Is it a known issue? Could there be an easy-to-identify and fix bug in the buffering?
I'm running Strawberry 1.0.17 on Kubuntu 22.04 (KDE desktop).
-
RE: FLAC 32-bit ?
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/).
-
Pretty OSD fields and configuration
-
When customizing the pretty OSD (Notifications tab), the draggable "OSD Preview" obscures the preview shown with the "Preview" button. One can drag the former around to see the latter, but that looks like a clumsy interface.
-
I'd like to add extra fields, like number of tracks in the playlist and track position in the playlist, or time remaining in the playilst.
-
-
RE: Gapless playback
The gap may be inserted during compression/encoding: https://en.wikipedia.org/wiki/Gapless_playback#Compression_artifacts
-
RE: Prevent automatic collection update
And more annoyingly (to me), when one of these collection updates is going on, all my songs appear as never having been played, even though I can see that the in the .db file they appear with the correct data. This means that if I play one of the songs in the collection (e.g. by loading a file from command line), its "last played" and "times played" data will most likely not be updated. So far, once the update is completed, everything seems to work fine, but I am fearing the day when such an update will wipe all the stats for no good reason...
-
Prevent automatic collection update
I have my collection in an external disk, which is sometimes plugged and sometimes not. I have disabled "Update the collection when Strawberry starts" and "Monitor the collection for changes", whenever I change the files I'll do a manual rescan/update.
However, when I restart Strawberry, it will run a collection update (I see "Updating collection" in the status bar), which takes a while. Is there something I'm missing? Is there a way to avoid this?
Strawberry 1.0.9 on Ubuntu 22.04.
-
Font size does not follow KDE
I'm using Kubuntu 22.04, and Strawberry 1.0.9 (from https://launchpad.net/~jonaski/+archive/ubuntu/strawberry). The font size in Strawberry does not match the rest of KDE (it's smaller see screenshot), and I believe it's because KDE uses Qt5 and Strawberry uses Qt6. Any robust solution?
-
RE: Options for scripting or command-line control
For it's worth, this is what I came up with. Note that it's customized for my own use and library, you may need to change some things if you want to use it.
Some notes:
- This is designed to be run when Strawberry is stopped, with an empty (or finished, or not yet started) playlist.
exclude
means the matching directories will be ignored. In this case everything with/Demos/
or/Classical/
.- Since this is for full album random play, it will stop if there is some half-played album (any album with songs with different playcounts).
- I have the
disc
tag only for series like "Complete Works", where I typically don't want to play all discs sequentially. For the more common double disc albums, I just tag all tracks sequentially. If you have disc tags, you may want to tweak the album selection scheme (album_is
).
What I'd appreciate from the Strawberry side:
- A way to add tracks directly from the database, without having to use the URL (e.g. some kind of track ids).
- Some notification when a playlist ends, or a way to run a script when a playlist ends (and possibly some events).
- Support for MPRIS TrackList interface.
- And of course the ability of doing all of this from within the player, without using an external script.
#!/usr/bin/env python3 import sqlite3 import dbus import urllib.parse import re import sys import os.path import subprocess import numpy as np from datetime import datetime, timedelta # Set up database location and options dbfile = '/home/ignacio/.local/share/strawberry/strawberry/strawberry.db' album_is = ['album', 'effective_albumartist', 'disc'] # These identify an album exclude_dirs = ['Demos', 'Classical'] recent = timedelta(days=120) # Format for album in notifications def album_print(row): disc = f' disc {row["disc"]}' if row['disc'] > 0 else '' return f'<i>{row["album"]}</i> ({row["effective_albumartist"]}){disc}' # Set up notification system item = 'org.freedesktop.Notifications' ntf = dbus.Interface(dbus.SessionBus().get_object(item, '/'+item.replace('.', '/')), item) def notify(title='Title', body='Body.'): ntf.Notify('randomalbum', 0, '', title, body, [], {'urgency': 1}, 5000) # Check Strawberry status try: plyr = dbus.Interface(dbus.SessionBus().get_object('org.mpris.MediaPlayer2.strawberry', '/org/mpris/MediaPlayer2'), 'org.freedesktop.DBus.Properties') status = plyr.Get('org.mpris.MediaPlayer2.Player', 'PlaybackStatus') except dbus.exceptions.DBusException: notify('Not running!', 'Strawberry is not running. Exit.') sys.exit(1) if status != 'Stopped': notify('Not stopped!', 'Strawberry is not stopped. Exit.') sys.exit(1) # Open database con = sqlite3.connect(f'file:{dbfile}?mode=ro', uri=True) con.row_factory = sqlite3.Row cur = con.cursor() # Check partially played albums (with multiple playcounts) album_is_list = ', '.join(album_is) res = cur.execute(f'SELECT COUNT ( DISTINCT playcount ) AS "nr_of_playcounts", {album_is_list} FROM songs GROUP BY {album_is_list}') first_songs = res.fetchall() msg = '' for i in first_songs: msg = [] if i['nr_of_playcounts'] > 1: msg += '* '+album_print(i) if msg: notify('Multiple playcounts', '\n'.join(msg)) sys.exit(1) # Get data for the first song of each album res = cur.execute(f'SELECT MIN(track), url, playcount, lastplayed, {album_is_list} FROM songs GROUP BY {album_is_list}') first_songs = res.fetchall() now = datetime.now() exclude_re = '/(' + '|'.join([urllib.parse.quote(i, safe="/(),'!&;+=") for i in exclude_dirs]) + ')/' mask = [True for i in first_songs] # Manually exclude directories for i,j in enumerate(first_songs): if re.search(exclude_re,j['url']): mask[i] = False max_playcount = max([j['playcount'] for i,j in enumerate(first_songs) if mask[i]]) # Exclude recently-played songs for i,j in enumerate(first_songs): dt = datetime.fromtimestamp(j['lastplayed']) if now-dt < recent: mask[i] = False # Tentatively exclude max-played songs, # unless the result is empty mp_mask = [True for i in first_songs] for i,j in enumerate(first_songs): if j['playcount'] >= max_playcount: mp_mask[i] = False new_mask = [i and j for i,j in zip(mask,mp_mask)] if any(new_mask): mask = new_mask else: notify('Library exhausted', f'Increasing max. playcount to {max_playcount+1}.') # Pick a random song out of the remaining ones weights = np.array([1 if i else 0 for i in mask]) left = np.count_nonzero(weights) pick = np.random.choice(len(mask), p=weights/np.sum(weights)) pick = first_songs[pick] filename = urllib.parse.unquote(urllib.parse.urlsplit(pick['url']).path) if (os.path.isfile(filename)): # Select the full album (disc) from the picked song notify('Next album', album_print(pick) + f'\n[out of {left}]') album = tuple([pick[i] for i in album_is]) album_exp = ' AND '.join([f'{i} IS ?' for i in album_is]) res = cur.execute(f'SELECT url FROM songs WHERE {album_exp} ORDER BY track', album) # Add the album, replacing the current playlist subprocess.call(['strawberry', '-l'] + [i['url'] for i in res.fetchall()]) else: notify('Missing file', f'File not found. Is the library mounted?\n{filename}') sys.exit(1) con.close()
-
Options for scripting or command-line control
As long as the smart playlists don't offer all the options I'd like, I'm willing to write an external script to select songs from the database and add them.
What is the best option to...
- Identify songs in the database (mostly interested in songs from local directories). There's no unique song id, as far as I can see. Should I use the whole fingerprint? The url?
- Identify albums in the database. There's an album_id, but that's empty in my case. Should I use album + effictive_albumartist?
- Add songs to the playlist. Should I just use the command-line flag -a or -l, with a list of filenames? Or is there some other way to add songs from the database?
-
RE: Smart playlists which plays whole albums instead of tracks
@kangaroo5496 I second this!
I'm trying to find a replacement for Amarok where, for what it's worth, I have a dynamic playlist that roughly does:
Match all sequentially: The next track from the album else: Match any: tracknumber = 1 and playcount < 9 and (playcount = 0 or lastplay > 4m)
So, it adds the next track in the album and, when the last one it reached, it finds a new "track 1" that has been played less than 9 times, and the last time more than 4 months ago. This avoids too much repetition (which could happen with random selection), and gives some priority to less played albums (e.g. when I add a new one to the collection). Once the list is empty (because there's no album that satisfies the conditions), I just increase the "9" to "10" and listen to my whole library again!
From a quick look at Strawberry, it seems a few things are missing to arrive to that flexibility, but I don't lose hope.