1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

minor cleanup

This commit is contained in:
kay.one 2013-06-03 22:54:49 -07:00
parent 8a1c6aa4d8
commit fc7d4536ac
3 changed files with 8 additions and 15 deletions

View File

@ -88,7 +88,7 @@ private void RefreshSeriesInfo(Series series)
private void RefreshEpisodeInfo(Series series, IEnumerable<Episode> remoteEpisodes) private void RefreshEpisodeInfo(Series series, IEnumerable<Episode> remoteEpisodes)
{ {
_logger.Trace("Starting episode info refresh for series: {0}", series.Title.WithDefault(series.Id)); _logger.Info("Starting series info refresh for: {0}", series.Title.WithDefault(series.Id));
var successCount = 0; var successCount = 0;
var failCount = 0; var failCount = 0;
@ -104,12 +104,12 @@ private void RefreshEpisodeInfo(Series series, IEnumerable<Episode> remoteEpisod
{ {
try try
{ {
_logger.Trace("Updating info for [{0}] - S{1:00}E{2:00}", series.Title, episode.SeasonNumber, episode.EpisodeNumber); var episodeToUpdate = seriesEpisodes.SingleOrDefault(e => e.TvDbEpisodeId == episode.TvDbEpisodeId);
var episodeToUpdate = seriesEpisodes.SingleOrDefault(e =>
e.TvDbEpisodeId == episode.TvDbEpisodeId ||
(e.SeasonNumber == episode.SeasonNumber && e.EpisodeNumber == episode.EpisodeNumber));
if (episodeToUpdate == null)
{
episodeToUpdate = seriesEpisodes.SingleOrDefault(e => e.SeasonNumber == episode.SeasonNumber && e.EpisodeNumber == episode.EpisodeNumber);
}
if (episodeToUpdate == null) if (episodeToUpdate == null)
{ {
episodeToUpdate = new Episode(); episodeToUpdate = new Episode();

View File

@ -24,8 +24,8 @@
layout="${date:format=yy-M-d HH\:mm\:ss.f}|${level}|${logger}|${message}${onexception:inner=${newline}${newline}${exception:format=ToString}${newline}}"/> layout="${date:format=yy-M-d HH\:mm\:ss.f}|${level}|${logger}|${message}${onexception:inner=${newline}${newline}${exception:format=ToString}${newline}}"/>
</targets> </targets>
<rules> <rules>
<logger name="*" minlevel="Debug" writeTo="consoleLogger"/> <logger name="*" minlevel="Trace" writeTo="consoleLogger"/>
<logger name="*" minlevel="Off" writeTo="udpTarget"/> <logger name="*" minlevel="Off" writeTo="udpTarget"/>
<logger name="*" minlevel="Debug" writeTo="rollingFileLogger"/> <logger name="*" minlevel="Info" writeTo="rollingFileLogger"/>
</rules> </rules>
</nlog> </nlog>

View File

@ -143,13 +143,6 @@ define([
command : 'refreshseries', command : 'refreshseries',
successMessage: 'Library was updated!', successMessage: 'Library was updated!',
errorMessage : 'Library update failed!' errorMessage : 'Library update failed!'
},
{
title : 'Test Action',
icon : 'icon-asterisk',
command : 'test',
successMessage: 'Test Completed',
errorMessage : 'Test Failed!'
} }
] ]
}; };