diff --git a/Jellyfin.Plugin.TubeArchivistMetadata/TubeArchivist/Playlist/CustomPlaylistCreation.cs b/Jellyfin.Plugin.TubeArchivistMetadata/TubeArchivist/Playlist/CustomPlaylistCreation.cs new file mode 100644 index 0000000..5c9d848 --- /dev/null +++ b/Jellyfin.Plugin.TubeArchivistMetadata/TubeArchivist/Playlist/CustomPlaylistCreation.cs @@ -0,0 +1,25 @@ +using Newtonsoft.Json; + +namespace Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist +{ + /// + /// A class representing TubeArchivist API custom playlist creation request. + /// + public class CustomPlaylistCreation + { + /// + /// Initializes a new instance of the class. + /// + /// The name of the new custom playlist to create. + public CustomPlaylistCreation(string playlistName) + { + this.PlaylistName = playlistName; + } + + /// + /// Gets or sets the name of the new custom playlist to create. + /// + [JsonProperty(PropertyName = "playlist_name")] + public string PlaylistName { get; set; } + } +} diff --git a/Jellyfin.Plugin.TubeArchivistMetadata/TubeArchivist/Playlist/CustomPlaylistEntryAction.cs b/Jellyfin.Plugin.TubeArchivistMetadata/TubeArchivist/Playlist/CustomPlaylistEntryAction.cs new file mode 100644 index 0000000..da879b4 --- /dev/null +++ b/Jellyfin.Plugin.TubeArchivistMetadata/TubeArchivist/Playlist/CustomPlaylistEntryAction.cs @@ -0,0 +1,72 @@ +using System.Globalization; +using Newtonsoft.Json; + +namespace Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist +{ + /// + /// Enum representing the possible actions to execute on a TubeArchivist custom playlist video. + /// + public enum CustomPlaylistAction + { + /// + /// Create a new custom playlist video. + /// + Create, + + /// + /// Removea custom playlist video. + /// + Remove, + + /// + /// Move a custom playlist video to the top of the list. + /// + Top, + + /// + /// Move a custom playlist video to the bottom of the list. + /// + Bottom, + + /// + /// Move a custom playlist video up in the list. + /// + Up, + + /// + /// Move a custom playlist video down in the list. + /// + Down + } + + /// + /// A class representing TubeArchivist API custom playlist entry operation request. + /// + public class CustomPlaylistEntryAction + { + /// + /// Initializes a new instance of the class. + /// + /// The standard action to create a new entry. + /// The entry YoutubeId. + public CustomPlaylistEntryAction( + CustomPlaylistAction action, + string videoId) + { + this.Action = action.ToString().ToLower(CultureInfo.CurrentCulture); + this.VideoId = videoId; + } + + /// + /// Gets or sets the standard action to create a new entry. + /// + [JsonProperty(PropertyName = "action")] + public string Action { get; set; } + + /// + /// Gets or sets the entry YoutubeId. + /// + [JsonProperty(PropertyName = "video_id")] + public string VideoId { get; set; } + } +}