You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
933 B
36 lines
933 B
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);
|
|
}
|
|
|
|
}
|
|
}
|