aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Models/UserDtos/ILyricsProvider.cs
blob: 37f1f5bbe42e54e89b484f4d21bdce56725d4fa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.Collections.ObjectModel;
using MediaBrowser.Controller.Entities;

namespace Jellyfin.Api.Models.UserDtos
{
    /// <summary>
    /// Interface ILyricsProvider.
    /// </summary>
    public interface ILyricsProvider
    {
        /// <summary>
        /// Gets a value indicating the File Extenstions this provider works with.
        /// </summary>
        public Collection<string>? FileExtensions { get; }

        /// <summary>
        /// Gets a value indicating whether Process() generated data.
        /// </summary>
        /// <returns><c>true</c> if data generated; otherwise, <c>false</c>.</returns>
        bool HasData { get; }

        /// <summary>
        /// Gets Data object generated by Process() method.
        /// </summary>
        /// <returns><c>Object</c> with data if no error occured; otherwise, <c>null</c>.</returns>
        object? Data { get; }

        /// <summary>
        /// Opens lyric file for [the specified item], and processes it for API return.
        /// </summary>
        /// <param name="item">The item to to process.</param>
        void Process(BaseItem item);
    }
}