fix(newznab): Use valid usenet release protocol for Starrs (#762)

also update comments

Fixes #761
This commit is contained in:
bakerboy448 2023-03-19 14:58:47 -05:00 committed by GitHub
parent 29bedc532d
commit 830e719169
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -13,7 +13,7 @@ type EventsReleasePushed struct {
ActionType ActionType
ActionClient string
Rejections []string
Protocol ReleaseProtocol // torrent
Protocol ReleaseProtocol // torrent, usenet
Implementation ReleaseImplementation // irc, rss, api
Timestamp time.Time
}

View file

@ -55,7 +55,7 @@ type NotificationPayload struct {
ActionType ActionType
ActionClient string
Rejections []string
Protocol ReleaseProtocol // torrent
Protocol ReleaseProtocol // torrent, usenet
Implementation ReleaseImplementation // irc, rss, api
Timestamp time.Time
}

View file

@ -154,7 +154,7 @@ type ReleaseProtocol string
const (
ReleaseProtocolTorrent ReleaseProtocol = "torrent"
ReleaseProtocolNzb ReleaseProtocol = "nzb"
ReleaseProtocolNzb ReleaseProtocol = "usenet"
)
func (r ReleaseProtocol) String() string {
@ -162,7 +162,7 @@ func (r ReleaseProtocol) String() string {
case ReleaseProtocolTorrent:
return "torrent"
case ReleaseProtocolNzb:
return "nzb"
return "usenet"
default:
return "torrent"
}

View file

@ -33,7 +33,7 @@ type notifiarrMessageData struct {
ActionType *domain.ActionType `json:"action_type,omitempty"`
ActionClient *string `json:"action_client,omitempty"`
Rejections []string `json:"rejections,omitempty"`
Protocol *domain.ReleaseProtocol `json:"protocol,omitempty"` // torrent
Protocol *domain.ReleaseProtocol `json:"protocol,omitempty"` // torrent, usenet
Implementation *domain.ReleaseImplementation `json:"implementation,omitempty"` // irc, rss, api
Timestamp time.Time `json:"timestamp"`
}