summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2022-04-10 11:46:12 +0300
committerMavridis Philippe <mavridisf@gmail.com>2022-04-10 12:10:30 +0300
commit355324adda588ccc251b3eb5ef5ff5ce7b55c916 (patch)
tree8f9cd2c73fd6d782b11fcfc57369caa8b0fb5ea2
parentac710b0f73475d6e8b728bdaa3f462c9bc930c88 (diff)
downloadamarok-355324adda588ccc251b3eb5ef5ff5ce7b55c916.tar.gz
amarok-355324adda588ccc251b3eb5ef5ff5ce7b55c916.zip
Use CGI::unescape instead of deprecated URL::decoder14.0.12
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 ff7694cd46931691d0afa8dceaa28f2c0b5ef4c2)
-rw-r--r--amarok/src/scripts/score_default/score_default.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/amarok/src/scripts/score_default/score_default.rb b/amarok/src/scripts/score_default/score_default.rb
index f80a3a7d..0eb00727 100644
--- a/amarok/src/scripts/score_default/score_default.rb
+++ b/amarok/src/scripts/score_default/score_default.rb
@@ -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