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.
31 lines
944 B
31 lines
944 B
using System.Collections.Generic;
|
|
using FluentValidation;
|
|
using NzbDrone.Core.Annotations;
|
|
|
|
namespace NzbDrone.Core.ImportLists.Spotify
|
|
{
|
|
public class SpotifyPlaylistSettingsValidator : SpotifySettingsBaseValidator<SpotifyPlaylistSettings>
|
|
{
|
|
public SpotifyPlaylistSettingsValidator()
|
|
: base()
|
|
{
|
|
RuleFor(c => c.PlaylistIds).NotEmpty();
|
|
}
|
|
}
|
|
|
|
public class SpotifyPlaylistSettings : SpotifySettingsBase<SpotifyPlaylistSettings>
|
|
{
|
|
protected override AbstractValidator<SpotifyPlaylistSettings> Validator => new SpotifyPlaylistSettingsValidator();
|
|
|
|
public SpotifyPlaylistSettings()
|
|
{
|
|
PlaylistIds = System.Array.Empty<string>();
|
|
}
|
|
|
|
public override string Scope => "playlist-read-private";
|
|
|
|
[FieldDefinition(1, Label = "Playlists", Type = FieldType.Playlist)]
|
|
public IEnumerable<string> PlaylistIds { get; set; }
|
|
}
|
|
}
|