summaryrefslogtreecommitdiffstats
path: root/aliases
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-09-29 12:58:19 -0400
committerJesse Luehrs <doy@tozt.net>2013-09-29 13:00:43 -0400
commit89899f01593b86cf3ca491b13f57085e6949577f (patch)
tree2e213ef1a68940112093af64fd1e7a141a011c99 /aliases
parentc6defed4cf8726b7bc434dbbbb895e6a519a86a3 (diff)
downloadconf-89899f01593b86cf3ca491b13f57085e6949577f.tar.gz
conf-89899f01593b86cf3ca491b13f57085e6949577f.zip
use the yearly_tracks view i set up
Diffstat (limited to 'aliases')
-rw-r--r--aliases4
1 files changed, 2 insertions, 2 deletions
diff --git a/aliases b/aliases
index d447f22..159b9b6 100644
--- a/aliases
+++ b/aliases
@@ -107,12 +107,12 @@ function svst {
}
function pick_music {
lastfm_export --user doyster --dsn dbi:SQLite:${HOME}/.tracks.sqlite
- sqlite3 ${HOME}/.tracks.sqlite "SELECT artist FROM tracks WHERE strftime('%s') - timestamp < 60*60*24*365 GROUP BY artist ORDER BY count(artist) * (strftime('%s') - max(timestamp)) DESC LIMIT $([ -z "$1" ] && echo 20 || echo $1)"
+ sqlite3 ${HOME}/.tracks.sqlite "SELECT artist FROM yearly_tracks GROUP BY artist ORDER BY count(artist) * (strftime('%s') - max(timestamp)) DESC LIMIT $([ -z "$1" ] && echo 20 || echo $1)"
}
function rand_music {
lastfm_export --user doyster --dsn dbi:SQLite:${HOME}/.tracks.sqlite
for i in $(seq 1 $([ -z "$1" ] && echo 20 || echo $1)); do
- echo "select distinct(artist) from tracks where artist not in (select distinct(artist) from weekly_tracks);" | sqlite3 .tracks.sqlite | rand_line | sed 's/.*/select artist, album from tracks where artist = "&" group by artist, album;/' | sqlite3 .tracks.sqlite | rand_line | sed 's/|/ - /'
+ echo "select distinct(artist) from yearly_tracks where artist not in (select distinct(artist) from weekly_tracks);" | sqlite3 .tracks.sqlite | rand_line | sed 's/.*/select artist, album from tracks where artist = "&" group by artist, album;/' | sqlite3 .tracks.sqlite | rand_line | sed 's/|/ - /'
done
}
function t {