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 ActionType ActionType
ActionClient string ActionClient string
Rejections []string Rejections []string
Protocol ReleaseProtocol // torrent Protocol ReleaseProtocol // torrent, usenet
Implementation ReleaseImplementation // irc, rss, api Implementation ReleaseImplementation // irc, rss, api
Timestamp time.Time Timestamp time.Time
} }

View file

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

View file

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

View file

@ -33,7 +33,7 @@ type notifiarrMessageData struct {
ActionType *domain.ActionType `json:"action_type,omitempty"` ActionType *domain.ActionType `json:"action_type,omitempty"`
ActionClient *string `json:"action_client,omitempty"` ActionClient *string `json:"action_client,omitempty"`
Rejections []string `json:"rejections,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 Implementation *domain.ReleaseImplementation `json:"implementation,omitempty"` // irc, rss, api
Timestamp time.Time `json:"timestamp"` Timestamp time.Time `json:"timestamp"`
} }