Showing with 2,446 additions and 720 deletions.
  1. +0 −22 .github/ISSUE_TEMPLATE/bug_report.md
  2. +54 −0 .github/ISSUE_TEMPLATE/bug_report.yml
  3. +0 −1 .github/ISSUE_TEMPLATE/feature_request.md
  4. +2 −2 .github/workflows/build.yml
  5. +91 −56 .github/workflows/container.yml
  6. +2 −4 .github/workflows/publish.yml
  7. +0 −18 .github/workflows/test.yaml
  8. +6 −0 ACKNOWLEDGEMENTS.md
  9. +12 −0 CHANGELOG.md
  10. +25 −25 ConfusedPolarBear.Plugin.IntroSkipper.Tests/ConfusedPolarBear.Plugin.IntroSkipper.Tests.csproj
  11. +16 −7 ConfusedPolarBear.Plugin.IntroSkipper.Tests/TestAudioFingerprinting.cs
  12. +72 −0 ConfusedPolarBear.Plugin.IntroSkipper.Tests/TestBlackFrames.cs
  13. +83 −0 ConfusedPolarBear.Plugin.IntroSkipper.Tests/TestChapterAnalyzer.cs
  14. +34 −0 ConfusedPolarBear.Plugin.IntroSkipper.Tests/TestWarnings.cs
  15. +1 −1 ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/selenium/main.py
  16. +10 −5 ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/verifier/report_generator.go
  17. +8 −0 ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/main.go
  18. +9 −8 ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/structs.go
  19. BIN ConfusedPolarBear.Plugin.IntroSkipper.Tests/video/credits.mp4
  20. BIN ConfusedPolarBear.Plugin.IntroSkipper.Tests/video/rainbow.mp4
  21. +131 −0 ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/BlackFrameAnalyzer.cs
  22. +159 −0 ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs
  23. +68 −312 ...ar.Plugin.IntroSkipper/{ScheduledTasks/AnalyzeEpisodesTask.cs → Analyzers/ChromaprintAnalyzer.cs}
  24. +22 −0 ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/IMediaFileAnalyzer.cs
  25. +6 −3 ConfusedPolarBear.Plugin.IntroSkipper/AutoSkip.cs
  26. +49 −0 ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs
  27. +35 −0 ConfusedPolarBear.Plugin.IntroSkipper/Configuration/UserInterfaceConfiguration.cs
  28. +95 −20 ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
  29. +266 −0 ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js
  30. +3 −2 ConfusedPolarBear.Plugin.IntroSkipper/ConfusedPolarBear.Plugin.IntroSkipper.csproj
  31. +91 −18 ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs
  32. +24 −4 ConfusedPolarBear.Plugin.IntroSkipper/Controllers/TroubleshootingController.cs
  33. +4 −6 ConfusedPolarBear.Plugin.IntroSkipper/Controllers/VisualizationController.cs
  34. +17 −0 ConfusedPolarBear.Plugin.IntroSkipper/Data/AnalysisMode.cs
  35. +28 −0 ConfusedPolarBear.Plugin.IntroSkipper/Data/BlackFrame.cs
  36. +64 −0 ConfusedPolarBear.Plugin.IntroSkipper/Data/PluginWarning.cs
  37. +12 −2 ConfusedPolarBear.Plugin.IntroSkipper/Data/QueuedEpisode.cs
  38. +2 −45 ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs
  39. +246 −115 ConfusedPolarBear.Plugin.IntroSkipper/FFmpegWrapper.cs
  40. +203 −22 ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs
  41. +80 −20 ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs
  42. +198 −0 ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs
  43. +86 −0 ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/DetectCreditsTask.cs
  44. +92 −0 ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/DetectIntroductionsTask.cs
  45. +19 −0 README.md
  46. +2 −1 docker/Dockerfile
  47. +11 −1 docs/web_interface.md
  48. +8 −0 manifest.json
22 changes: 0 additions & 22 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "Bug report"
description: "Create a report to help us improve"
labels: [bug]
body:
- type: textarea
attributes:
label: Describe the bug
description: Also tell us, what did you expect to happen?
placeholder: |
The more information that you are able to provide, the better. Did you do anything before this happened? Did you upgrade or change anything? Any screenshots or logs you can provide will be helpful.
This is my issue.
Steps to Reproduce
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true

- type: input
attributes:
label: Operating system
placeholder: Debian 11, Windows 11, etc.
validations:
required: true

- type: input
attributes:
label: Jellyfin installation method
placeholder: Docker, Windows installer, etc.
validations:
required: true

- type: input
attributes:
label: Container image and tag
description: Only fill in this field if you are running Jellyfin in a container
placeholder: jellyfin/jellyfin:10.8.7, jellyfin-intro-skipper:latest, etc.

- type: textarea
attributes:
label: Support Bundle
placeholder: go to Dashboard -> Plugins -> Intro Skipper -> Support Bundle (at the bottom of the page) and paste the contents of the textbox here
validations:
required: true

- type: textarea
attributes:
label: Jellyfin logs
placeholder: Paste any relevant logs here
render: shell

1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature] "
labels: enhancement
assignees: ''

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Build Plugin'

on:
push:
branches: [ "master" ]
branches: [ "master", "analyzers" ]
pull_request:
branches: [ "master" ]

Expand All @@ -29,7 +29,7 @@ jobs:
run: dotnet build --no-restore

- name: Upload artifact
uses: actions/upload-artifact@v3.1.0
uses: actions/upload-artifact@v3.1.2
with:
name: intro-skipper-${{ github.sha }}.dll
path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
Expand Down
147 changes: 91 additions & 56 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,77 +7,112 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/jellyfin-intro-skipper

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

strategy:
matrix:
node-version: [14.x]
node-version: [18.x]
jellyfin-container-version: [10.8.10]
jellyfin-web-version: [10.8.10]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Login to GHCR
uses: docker/login-action@v2.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: Configure npm cache
uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Checkout modified web interface
uses: actions/checkout@v3
with:
repository: ConfusedPolarBear/jellyfin-web
ref: intros
path: web

- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: Store commit of web interface
id: web-commit
run: |
cd web
echo "commit=$(git log -1 --format='%H' | cut -c -10)" >> $GITHUB_OUTPUT
- name: Build and copy web interface
run: |
cd web
npm install
cp -r dist ../docker/
tar czf dist.tar.gz dist
- name: Upload web interface
uses: actions/upload-artifact@v3.1.2
with:
name: jellyfin-web-${{ matrix.jellyfin-web-version }}+${{ steps.web-commit.outputs.commit }}.tar.gz
path: web/dist.tar.gz
if-no-files-found: error

- name: Configure npm cache
uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Checkout modified web interface
uses: actions/checkout@v3
with:
repository: ConfusedPolarBear/jellyfin-web
ref: intros
path: web
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

- name: Store commit of web interface
id: web-commit
run: |
cd web
echo "commit=$(git log -1 --format='%H' | cut -c -10)" >> $GITHUB_OUTPUT
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into ghcr.io registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and copy web interface
run: |
cd web
npm install
cp -r dist ../docker/
tar czf dist.tar.gz dist
- name: Upload web interface
uses: actions/upload-artifact@v3.1.0
with:
name: jellyfin-web-10.8.0+${{ steps.web-commit.outputs.commit }}.tar.gz
path: web/dist.tar.gz
if-no-files-found: error

- name: Publish container
uses: docker/build-push-action@v3.1.1
with:
file: docker/Dockerfile
context: docker/
push: true
tags: ${{ env.REGISTRY}}/confusedpolarbear/jellyfin-intro-skipper:${{ steps.web-commit.outputs.commit }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type-raw,value=${{ steps.web-commit.outputs.commit }}
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}},value=${{ matrix.jellyfin-container-version }}
# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Publish container image
id: build-and-push
uses: docker/build-push-action@v4.0.0
with:
file: docker/Dockerfile
context: docker
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
JELLYFIN_TAG=${{ matrix.jellyfin-container-version }}
platforms: |
linux/amd64
linux/arm/v7
linux/arm64/v8
push: ${{ github.event_name != 'pull_request' }}
pull: true
no-cache: true
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
6 changes: 2 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ on:

jobs:
build:

# 18.04 = bionic LTS, supported until April 2023
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
# set fetch-depth to 0 in order to clone all tags instead of just the current commit
Expand All @@ -34,7 +32,7 @@ jobs:
run: .github/workflows/package.sh ${{ steps.tag.outputs.tag }}

- name: Upload plugin archive
uses: actions/upload-artifact@v3.1.0
uses: actions/upload-artifact@v3.1.2
with:
name: intro-skipper-bundle-${{ steps.tag.outputs.tag }}.zip
path: |
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/test.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Intro Skipper is made possible by the following open source projects:

* [acoustid-match](https://github.com/dnknth/acoustid-match) (MIT)
* [chromaprint](https://github.com/acoustid/chromaprint) (LGPL 2.1)
* [JellyScrub](https://github.com/nicknsy/jellyscrub) (MIT)
* [Jellyfin](https://github.com/jellyfin/jellyfin) (GPL)
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## v0.1.8.0 (no eta)
* New features
* Support adding skip intro button to web interface without using a fork
* Add localization support for the skip intro button and the automatic skip notification message
* Detect ending credits in television episodes
* Add support for using chapter names to locate introductions and ending credits
* Add support for using black frames to locate ending credits
* Show skip button when on screen controls are visible (#149 by @DualScorch)
* Internal changes
* Move Chromaprint analysis code out of the episode analysis task
* Add support for multiple analysis techinques

## v0.1.7.0 (2022-10-26)
* New features
* Rewrote fingerprint comparison algorithm to be faster (~30x speedup) and detect more introductions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ConfusedPolarBear.Plugin.IntroSkipper\ConfusedPolarBear.Plugin.IntroSkipper.csproj" />
</ItemGroup>

</Project>
</ItemGroup>

</Project>
Loading