8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/spty/commands/play_command.rb', line 8
def self.call(options, _)
return unless running?
player_state_script = Spty::Command::StateCommand::ASCRIPT_PLAYER_STATE
player_state = Spty::AppleScriptRunner.(player_state_script)
if player_state.strip == 'paused'
Spty::AppleScriptRunner.call(ASCRIPT_PLAYER_PLAY)
end
track_info_script = Spty::Command::InfoCommand::ASCRIPT_TRACK_INFO
track_info = Spty::AppleScriptRunner.(track_info_script)
puts "=> #{track_info.strip} [playing]"
end
|