score_impulsive.rb
来自「Amarok是一款在LINUX或其他类UNIX操作系统中运行的音频播放器软件。 」· RB 代码 · 共 32 行
RB
32 行
#!/usr/bin/env ruby## Amarok Script for custom scoring## (c) 2006 G谩bor Lehel <illissius@gmail.com>## License: GNU General Public License V2require 'uri'loop do args = gets.chomp.split(" ") case args[0] when "configure" msg = 'This script does not require any configuration.' `dcop amarok playlist popupMessage "#{msg}"` when "requestNewScore" url = args[1] prevscore = args[2].to_f playcount = args[3].to_i length = args[4].to_i percentage = args[5].to_i reason = args[6] newscore = ( ( prevscore + percentage ) / 2 ).to_i system( "dcop", "amarok", "player", "setScoreByPath", URI::decode( url ), newscore.to_s ) endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?