Use CGI::unescape instead of deprecated URL::decode

https://ruby-doc.org/stdlib-2.5.1/libdoc/uri/rdoc/URI/Escape.html#method-i-unescape

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/32/head
Mavridis Philippe 3 years ago
parent 3aa16360ee
commit ff7694cd46
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -6,7 +6,7 @@
#
# License: GNU General Public License V2
require 'uri'
require 'cgi'
loop do
args = gets.chomp.split(" ")
@ -30,7 +30,7 @@ loop do
newscore = ( ( prevscore * playcount ) + percentage ) / ( playcount + 1 )
end
system( "dcop", "amarok", "player", "setScoreByPath", URI::decode( url ), newscore.to_s )
system( "dcop", "amarok", "player", "setScoreByPath", CGI::unescape( url ), newscore.to_s )
end
end

Loading…
Cancel
Save