Sha256: 282da6dd58e2944850b8a31d95cc4298015762837d5cde0374e44700841f744b
Contents?: true
Size: 544 Bytes
Versions: 1
Compression:
Stored size: 544 Bytes
Contents
require 'media/runner/app/media_paths' module FileCheck extend MediaPaths def series_exists?(series) if File.directory? series_path(series) true else false end end def episode_exists?(series, episode) [:mkv, :mp4, :avi].each do |format| return true if File.file? episode_path(series, episode, format) end false end def episode_format(series, episode) [:mkv, :mp4, :avi].each do |format| return format.to_s if File.file? episode_path(series, episode, format) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
media-runner-1.0.2 | lib/media/runner/app/file_check.rb |