Ejemplo n.º 1
0
        /// <summary>
        /// Writes a Kodi episode NFO file to the destination directory
        /// </summary>
        private void NfoFileHandler()
        {
            if (Helpers.IsFileNameKodiCompatible(_outputFileName))
            {
                _log.Information("Not generating Kodi NFO files because output file name is compatible with Kodi");
            }
            else
            {
                _log.Information("Saving episode:{@Episode}", _episode);

                var episodeNfoFile = GetOutputFile(".nfo");
                _log.Information("Saving episode NFO file to \"{EpisodeNfoPath}\"", episodeNfoFile);

                if (_appContext.WhatIf == false)
                {
                    _episode.SaveNfoFile(episodeNfoFile);
                }

                var showNfoFile = Path.Combine(GetOutputDirectory(), "tvshow.nfo");
                _log.Information("Saving show NFO file to \"{ShowNfoPath}\"", showNfoFile);

                if (_appContext.WhatIf == false)
                {
                    _episode.SaveShowNfoFile(showNfoFile);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Writes a Kodi episode NFO file to the destination directory unless the output video file name is Kodi compatible
        /// </summary>
        private void NfoFileHandler()
        {
            if (Helpers.IsFileNameKodiCompatible(_outputFileName))
            {
                _log.Information("Not generating Kodi TV episode NFO file because output file name is compatible with Kodi");
            }
            else
            {
                _log.Information("Saving episode:{@Episode}", _episode);

                var episodeNfoFile = GetOutputFile(".nfo");
                _log.Information("Saving episode NFO file to \"{EpisodeNfoPath}\"", episodeNfoFile);

                if (_appContext.WhatIf == false)
                {
                    _episode.SaveNfoFile(episodeNfoFile);
                }
            }
        }