diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2022-04-10 11:46:12 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2022-04-10 12:10:30 +0300 |
commit | 355324adda588ccc251b3eb5ef5ff5ce7b55c916 (patch) | |
tree | 8f9cd2c73fd6d782b11fcfc57369caa8b0fb5ea2 | |
parent | ac710b0f73475d6e8b728bdaa3f462c9bc930c88 (diff) | |
download | amarok-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.rb | 4 |
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 |