public RecordingsChannel(ILiveTvManager liveTvManager, Configuration.PluginConfiguration pluginConfiguration)
        {
            _pluginConfiguration = pluginConfiguration;

            if (_pluginConfiguration.EnableRecordingImport)
            {
                _liveTvManager = liveTvManager;
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="GenreMapper"/> class.
        /// </summary>
        /// <param name="configuration">The configuration.</param>
        public GenreMapper(PluginConfiguration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            _configuration = configuration;

            _movieGenres = new List<string>();
            _sportGenres = new List<string>();

            LoadInternalLists(_configuration.GenreMappings);
        }
        public void MappingTest()
        {
            var pluginConfiguration = new PluginConfiguration()
            {
                GenreMappings = new SerializableDictionary<String, List<String>>()
                {
                    { GenreMapper.GENRE_MOVIE, new List<string>() { "Movie", "Film" } },
                    { GenreMapper.GENRE_SPORT, new List<string>() { "Sport", "Football" } },
                }
            };

            var target = new GenreMapper(pluginConfiguration);

            // Test movie
            var movie = new ProgramInfo() { Genres = new List<String>() { "Movie", "Drama" }};
            target.PopulateProgramGenres(movie);
            Assert.IsTrue(movie.IsMovie);
            Assert.IsFalse(movie.IsSports);

            var match = new ProgramInfo() { Genres = new List<String>() { "Sport", "Football" } };
            target.PopulateProgramGenres(match);
            Assert.IsFalse(match.IsMovie);
            Assert.IsTrue(match.IsSports);
        }
 /// <summary>
 /// Called when [configuration updated].
 /// </summary>
 /// <param name="oldConfig">The old config.</param>
 /// <param name="newConfig">The new config.</param>
 public void OnConfigurationUpdated(PluginConfiguration oldConfig, PluginConfiguration newConfig)
 {
 }