diff options
| author | Andrew Mahone <andrew.mahone@gmail.com> | 2019-10-04 13:23:08 -0400 |
|---|---|---|
| committer | Andrew Mahone <andrew.mahone@gmail.com> | 2019-10-22 10:32:40 -0400 |
| commit | 03ecf57548b3bd6058b9427ff48f06050725ad4a (patch) | |
| tree | 35fcbbe2f348e47684390a6f6b3a5c91d6cc1665 /MediaBrowser.Controller/Persistence | |
| parent | 321e5cba60825d5791730da75cd12905e97b527e (diff) | |
Store MediaAttachments in DB.
Diffstat (limited to 'MediaBrowser.Controller/Persistence')
| -rw-r--r-- | MediaBrowser.Controller/Persistence/IItemRepository.cs | 15 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Persistence/MediaAttachmentQuery.cs | 20 |
2 files changed, 35 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs index 47e0f3453..68df20c3a 100644 --- a/MediaBrowser.Controller/Persistence/IItemRepository.cs +++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs @@ -79,6 +79,21 @@ namespace MediaBrowser.Controller.Persistence void SaveMediaStreams(Guid id, List<MediaStream> streams, CancellationToken cancellationToken); /// <summary> + /// Gets the media attachments. + /// </summary> + /// <param name="query">The query.</param> + /// <returns>IEnumerable{MediaAttachment}.</returns> + List<MediaAttachment> GetMediaAttachments(MediaAttachmentQuery query); + + /// <summary> + /// Saves the media attachments. + /// </summary> + /// <param name="id">The identifier.</param> + /// <param name="attachments">The attachments.</param> + /// <param name="cancellationToken">The cancellation token.</param> + void SaveMediaAttachments(Guid id, List<MediaAttachment> attachments, CancellationToken cancellationToken); + + /// <summary> /// Gets the item ids. /// </summary> /// <param name="query">The query.</param> diff --git a/MediaBrowser.Controller/Persistence/MediaAttachmentQuery.cs b/MediaBrowser.Controller/Persistence/MediaAttachmentQuery.cs new file mode 100644 index 000000000..91ab34aab --- /dev/null +++ b/MediaBrowser.Controller/Persistence/MediaAttachmentQuery.cs @@ -0,0 +1,20 @@ +using System; +using MediaBrowser.Model.Entities; + +namespace MediaBrowser.Controller.Persistence +{ + public class MediaAttachmentQuery + { + /// <summary> + /// Gets or sets the index. + /// </summary> + /// <value>The index.</value> + public int? Index { get; set; } + + /// <summary> + /// Gets or sets the item identifier. + /// </summary> + /// <value>The item identifier.</value> + public Guid ItemId { get; set; } + } +} |
