From ff7694cd46931691d0afa8dceaa28f2c0b5ef4c2 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sun, 10 Apr 2022 11:46:12 +0300 Subject: 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 --- amarok/src/scripts/score_default/score_default.rb | 4 ++-- 1 file 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 -- cgit v1.2.1