aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/Books/Isbn/ISBNExternalUrlProvider.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2025-11-21 09:58:34 +0900
committerdkanada <dkanada@users.noreply.github.com>2026-01-29 19:45:31 +0900
commit0413a8b6d29f0718e7ac9c97b8658c5aedf66e4e (patch)
tree0e7c1168d615842ef7a9e968f4b7bb66dda7b63f /MediaBrowser.Providers/Books/Isbn/ISBNExternalUrlProvider.cs
parent841e4dabb513c9c94bcbb0005d19e2a8be6434a5 (diff)
include external IDs and URLs for book providers
Diffstat (limited to 'MediaBrowser.Providers/Books/Isbn/ISBNExternalUrlProvider.cs')
-rw-r--r--MediaBrowser.Providers/Books/Isbn/ISBNExternalUrlProvider.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/MediaBrowser.Providers/Books/Isbn/ISBNExternalUrlProvider.cs b/MediaBrowser.Providers/Books/Isbn/ISBNExternalUrlProvider.cs
new file mode 100644
index 0000000000..9d7b1ff208
--- /dev/null
+++ b/MediaBrowser.Providers/Books/Isbn/ISBNExternalUrlProvider.cs
@@ -0,0 +1,25 @@
+using System.Collections.Generic;
+using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Providers;
+using MediaBrowser.Model.Entities;
+
+namespace MediaBrowser.Providers.Books.Isbn;
+
+/// <inheritdoc/>
+public class IsbnExternalUrlProvider : IExternalUrlProvider
+{
+ /// <inheritdoc/>
+ public string Name => "ISBN";
+
+ /// <inheritdoc />
+ public IEnumerable<string> GetExternalUrls(BaseItem item)
+ {
+ if (item.TryGetProviderId("ISBN", out var externalId))
+ {
+ if (item is Book)
+ {
+ yield return $"https://search.worldcat.org/search?q=bn:{externalId}";
+ }
+ }
+ }
+}