blob: 95047ee83ec960cf8b066feacfb2bdd8b3852370 (
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
|
using System.Collections.Generic;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Providers.Plugins.GoogleBooks;
/// <inheritdoc/>
public class GoogleBooksExternalUrlProvider : IExternalUrlProvider
{
/// <inheritdoc />
public string Name => "Google Books";
/// <inheritdoc />
public IEnumerable<string> GetExternalUrls(BaseItem item)
{
if (item.TryGetProviderId("GoogleBooks", out var externalId))
{
if (item is Book)
{
yield return $"https://books.google.com/books?id={externalId}";
}
}
}
}
|