module KodiDedup

Constants

VERSION

Public Class Methods

client() click to toggle source
# File lib/kodi_dedup.rb, line 25
def self.client
  @client ||= Kodi::Client.new(config.url)
end
config() click to toggle source
# File lib/kodi_dedup.rb, line 47
def self.config
  @config
end
config!(options) click to toggle source
# File lib/kodi_dedup.rb, line 43
def self.config!(options)
  @config = Config.new(options)
end
episodes(show_id) click to toggle source
# File lib/kodi_dedup.rb, line 33
def self.episodes(show_id)
  episodes = KodiDedup.client.video_library.GetEpisodes(tvshowid: show_id, properties: [:season, :episode, :file, :lastplayed, :playcount])['episodes']
  return [] unless episodes
  Episodes.new(episodes)
end
movies() click to toggle source
# File lib/kodi_dedup.rb, line 39
def self.movies
  Movies.new(KodiDedup.client.video_library.GetMovies(properties: [:file, :title, :playcount])['movies'])
end
shell() click to toggle source
# File lib/kodi_dedup.rb, line 51
def self.shell
  @shell ||= Thor::Shell::Color.new
end
shows() click to toggle source
# File lib/kodi_dedup.rb, line 29
def self.shows
  Shows.new(client.video_library.GetTVShows['tvshows'])
end