Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,24 @@ dotnet build
2. Copy the DLL: `cp TheIntroDB/bin/Debug/netstandard2.0/TheIntroDB.dll /var/lib/emby/plugins/` (adjust path for your OS)
3. Restart Emby Server.

## License

**GNU General Public License v3.0 or later** (`GPL-3.0-or-later`) — see [LICENSE](LICENSE) for the full text.

> This program is free software: you can redistribute it and/or modify it under the
> terms of the GNU General Public License as published by the Free Software
> Foundation, either version 3 of the License, or (at your option) any later version.
>
> This program is distributed in the hope that it will be useful, but WITHOUT ANY
> WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE. See the GNU General Public License for more details.

Every source file carries `SPDX-License-Identifier: GPL-3.0-or-later`. The "or later" grant is deliberate: it lets the project adopt a future GPL version without re-licensing from every contributor.

---

--

<p align="center">
<a href="https://theintrodb.org"><img src="https://raw.githubusercontent.com/TheIntroDB/theintrodb-assets/main/badge.png" alt="TheIntroDB" width="44" height="44"></a>
<br><br>
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB.Tests/ChapterMarkerPolicyTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System.Collections.Generic;
using MediaBrowser.Model.Entities;
using TheIntroDB.Configuration;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB.Tests/LegacyMarkerAdoptionTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB.Tests/OnDemandFetchGateTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB.Tests/ScanSafetyTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -99,12 +102,12 @@
// this to five minutes would turn an exhausted daily budget into
// a probe loop (the 429-every-five-minutes behaviour).
response.Headers.Add("X-UsageLimit-Reset", "49000");
Assert.Equal(49000, Assert.IsType<int>(method.Invoke(null, new object[] { response.Headers, null })));

Check warning on line 105 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 105 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 105 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.

Check warning on line 105 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.

// Sanity bound: never wait longer than a day for the daily bucket.
response.Headers.Clear();
response.Headers.Add("X-UsageLimit-Reset", "999999");
Assert.Equal(86400, Assert.IsType<int>(method.Invoke(null, new object[] { response.Headers, null })));

Check warning on line 110 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 110 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 110 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.

Check warning on line 110 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.
}
}

Expand All @@ -120,7 +123,7 @@
{
// A broken/huge rate-limit reset must never disable lookups for days.
response.Headers.Add("X-RateLimit-Reset", "999999");
Assert.Equal(300, Assert.IsType<int>(method.Invoke(null, new object[] { response.Headers, null })));

Check warning on line 126 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 126 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 126 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.

Check warning on line 126 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.
}
}

Expand All @@ -136,7 +139,7 @@
{
// Fiber's limiter answers rate-limit 429s with Retry-After only.
response.Headers.RetryAfter = new RetryConditionHeaderValue(TimeSpan.FromSeconds(10));
Assert.Equal(10, Assert.IsType<int>(method.Invoke(null, new object[] { response.Headers, null })));

Check warning on line 142 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 142 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 142 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.

Check warning on line 142 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.
}
}

Expand All @@ -150,7 +153,7 @@

using (var response = new HttpResponseMessage())
{
Assert.Equal(300, Assert.IsType<int>(method.Invoke(null, new object[] { response.Headers, null })));

Check warning on line 156 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 156 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 156 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.

Check warning on line 156 in TheIntroDB.Tests/ScanSafetyTests.cs

View workflow job for this annotation

GitHub Actions / test

Cannot convert null literal to non-nullable reference type.
}
}

Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB.Tests/SegmentRefreshPolicyTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using TheIntroDB.Services;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB.Tests/SegmentTimestampTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Reflection;
Expand Down
1 change: 1 addition & 0 deletions TheIntroDB.Tests/TheIntroDB.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB.Tests/TheIntroDbNotFoundCacheTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.IO;
using MediaBrowser.Model.Logging;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB.Tests/V4MigrationTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Linq;
using MediaBrowser.Controller.Entities.TV;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/ApiKeyValidationService.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Services;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/LibraryProbeService.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/MediaFetchResult.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;

namespace TheIntroDB.Api
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/MediaResponse.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System.Collections.Generic;
using System.Text.Json.Serialization;

Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/NotFoundCacheService.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using MediaBrowser.Model.Services;
using TheIntroDB.Services;

Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/SegmentTimestamp.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System.Text.Json.Serialization;

namespace TheIntroDB.Api
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/SegmentsService.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System.Collections.Generic;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Logging;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/TheIntroDbApiKeyValidationService.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Net.Http;
using System.Net.Http.Headers;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/TheIntroDbClient.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Api/TheIntroDbUserStats.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System.Collections.ObjectModel;
using System.Text.Json;
using System.Text.Json.Serialization;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using MediaBrowser.Model.Plugins;

namespace TheIntroDB.Configuration
Expand Down
2 changes: 2 additions & 0 deletions TheIntroDB/Configuration/configPage.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
<!-- Copyright (C) 2026 TheIntroDB -->
<div data-role="page" class="type-interior pluginConfigurationPage TheIntroDBConfigurationPage" data-require="emby-input,emby-button,emby-checkbox" data-controller="__plugin/TheIntroDBConfigurationPageJS">
<style>
.TheIntroDBConfigurationPage .verticalSection {
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Configuration/configPage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

define(["emby-input", "emby-button", "emby-checkbox"], function () {
return function (view) {
var pluginUniqueId = "424b8e01-03d2-40a1-ba58-a2b9306f115d";
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Data/ITheIntroDbSegmentRepository.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using TheIntroDB.Models;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Data/TheIntroDbSegmentRepository.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.IO;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/EntryPoints/TheIntroDbUsageReportingEntryPoint.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Models/MediaSegmentData.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;

namespace TheIntroDB.Models
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Models/OwnedChapterMarker.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using MediaBrowser.Model.Entities;

namespace TheIntroDB.Models
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Models/StoredMediaSegment.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

namespace TheIntroDB.Models
{
public sealed class StoredMediaSegment
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Plugin.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Globalization;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Providers/SegmentFetchResult.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System.Collections.Generic;
using TheIntroDB.Models;

Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Providers/TheIntroDbSegmentProvider.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Services/AnonymousUsageReporter.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Globalization;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Services/ChapterMarkerPolicy.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Services/PluginLogger.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.IO;
using System.Text;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Services/ScanLookupBudget.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;

namespace TheIntroDB.Services
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Services/SegmentRefreshPolicy.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;

Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Services/TheIntroDbChapterMarkerWriter.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Services/TheIntroDbLegacyMarkerAdoption.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Services/TheIntroDbLibraryScanner.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Services/TheIntroDbNotFoundCache.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Tasks/TheIntroDbMediaSegmentPreviewTask.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Reflection;
Expand Down
3 changes: 3 additions & 0 deletions TheIntroDB/Tasks/TheIntroDbMediaSegmentScanTask.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 TheIntroDB

using System;
using System.Collections.Generic;
using System.Reflection;
Expand Down
1 change: 1 addition & 0 deletions TheIntroDB/TheIntroDB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>TheIntroDB</RootNamespace>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
Expand Down
Loading