Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pascalwhoop
Created June 20, 2018 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pascalwhoop/185a98ce8257d1d897b10a0898321b14 to your computer and use it in GitHub Desktop.
Save pascalwhoop/185a98ce8257d1d897b10a0898321b14 to your computer and use it in GitHub Desktop.
Small snippet that is useful for generating smart playlists based on time added to library. I usually listen to newly added music more regularly and this is a nice help
#!/bin/bash
cd ~/Music/
find ./ -type f -mtime -31 | sed 's/\.\///g' > ~/.config/mpd/playlists/New_Last_Month.m3u
find ./ -type f -mtime -7 | sed 's/\.\///g' > ~/.config/mpd/playlists/New_Last_Week.m3u
find ./ -type f -mtime -365 | sed 's/\.\///g' > ~/.config/mpd/playlists/New_Last_Year.m3u
@bonelifer
Copy link

Awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment