summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-07-15 01:36:17 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-07-15 01:36:17 (EDT)
commitbb3c163802f2f33e8fb0d95d90ac9b48b318746c (patch)
tree3c851693b133d62c74e5df0f6ba82c995926bd97
parentb4728dfb0ac46abd12576d0c26a5f6bc66a0b679 (diff)
downloadjamaldo-bb3c163802f2f33e8fb0d95d90ac9b48b318746c.zip
jamaldo-bb3c163802f2f33e8fb0d95d90ac9b48b318746c.tar.gz
jamaldo-bb3c163802f2f33e8fb0d95d90ac9b48b318746c.tar.bz2
Save the album ID in the album directory
-rwxr-xr-xjamaldo.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/jamaldo.pl b/jamaldo.pl
index 1b4ff81..52bf5e1 100755
--- a/jamaldo.pl
+++ b/jamaldo.pl
@@ -68,6 +68,7 @@ sub get_album
my $artist_name;
my $album_name;
my $dir;
+ my $aid_fh;
my $i;
my $track;
@@ -99,6 +100,10 @@ sub get_album
undef($artist_name);
undef($album_name);
+ open($aid_fh, ">", $dir . "/album-id");
+ printf($aid_fh "%d\n" $album_id);
+ close($aid_fh);
+
$i = 0;
for $track (@{$res_data->{"results"}}) {
printf(" Downloading track %d of %d...\n", ++$i,