Class: ItunesController::RemoveDeadFilesCommand
- Inherits:
-
ServerCommand
- Object
- ServerCommand
- ItunesController::RemoveDeadFilesCommand
- Defined in:
- lib/itunesController/controllserver.rb
Overview
This command will remove any files in the itunes library where the path points at a file that does not exist.
Instance Attribute Summary
Attributes inherited from ServerCommand
#name, #requiredLoginState, #singleThreaded
Instance Method Summary collapse
-
#executeSingleThreaded(state) ⇒ Object
This is executed when the command is popped from the job queue.
-
#initialize(state, itunes) ⇒ RemoveDeadFilesCommand
constructor
The constructor.
- #processData(line, io) ⇒ Object
Methods inherited from ServerCommand
Constructor Details
#initialize(state, itunes) ⇒ RemoveDeadFilesCommand
The constructor
364 365 366 |
# File 'lib/itunesController/controllserver.rb', line 364 def initialize(state,itunes) super(ItunesController::CommandName::REMOVEDEADFILES,ServerState::AUTHED,true,state,itunes) end |
Instance Method Details
#executeSingleThreaded(state) ⇒ Object
This is executed when the command is popped from the job queue. It is used to force single threaded access to itunes
376 377 378 379 |
# File 'lib/itunesController/controllserver.rb', line 376 def executeSingleThreaded(state) @itunes.cacheTracks() @itunes.removeDeadTracks() end |
#processData(line, io) ⇒ Object
368 369 370 371 |
# File 'lib/itunesController/controllserver.rb', line 368 def processData(line,io) return true, "220 ok\r\n" end |