Module: MiniradioServer
- Defined in:
- lib/miniradio_server/app.rb,
lib/miniradio_server.rb,
lib/miniradio_server/version.rb
Overview
Rack application class
Defined Under Namespace
Constant Summary collapse
- MP3_SRC_DIR =
--- Configuration --- Directory containing the original MP3 files
File.('./mp3_files')
- HLS_CACHE_DIR =
Directory to cache the HLS converted content
File.('./hls_cache')
- SERVER_PORT =
Port the server will listen on
9292- FFMPEG_COMMAND =
Path to the ffmpeg command (usually just 'ffmpeg' if it's in the system PATH)
'ffmpeg'- HLS_SEGMENT_DURATION =
HLS segment duration in seconds
10- VERSION =
"0.0.3"
Class Method Summary collapse
-
.ensure_directories_exist(dirs, logger) ⇒ Object
Ensures that the necessary directories exist, creating them if they don't.
Class Method Details
.ensure_directories_exist(dirs, logger) ⇒ Object
Ensures that the necessary directories exist, creating them if they don't.
30 31 32 33 34 35 36 37 |
# File 'lib/miniradio_server.rb', line 30 def self.ensure_directories_exist(dirs, logger) dirs.each do |dir| unless Dir.exist?(dir) logger.info("Creating directory: #{dir}") FileUtils.mkdir_p(dir) end end end |