lib/ayadn/action.rb in ayadn-1.0.12 vs lib/ayadn/action.rb in ayadn-1.0.13
- old
+ new
@@ -798,11 +798,12 @@
itunes = get_track_infos
itunes.each do |el|
abort(Status.empty_fields) if el.length == 0
end
@view.clear_screen
- text_to_post = "#nowplaying '#{itunes.track}' from '#{itunes.album}' by #{itunes.artist}"
+ #text_to_post = "#nowplaying '#{itunes.track}' from '#{itunes.album}' by #{itunes.artist}"
+ text_to_post = "#nowplaying\nTitle: ‘#{itunes.track}’\nArtist: #{itunes.artist}\nfrom ‘#{itunes.album}’"
show_nowplaying(text_to_post)
unless STDIN.getch == ("y" || "Y")
puts "\nCanceled.\n\n".color(:red)
exit
end
@@ -1131,10 +1132,10 @@
maker = Struct.new(:artist, :album, :track)
maker.new(artist.chomp!, album.chomp!, track.chomp!)
end
def show_nowplaying(text)
- puts "\nThis is what will be posted:\n".color(:cyan)
+ puts "\nYour post:\n".color(:cyan)
puts text + "\n\n"
puts "Do you confirm? (y/N) ".color(:yellow)
end
def countdown(wait)