spotify-to-mp3 0.5 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/spotify_to_mp3/app.rb +9 -7
- data/spotify-to-mp3.gemspec +1 -1
- metadata +1 -1
data/lib/spotify_to_mp3/app.rb
CHANGED
@@ -9,19 +9,21 @@ module SpotifyToMp3
|
|
9
9
|
file = ARGV.first or raise "No songs file specified. Usage: #{$0} file"
|
10
10
|
FileTrackIds.new(file).each do |track_id|
|
11
11
|
begin
|
12
|
-
puts "Resolving \"#{track_id}\"
|
12
|
+
puts "Resolving \"#{track_id}\""
|
13
13
|
track = @track_id_resolver.resolve(track_id)
|
14
14
|
|
15
|
-
puts "Searching \"#{track}\" on Grooveshark
|
15
|
+
puts "Searching \"#{track}\" on Grooveshark"
|
16
16
|
grooveshark_track = @grooveshark.get_track(track.grooveshark_query)
|
17
17
|
|
18
|
-
|
19
|
-
if File.exists?
|
20
|
-
|
21
|
-
|
18
|
+
print "Found \"#{grooveshark_track}\""
|
19
|
+
if File.exists?(grooveshark_track.filename)
|
20
|
+
# To know about songs no longer in download list
|
21
|
+
FileUtils.touch grooveshark_track.filename
|
22
|
+
|
23
|
+
puts ", already exists, skipping"
|
22
24
|
else
|
25
|
+
puts ", downloading..."
|
23
26
|
@grooveshark.download(grooveshark_track)
|
24
|
-
puts "Done".green
|
25
27
|
end
|
26
28
|
rescue Exception => exception # For some reason without the "Exception" it is ignored
|
27
29
|
puts exception.message.red
|
data/spotify-to-mp3.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |gem|
|
|
2
2
|
gem.name = 'spotify-to-mp3'
|
3
3
|
gem.summary = 'Spotify to MP3'
|
4
4
|
gem.description = 'Download Spotify tracks as MP3 files from Grooveshark'
|
5
|
-
gem.version = '0.5'
|
5
|
+
gem.version = '0.5.1'
|
6
6
|
gem.author = 'Francesc Rosàs'
|
7
7
|
gem.email = 'francescrosasbosque@gmail.com'
|
8
8
|
gem.homepage = 'https://github.com/frosas/spotify-to-mp3'
|