diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2022-04-10 11:46:12 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2022-04-10 11:46:12 +0300 |
commit | ff7694cd46931691d0afa8dceaa28f2c0b5ef4c2 (patch) | |
tree | 6e4d0d8abffea35cdfb3ad0b029a1775e2f530e2 | |
parent | 3aa16360eef080ab9bb9d155022bcc49f9cfb52f (diff) | |
download | amarok-ff7694cd46931691d0afa8dceaa28f2c0b5ef4c2.tar.gz amarok-ff7694cd46931691d0afa8dceaa28f2c0b5ef4c2.zip |
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>
-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 |