aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
author1hitsong <3330318+1hitsong@users.noreply.github.com>2022-09-16 20:52:40 -0400
committer1hitsong <3330318+1hitsong@users.noreply.github.com>2022-09-16 20:52:40 -0400
commitf740d1b9f00d91bfad970f56abed67d8c8c16c9c (patch)
tree1e82a195e7e3f74406765dfb64b6d6c30e843d2a /MediaBrowser.Controller
parentf4fd908f8d7ffcdea6acaf75928f6c2960ed6338 (diff)
Remove use of AddParts. Cleanup use of Lyric vs Lyrics.
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Lyrics/ILyricManager.cs18
-rw-r--r--MediaBrowser.Controller/Lyrics/ILyricProvider.cs4
-rw-r--r--MediaBrowser.Controller/Lyrics/Lyric.cs4
-rw-r--r--MediaBrowser.Controller/Lyrics/LyricInfo.cs8
-rw-r--r--MediaBrowser.Controller/Lyrics/LyricResponse.cs9
5 files changed, 19 insertions, 24 deletions
diff --git a/MediaBrowser.Controller/Lyrics/ILyricManager.cs b/MediaBrowser.Controller/Lyrics/ILyricManager.cs
index 4fd11b9e0..c0f78d177 100644
--- a/MediaBrowser.Controller/Lyrics/ILyricManager.cs
+++ b/MediaBrowser.Controller/Lyrics/ILyricManager.cs
@@ -1,37 +1,23 @@
-#nullable disable
-
#pragma warning disable CS1591
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Threading.Tasks;
using MediaBrowser.Controller.Entities;
-using MediaBrowser.Model.Configuration;
-using MediaBrowser.Model.Providers;
namespace MediaBrowser.Controller.Lyrics
{
public interface ILyricManager
{
/// <summary>
- /// Adds the parts.
- /// </summary>
- /// <param name="lyricProviders">The lyric providers.</param>
- void AddParts(IEnumerable<ILyricProvider> lyricProviders);
-
- /// <summary>
/// Gets the lyrics.
/// </summary>
/// <param name="item">The media item.</param>
/// <returns>Lyrics for passed item.</returns>
- LyricResponse GetLyric(BaseItem item);
+ LyricResponse GetLyrics(BaseItem item);
/// <summary>
/// Checks if requested item has a matching local lyric file.
/// </summary>
/// <param name="item">The media item.</param>
- /// <returns>True if item has a matching lyrics file; otherwise false.</returns>
+ /// <returns>True if item has a matching lyric file; otherwise false.</returns>
bool HasLyricFile(BaseItem item);
}
}
diff --git a/MediaBrowser.Controller/Lyrics/ILyricProvider.cs b/MediaBrowser.Controller/Lyrics/ILyricProvider.cs
index 691fed1fd..5e677ab26 100644
--- a/MediaBrowser.Controller/Lyrics/ILyricProvider.cs
+++ b/MediaBrowser.Controller/Lyrics/ILyricProvider.cs
@@ -22,8 +22,8 @@ namespace MediaBrowser.Controller.Lyrics
/// <summary>
/// Gets the lyrics.
/// </summary>
- /// <param name="item">The item to to process.</param>
- /// <returns>Task{LyricResponse}.</returns>
+ /// <param name="item">The media item.</param>
+ /// <returns>If found, returns lyrics for passed item; otherwise, null.</returns>
LyricResponse? GetLyrics(BaseItem item);
}
}
diff --git a/MediaBrowser.Controller/Lyrics/Lyric.cs b/MediaBrowser.Controller/Lyrics/Lyric.cs
index d44546dd3..56a0a8a72 100644
--- a/MediaBrowser.Controller/Lyrics/Lyric.cs
+++ b/MediaBrowser.Controller/Lyrics/Lyric.cs
@@ -1,12 +1,12 @@
namespace MediaBrowser.Controller.Lyrics
{
/// <summary>
- /// Lyric dto.
+ /// Lyric model.
/// </summary>
public class Lyric
{
/// <summary>
- /// Gets or sets the start time (ticks).
+ /// Gets or sets the start time in ticks.
/// </summary>
public double? Start { get; set; }
diff --git a/MediaBrowser.Controller/Lyrics/LyricInfo.cs b/MediaBrowser.Controller/Lyrics/LyricInfo.cs
index d44e14237..018f296b1 100644
--- a/MediaBrowser.Controller/Lyrics/LyricInfo.cs
+++ b/MediaBrowser.Controller/Lyrics/LyricInfo.cs
@@ -11,16 +11,16 @@ using Microsoft.AspNetCore.Mvc;
namespace MediaBrowser.Controller.Lyrics
{
/// <summary>
- /// Item helper.
+ /// Lyric helper methods.
/// </summary>
public static class LyricInfo
{
/// <summary>
- /// Checks if requested item has a matching lyric file.
+ /// Gets matching lyric file for a requested item.
/// </summary>
- /// <param name="lyricProvider">The current lyricProvider interface.</param>
+ /// <param name="lyricProvider">The lyricProvider interface to use.</param>
/// <param name="itemPath">Path of requested item.</param>
- /// <returns>True if item has a matching lyrics file.</returns>
+ /// <returns>Lyric file path if passed lyric provider's supported media type is found; otherwise, null.</returns>
public static string? GetLyricFilePath(ILyricProvider lyricProvider, string itemPath)
{
if (lyricProvider.SupportedMediaTypes.Any())
diff --git a/MediaBrowser.Controller/Lyrics/LyricResponse.cs b/MediaBrowser.Controller/Lyrics/LyricResponse.cs
index e312638ec..498eb873c 100644
--- a/MediaBrowser.Controller/Lyrics/LyricResponse.cs
+++ b/MediaBrowser.Controller/Lyrics/LyricResponse.cs
@@ -6,10 +6,19 @@ using System.Collections.Generic;
namespace MediaBrowser.Controller.Lyrics
{
+ /// <summary>
+ /// LyricResponse model.
+ /// </summary>
public class LyricResponse
{
+ /// <summary>
+ /// Gets or sets MetaData.
+ /// </summary>
public IDictionary<string, object> MetaData { get; set; }
+ /// <summary>
+ /// Gets or sets Lyrics.
+ /// </summary>
public IEnumerable<Lyric> Lyrics { get; set; }
}
}