Merge pull request #68 from RepoDevil/upstream
Stability and error checking
This commit is contained in:
commit
86da869f8c
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -47,7 +47,8 @@ jobs:
|
|||||||
uses: vimtor/action-zip@v1.2
|
uses: vimtor/action-zip@v1.2
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
with:
|
with:
|
||||||
files: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
files: |
|
||||||
|
ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
||||||
dest: intro-skipper-${{ env.GIT_HASH }}.zip
|
dest: intro-skipper-${{ env.GIT_HASH }}.zip
|
||||||
|
|
||||||
- name: Publish prerelease
|
- name: Publish prerelease
|
||||||
|
@ -45,12 +45,13 @@ introSkipper.viewShow = function () {
|
|||||||
introSkipper.d("Ignoring location change");
|
introSkipper.d("Ignoring location change");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
introSkipper.d("Adding button CSS and element");
|
|
||||||
introSkipper.injectCss();
|
introSkipper.injectCss();
|
||||||
introSkipper.injectButton();
|
introSkipper.injectButton();
|
||||||
introSkipper.d("Hooking video timeupdate");
|
|
||||||
introSkipper.videoPlayer = document.querySelector("video");
|
introSkipper.videoPlayer = document.querySelector("video");
|
||||||
|
if (introSkipper.videoPlayer != null) {
|
||||||
|
introSkipper.d("Hooking video timeupdate");
|
||||||
introSkipper.videoPlayer.addEventListener("timeupdate", introSkipper.videoPositionChanged);
|
introSkipper.videoPlayer.addEventListener("timeupdate", introSkipper.videoPositionChanged);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Injects the CSS used by the skip intro button.
|
* Injects the CSS used by the skip intro button.
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<RootNamespace>ConfusedPolarBear.Plugin.IntroSkipper</RootNamespace>
|
<RootNamespace>ConfusedPolarBear.Plugin.IntroSkipper</RootNamespace>
|
||||||
<AssemblyVersion>0.1.16.1</AssemblyVersion>
|
<AssemblyVersion>0.1.16.2</AssemblyVersion>
|
||||||
<FileVersion>0.1.16.1</FileVersion>
|
<FileVersion>0.1.16.2</FileVersion>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
@ -109,6 +109,8 @@ public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
|
|||||||
_logger.LogError("Unknown error encountered while adding skip button: {Error}", ex);
|
_logger.LogError("Unknown error encountered while adding skip button: {Error}", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FFmpegWrapper.CheckFFmpegVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -53,8 +53,9 @@ public class BaseItemAnalyzerTask
|
|||||||
IProgress<double> progress,
|
IProgress<double> progress,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
var ffmpegError = FFmpegWrapper.CheckFFmpegVersion();
|
||||||
// Assert that ffmpeg with chromaprint is installed
|
// Assert that ffmpeg with chromaprint is installed
|
||||||
if (Plugin.Instance!.Configuration.UseChromaprint && !FFmpegWrapper.CheckFFmpegVersion())
|
if (Plugin.Instance!.Configuration.UseChromaprint && !ffmpegError)
|
||||||
{
|
{
|
||||||
throw new FingerprintException(
|
throw new FingerprintException(
|
||||||
"Analysis terminated! Chromaprint is not enabled in the current ffmpeg. If Jellyfin is running natively, install jellyfin-ffmpeg5. If Jellyfin is running in a container, upgrade to version 10.8.0 or newer.");
|
"Analysis terminated! Chromaprint is not enabled in the current ffmpeg. If Jellyfin is running natively, install jellyfin-ffmpeg5. If Jellyfin is running in a container, upgrade to version 10.8.0 or newer.");
|
||||||
|
27
install/install-dll.bat
Normal file
27
install/install-dll.bat
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
if exist %UserProfile%\AppData\Local\jellyfin\plugins\ (
|
||||||
|
FOR /F "eol=| delims=" %%I IN ('DIR "%UserProfile%\AppData\Local\jellyfin\plugins\Intro Skipper*" /B /O-D /TW 2^>nul') DO (
|
||||||
|
SET "NewestFile=%UserProfile%\AppData\Local\jellyfin\plugins\%%I"
|
||||||
|
GOTO FoundFile
|
||||||
|
)
|
||||||
|
ECHO Intro Skipper plugin not found!
|
||||||
|
GOTO UserInput
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist %ProgramData%\Jellyfin\Server\plugins\ (
|
||||||
|
FOR /F "eol=| delims=" %%I IN ('DIR "%ProgramData%\Jellyfin\Server\plugins\Intro Skipper*" /B /O-D /TW 2^>nul') DO (
|
||||||
|
SET "NewestFile=%ProgramData%\Jellyfin\Server\plugins\%%I"
|
||||||
|
GOTO FoundFile
|
||||||
|
)
|
||||||
|
ECHO Intro Skipper plugin not found!
|
||||||
|
GOTO UserInput
|
||||||
|
)
|
||||||
|
|
||||||
|
ECHO Jellyfin plugin directory not found!
|
||||||
|
GOTO UserInput
|
||||||
|
|
||||||
|
:FoundFile
|
||||||
|
echo "%NewestFile%"
|
||||||
|
xcopy /y ConfusedPolarBear.Plugin.IntroSkipper.dll "%NewestFile%"
|
||||||
|
|
||||||
|
:UserInput
|
||||||
|
@pause
|
27
install/install-dll.sh
Normal file
27
install/install-dll.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
|
# MacOS
|
||||||
|
if [ -d ~/.local/share/jellyfin/plugins/ ]; then
|
||||||
|
plugin=$(ls -d ~/.local/share/jellyfin/plugins/Intro\ Skipper* | sort -r | head -n 1 )
|
||||||
|
if [ -z "$plugin" ]; then
|
||||||
|
echo "Intro Skipper plugin not found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
cp -f ConfusedPolarBear.Plugin.IntroSkipper*.dll \
|
||||||
|
"$plugin/ConfusedPolarBear.Plugin.IntroSkipper.dll"
|
||||||
|
else
|
||||||
|
echo "Jellyfin plugin directory not found!"
|
||||||
|
fi
|
||||||
|
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
||||||
|
# Linux
|
||||||
|
if [ -d /var/lib/jellyfin/plugins/ ]; then
|
||||||
|
plugin=$(ls -d /var/lib/jellyfin/plugins/Intro\ Skipper* | sort -r | head -n 1 )
|
||||||
|
if [ -z "$plugin' ]; then
|
||||||
|
echo "Intro Skipper plugin not found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
cp -f ConfusedPolarBear.Plugin.IntroSkipper*.dll \
|
||||||
|
"$plugin/ConfusedPolarBear.Plugin.IntroSkipper.dll"
|
||||||
|
else
|
||||||
|
echo "Jellyfin plugin directory not found!"
|
||||||
|
fi
|
||||||
|
fi
|
@ -8,6 +8,14 @@
|
|||||||
"category": "General",
|
"category": "General",
|
||||||
"imageUrl": "https://raw.githubusercontent.com/jumoog/intro-skipper/master/images/logo.png",
|
"imageUrl": "https://raw.githubusercontent.com/jumoog/intro-skipper/master/images/logo.png",
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"version": "0.1.16.2",
|
||||||
|
"changelog": "- See the full changelog at [GitHub](https://github.com/jumoog/intro-skipper/blob/master/CHANGELOG.md)\n",
|
||||||
|
"targetAbi": "10.8.4.0",
|
||||||
|
"sourceUrl": "https://github.com/jumoog/intro-skipper/releases/download/v0.1.16.2/intro-skipper-v0.1.16.2.zip",
|
||||||
|
"checksum": "714e084cb02d159da57216e2ceec3509",
|
||||||
|
"timestamp": "2024-03-07T21:20:34Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "0.1.16.1",
|
"version": "0.1.16.1",
|
||||||
"changelog": "- See the full changelog at [GitHub](https://github.com/jumoog/intro-skipper/blob/master/CHANGELOG.md)\n",
|
"changelog": "- See the full changelog at [GitHub](https://github.com/jumoog/intro-skipper/blob/master/CHANGELOG.md)\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user