Playlist-level retry configuration
This commit is contained in:
@@ -56,6 +56,7 @@ type Playlist struct {
|
||||
Entries []PlaylistEntry
|
||||
Loop bool
|
||||
OnFailure PlaylistFailurePolicy
|
||||
Retry *RetryPolicy
|
||||
}
|
||||
|
||||
func (f PlaylistFeed) IsConfigured() bool {
|
||||
@@ -95,6 +96,11 @@ func (p Playlist) Validate() error {
|
||||
if err := p.OnFailure.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
if p.Retry != nil {
|
||||
if err := p.Retry.Validate(); err != nil {
|
||||
return fmt.Errorf("playlist retry: %w", err)
|
||||
}
|
||||
}
|
||||
for index, entry := range p.Entries {
|
||||
if err := entry.Validate(); err != nil {
|
||||
return fmt.Errorf("playlist entry %d: %w", index, err)
|
||||
|
||||
Reference in New Issue
Block a user