1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-30 19:45:57 +00:00
Lidarr/NzbDrone.Core/ExternalNotification/Twitter.cs

36 lines
933 B
C#
Raw Normal View History

using System.Linq;
using NLog;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Providers;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.ExternalNotification
{
public class Twitter : ExternalNotificationBase
{
private readonly TwitterProvider _twitterProvider;
public Twitter(IExternalNotificationRepository repository, TwitterProvider twitterProvider, Logger logger)
: base(repository, logger)
{
_twitterProvider = twitterProvider;
}
public override string Name
{
get { return "Twitter"; }
}
protected override void OnGrab(string message)
{
_twitterProvider.SendTweet("Download Started: " + message);
}
protected override void OnDownload(string message, Series series)
{
_twitterProvider.SendTweet("Download Completed: " + message);
}
}
}