mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
external notifications are now based on Events.
This commit is contained in:
parent
a866c419e1
commit
5fc25b6095
32 changed files with 542 additions and 619 deletions
35
NzbDrone.Core/ExternalNotification/Twitter.cs
Normal file
35
NzbDrone.Core/ExternalNotification/Twitter.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue