Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to make a dynamic playlist in amarok (version 2.8.0-0ubuntu3) which plays songs that I haven't heard in a while, for example should it contain only songs that were last played in 2013 or earlier.

This being a fairly straightforward condition I thought there was an easy way to do this, but I haven't found a way and googling the question didn't help much.

What I have tried:

  1. I looked for a search keyword that I could use for this. This Amarok Manual says somewhat diffusely that it is possible to search for last modified, but doesn't say how to do that.

  2. I tried to sort the playlist by last played, hoping that that would trick amarok into playing only songs before a certain date if seeded correctly, but unfortunately the last played date of the current song is changed to "just now" just before it ends, sorting it to the top. The next song then played is the one played next to last, so amarok just gets into a loop of the last two songs.

  3. I then changed the number of previous songs in the playlist to 0, hoping that that would automatically delete all songs that were played after the last time the current song was played. This would have of course led to a running off to the "never played" songs, but slowly enough for me to live with that. But it doesn't work, because amarok doesn't delete the songs above the current song.

  4. My current workaround is to fill the playlist with as many songs as possible, sort this by last played, then put all the songs I want into the waiting loop (or whatever this is called in the English version, I mean the option you can select by rightclicking on a song in the playlist), delete the rest, and repeat this process approximately every 7 hours.

Now I'm hoping there's is a less annoying way to achieve this, so: Is there a good way to do this?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

In the 'Media Sources' panel, go into 'Playlists', then 'Dynamic Playlists'.

Add a new playlist. It will give you one with a criterion (bias) like 'genre:Rock'. Select and edit it.

Change the match type to 'Match meta tag'. This will give you a different set of options below.

Amarok dynamic playlist bias editor

Change the first dropdown ('Simple search') to 'Last Played'. The other two inputs let you do various things such as:

  • Before 1 January 2014 (collection search equivalent = lastplay:<01/01/2014)
  • Older than 200 days (collection search equivalent = lastplay:>200d)

OK that, and double click the playlist to use it.

Note that (as far as I can tell) tracks that have never been played get included if you use the 'before' construct but are not included if you use the 'older than' construct. If you want to include unplayed tracks in the latter case, you need to use an 'Or'/Match Any bias with two sub-biases: the lastplay:>200d one and a playcount:0 one.

share|improve this answer
    
I just noticed that this also plays songs where the "last played" is not shown as a date (like "January 2013"), but as "yesterday", "last week", "15 minutes ago" or something like that. Some kind of weird bug. –  fifaltra Oct 29 at 7:03

I'm afraid this isn't (exactly) an Amarok solution (it sounds like you've exhausted that search).

However, this kind of query is fairly easy in Quod Libet (disclaimer: I know as I'm one of the devs):

e.g. a search of:

#(lastplayed > 1 year)

will return all songs not played in the last year. This can be combined with all other search syntax as normal, e.g.

&(genre=Classical, #(lastplayed>10 weeks))

will return all classical songs not played in the last week.

If you want you can automate this; using the command line, you now can do:

$ quodlibet --print-query "#(lastplayed > 1 year)"

...this then prints a list of full paths to the songs that match that query to stdout. Should be fairly easy to import that wherever you need e.g. into Amarok.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.