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>
(cherry picked from commit ff7694cd46)
r14.0.x r14.0.12
Mavridis Philippe 3 years ago
parent ac710b0f73
commit 355324adda
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