question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

playlist: sorting of an on-disk playlist is ignored

See original GitHub issue

When using the playlist plugin for querying (syntax playlist:/path/to/list.m3u) it seems like the sorting of the list is lost.

Problem

We see that even though the query sorts by bpm and the playlist file (saved by smartplaylist plugin earlier) is sorted by bpm ascending, it gets lost when the playlist:.... syntax is used:


 prod  (beets)    ~/git/beets   all_in ●  beet config | grep include: 
include: [smart_playlists.yaml]
 prod  (beets)    ~/git/beets   all_in ●  cat $BEETSDIR/smart_playlists.yaml
smartplaylist:
    auto: yes
    playlists:
        - name: 110..130_TechnoJungleDub_Hi.m3u
          query: >
              year:1993.. bpm:110..130 "genre::(?i)Jungle|Footwork|Drum & Bass|Drum and Bass|Dubstep|Bass" initial_key+ bpm+ bitrate:200000..

<snip>

        - name: mood_happy_relaxed.m3u
          query: >
             mood_happy:0.8.. mood_relaxed:0.8.. bpm+ initial_key+

        - name: mood_sad_relaxed.m3u
          query: >
             mood_sad:0.9.. mood_relaxed:0.9.. bpm+ initial_key+

        - name: mood_acoustic_relaxed.m3u
          query: >
             mood_acoustic:0.9.. mood_relaxed:0.9.. bpm+ initial_key+

             
             
             
   prod  (beets)    ~/git/beets   all_in ●  beet ls mood_acoustic:0.9.. mood_relaxed:0.9.. bpm+ initial_key+ -f '$bpm, $initial_key, $artist, $title' | head -5
70, Dm, Aphex Twin, Nanou 2
83, , µ-Ziq, Fall Of Antioch
90, F, Wisp, Around Corners
91, A, Portishead, Deep Water
92, G, Clueso, Barfuß



 prod  (beets)    ~/git/beets   all_in ●  beet ls playlist:/remote/data/music-library/0-playlists/mood_acoustic_relaxed.m3u -f '$bpm, $initial_key, $artist, $title' | head -5
148, , Long Beach Dub Allstars, Love Her Madly
166, D, Deep & Wide, Seven Seas
161, Fm, Squarepusher, 213 (Maritime Eposis)
105, Em, Squarepusher, Spymania Theme
108, C, Harold Budd, Balthus Bemused by Colour



   prod  (beets)    ~/git/beets   all_in ●  head -5 /remote/data/music-library/0-playlists/mood_acoustic_relaxed.m3u
/remote/data/music-library/IDM,Electronica/Aphex Twin/2001 - Aphex Twin - Drukqs/30 - Aphex Twin - Drukqs - Nanou 2 (2001).mp3
/remote/data/music-library/IDM,Electronica/u-Ziq/2003 - u-Ziq - Bilious Paths/11 - u-Ziq - Bilious Paths - Fall Of Antioch (2003).mp3
/remote/data/music-library/IDM,Electronica/Wisp/2004 - Wisp - About Things That Never Were/09 - Wisp - About Things That Never Were - Around Corners (2004).mp3
/remote/data/music-library/DowntempoTriphopDubAcidjazz/Portishead/2008 - Portishead - Third/07 - Portishead - Third - Deep Water (2008).m4a
/remote/data/music-library/AlternativeRockPop/Clueso/2008 - Clueso - So sehr dabei/01 - Clueso - So sehr dabei - Barfuss (2008).mp3

Setup

  • OS: Manjaro
  • Python version: 3.9
  • beets version: git latest
  • Turning off plugins made problem go away (yes/no): FIXME

My configuration (output of beet config) is:

See above for the IMHO relevant parts. Can certainly provide more on demand.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sampsyocommented, Nov 26, 2022

I do think it would be cool to try to clarify some issues around this stuff in the docs! The various uses of the concept of a “playlist” in beets can indeed be confusing…

0reactions
JOJ0commented, Dec 6, 2022

Docs were changed to describe the expected behaviour better in #4563

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sort and filter - Spotify Support
Sort and filter to better view lists of music and podcasts. ... Songs in playlists you created; How all your playlists are listed....
Read more >
Permanent playlist overwrites and erasures should not be so ...
The proposed change If you click any of the tabs to sort your view by Title, Artist, Album (etc.) while viewing a playlist,...
Read more >
The Playlist - FL Studio
Sort Clips by 'All', Name, Color or Mixer Track Number (Audio Clips). Panel Options - See the Playlist Menu > Picker Panel section...
Read more >
How to Sort Playlists in Apple Music - MacRumors
Tap > Sort By. Select from the following options: Playlist Order, Title, Artist, Album, Release Date.
Read more >
Playlist Sorting - Google Groups
There seems to be no way of automatically sorting a playlist other than manually moving tracks or discs. I see this function was...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found