Sha256: 79259373a1736a1ddef54f791cdd5ae2d0be38ec9c8d648065a9d7c8d5223d35

Contents?: true

Size: 553 Bytes

Versions: 1

Compression:

Stored size: 553 Bytes

Contents

module MediaPaths
  SERIES_BASE = "#{Dir.home}/Movies/series".freeze
  MOVIES_BASE = "#{Dir.home}/Movies/movies".freeze

  # Series

  def series_path(episode)
    nil unless episode
    "#{SERIES_BASE}/#{episode.series}"
  end

  def episode_path(episode)
    nil unless episode
    "#{series_path(episode)}/#{episode.title}.#{episode.format}"
  end

  def series_base
    SERIES_BASE
  end

  # Movies

  def movie_path(movie)
    nil unless movie
    "#{MOVIES_BASE}/#{movie.title}.#{movie.format}"
  end

  def movies_base
    MOVIES_BASE
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
media-runner-1.0.3 lib/media/runner/app/media_paths.rb