class MultimediaParadise::Audio::StreamripperWrapper
Constants
- BOOTLIQUOR_URL
#¶ ↑
BOOTLIQUOR_URL
¶ ↑#¶ ↑
- DENVER_URL
#¶ ↑
DENVER_URL
¶ ↑#¶ ↑
- HASH_AVAILABLE_URLS
#¶ ↑
ARRAY_AVAILABLE_URLS¶ ↑
Gather some URLs here.
#¶ ↑
- HOUSE_MUSIC
#¶ ↑
Audio::StreamripperWrapper::HOUSE_MUSIC¶ ↑
#¶ ↑
- URL_1
#¶ ↑
URL_1
¶ ↑#¶ ↑
- URL_2
#¶ ↑
URL_2
¶ ↑#¶ ↑
- URL_SHOUTCAST
#¶ ↑
URL_SHOUTCAST
¶ ↑#¶ ↑
Public Class Methods
new( play_from_where = denver?, run_already = false )
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
# File lib/multimedia_paradise/audio/streamripper/streamripper_wrapper.rb, line 24 def initialize( play_from_where = denver?, # Denver is the default for now. run_already = false ) register_sigint reset if play_from_where set_use_this_url(play_from_where) end run if run_already end
Public Instance Methods
append(i)
click to toggle source
append_where_we_store()
click to toggle source
bootliquor?()
click to toggle source
#¶ ↑
bootliquor?¶ ↑
#¶ ↑
# File lib/multimedia_paradise/audio/streamripper/streamripper_wrapper.rb, line 61 def bootliquor? HASH_AVAILABLE_URLS['Bootliquor'] end
Also aliased as: default_url?
build_command()
click to toggle source
check_whether_streamripper_is_available()
click to toggle source
#¶ ↑
check_whether_streamripper_is_available
¶ ↑
#¶ ↑
# File lib/multimedia_paradise/audio/streamripper/streamripper_wrapper.rb, line 106 def check_whether_streamripper_is_available result = `streamripper 2>&1` if result.include? 'command not found' warn_and_exit 'streamripper is not installer. Please install it first.' else if be_verbose? efancy 'Streamripper is available. We can thus continue.' end end end
denver?()
click to toggle source
dir?()
click to toggle source
do_not_exit()
click to toggle source
dont_write_individual_files()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset¶ ↑
#¶ ↑
Calls superclass method
MultimediaParadise::Base#reset
# File lib/multimedia_paradise/audio/streamripper/streamripper_wrapper.rb, line 39 def reset super() # ======================================================================= # # === @string # ======================================================================= # @string = ''.dup @can_we_exit = true @use_this_url = HOUSE_MUSIC # URL_2 # This is the default. @run_in_simulation_mode = false # If true then we just simulate what we would do. @be_verbose = false end
rip_to_single_file(this_file = nil)
click to toggle source
run()
click to toggle source
run_in_simulation_mode?()
click to toggle source
sanitize_command()
click to toggle source
set_base_command()
click to toggle source
set_destination_directory(this_dir)
click to toggle source
set_pattern(this_pattern)
click to toggle source
set_url(this_url = @use_this_url)
click to toggle source
#¶ ↑
set_url
¶ ↑
Set the URL we want to use. This should point to something that can serve a .pls file.
#¶ ↑
# File lib/multimedia_paradise/audio/streamripper/streamripper_wrapper.rb, line 203 def set_url(this_url = @use_this_url) if this_url.is_a? Array this_url = this_url.first end if this_url.nil? this_url = default_url? end @url = " #{this_url.strip}" end
set_use_this_url(i = nil)
click to toggle source
show_help()
click to toggle source
start_streamripper_server()
click to toggle source
#¶ ↑
start_streamripper_server
¶ ↑
# ¶ ↑
# File lib/multimedia_paradise/audio/streamripper/streamripper_wrapper.rb, line 180 def start_streamripper_server unless @can_we_exit e 'Starting the streamripper-server now from dir '+dir?+':' e simp(' '+@string) system @string unless run_in_simulation_mode? end end
url?()
click to toggle source
use_this_directory_as_base=(i)
click to toggle source