spfy 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/spfy.rb +9 -7
- data/spfy.gemspec +1 -1
- metadata +1 -1
data/lib/spfy.rb
CHANGED
@@ -26,7 +26,7 @@ require "taglib"
|
|
26
26
|
require 'find'
|
27
27
|
require 'uri'
|
28
28
|
|
29
|
-
$version = "0.1.
|
29
|
+
$version = "0.1.7"
|
30
30
|
$dirs = []
|
31
31
|
|
32
32
|
# The main Spfy class
|
@@ -104,9 +104,9 @@ class Spfy
|
|
104
104
|
xmlFile.write("\t\t\t<location>file://#{encoded_path}</location>\n")
|
105
105
|
end
|
106
106
|
|
107
|
-
xmlFile.write("\t\t\t<title>#{tag.title}</title>\n") if !options.hide_title and !tag.title.
|
108
|
-
xmlFile.write("\t\t\t<creator>#{tag.artist}</creator>\n") if !options.hide_artist and !tag.artist.
|
109
|
-
xmlFile.write("\t\t\t<album>#{tag.album}</album>\n") if !options.hide_album and !tag.album.
|
107
|
+
xmlFile.write("\t\t\t<title>#{tag.title}</title>\n") if !options.hide_title and !tag.title.nil?
|
108
|
+
xmlFile.write("\t\t\t<creator>#{tag.artist}</creator>\n") if !options.hide_artist and !tag.artist.nil?
|
109
|
+
xmlFile.write("\t\t\t<album>#{tag.album}</album>\n") if !options.hide_album and !tag.album.nil?
|
110
110
|
xmlFile.write("\t\t</track>\n")
|
111
111
|
end
|
112
112
|
rescue Exception => e
|
@@ -150,11 +150,13 @@ class Spfy
|
|
150
150
|
puts "\t\t\t<location>file://#{encoded_path}</location>\n"
|
151
151
|
end
|
152
152
|
|
153
|
-
puts "\t\t\t<title>#{tag.title}</title>\n" if !options.hide_title and !tag.title.
|
154
|
-
puts "\t\t\t<creator>#{tag.artist}</creator>\n" if !options.hide_artist and !tag.artist.
|
155
|
-
puts "\t\t\t<album>#{tag.album}</album>\n" if !options.hide_album and !tag.album.
|
153
|
+
puts "\t\t\t<title>#{tag.title}</title>\n" if !options.hide_title and !tag.title.nil?
|
154
|
+
puts "\t\t\t<creator>#{tag.artist}</creator>\n" if !options.hide_artist and !tag.artist.nil?
|
155
|
+
puts "\t\t\t<album>#{tag.album}</album>\n" if !options.hide_album and !tag.album.nil?
|
156
156
|
puts "\t\t</track>\n"
|
157
157
|
end
|
158
|
+
rescue SystemExit, Interrupt
|
159
|
+
# allow user interrupt
|
158
160
|
rescue Exception => e
|
159
161
|
next
|
160
162
|
end
|
data/spfy.gemspec
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
Gem::Specification.new do |s|
|
23
23
|
s.name = 'spfy'
|
24
|
-
s.version = '0.1.
|
24
|
+
s.version = '0.1.7'
|
25
25
|
s.date = '2012-05-06'
|
26
26
|
s.summary = 'XSPF playlist generator'
|
27
27
|
s.description = 'Spfy is a simple command-line tool for generating XSPF playlists from metadata stored in several popular audio formats.'
|