mirror of
https://github.com/jellyfin/jellyfin-plugin-bookshelf.git
synced 2024-11-23 05:39:51 +00:00
Merge remote-tracking branch 'upstream/master' into feature-comicbookinfo-metadata
This commit is contained in:
commit
52c0f4b9e9
24
.github/workflows/build-dotnet.yml
vendored
24
.github/workflows/build-dotnet.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Test Build Plugin
|
||||
name: Build Plugin
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -19,13 +19,19 @@ jobs:
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
dotnet-version: 6.0.x
|
||||
include-prerelease: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
- name: Build Jellyfin Plugin
|
||||
uses: oddstr13/jellyfin-plugin-repository-manager@v0.4.2
|
||||
id: jprm
|
||||
with:
|
||||
dotnet-target: net6.0
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release
|
||||
|
||||
- name: Test
|
||||
run: dotnet test --no-restore --verbosity normal
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: build-artifact
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
path: ${{ steps.jprm.outputs.artifact }}
|
||||
|
3
.github/workflows/codeql-analysis.yml
vendored
3
.github/workflows/codeql-analysis.yml
vendored
@ -29,7 +29,8 @@ jobs:
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
dotnet-version: 6.0.x
|
||||
include-prerelease: true
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
|
21
.github/workflows/command-dispatch.yaml
vendored
Normal file
21
.github/workflows/command-dispatch.yaml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Allows for the definition of PR and Issue /commands
|
||||
name: Slash Command Dispatcher
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
|
||||
jobs:
|
||||
launcher:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Command Dispatch
|
||||
uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.JF_BOT_TOKEN }}
|
||||
permission: write
|
||||
issue-type: pull-request
|
||||
commands: |-
|
||||
rebase
|
||||
update-prep
|
34
.github/workflows/command-rebase.yaml
vendored
Normal file
34
.github/workflows/command-rebase.yaml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: PR Rebase Command
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- rebase-command
|
||||
|
||||
jobs:
|
||||
rebase:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Rebase PR
|
||||
uses: peter-evans/rebase@v1
|
||||
id: rebase
|
||||
with:
|
||||
head: ${{ github.event.client_payload.pull_request.head.label }}
|
||||
|
||||
- name: Add Success Reaction
|
||||
if: ${{ steps.rebase.outputs.rebased-count == 1 }}
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.JF_BOT_TOKEN }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
reaction-type: hooray
|
||||
|
||||
- name: Add Failure Reaction
|
||||
if: ${{ steps.rebase.outputs.rebased-count == 0 || failure() }}
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.JF_BOT_TOKEN }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
reaction-type: confused, -1
|
73
.github/workflows/update-release-draft.yml
vendored
73
.github/workflows/update-release-draft.yml
vendored
@ -1,16 +1,83 @@
|
||||
# Automates creation of Release Drafts using Release Drafter
|
||||
name: Update Release Draft
|
||||
name: Update Release Draft & Create Release Bump PR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- build.yaml
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- update-prep-command
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'jellyfin/jellyfin-plugin-bookshelf'
|
||||
|
||||
steps:
|
||||
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||
- uses: release-drafter/release-drafter@v5.15.0
|
||||
- name: Update Draft
|
||||
uses: release-drafter/release-drafter@v5.15.0
|
||||
id: draft
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
||||
|
||||
- name: Setup YQ
|
||||
uses: chrisdickinson/setup-yq@latest
|
||||
with:
|
||||
yq-version: v4.12.2
|
||||
|
||||
- name: Set-up Environment
|
||||
run: |
|
||||
TAG="${{ steps.draft.outputs.tag_name }}"
|
||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||
|
||||
cat << EOF | grep -P '^([*-] |###)' > cl.md
|
||||
${{ steps.draft.outputs.body }}
|
||||
EOF
|
||||
|
||||
sed -i -r 's/^(#+) (:.*:)? *(.*)$/\n\1 \3 \1/' cl.md
|
||||
sed -i -r 's/^\*/-/' cl.md
|
||||
|
||||
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
|
||||
cat cl.md >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
|
||||
echo "HAS_CHANGES=$(grep -qie 'No changes$' cl.md && echo false || echo true)" >> $GITHUB_ENV
|
||||
rm cl.md
|
||||
|
||||
echo "ABI_VERSION=$(curl -s https://api.jellyfin.org/openapi/jellyfin-openapi-stable.json | jq -r '.info.version').0" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout Repository
|
||||
if: ${{ env.HAS_CHANGES == 'true' }}
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Update build.yaml
|
||||
if: ${{ env.HAS_CHANGES == 'true' }}
|
||||
run: |
|
||||
yq eval '.version = env(VERSION) | .targetAbi = env(ABI_VERSION) | .changelog = strenv(CHANGELOG) | .changelog style="literal"' -i build.yaml
|
||||
|
||||
- name: Commit Changes
|
||||
if: ${{ env.HAS_CHANGES == 'true' }}
|
||||
run: |
|
||||
git config user.name "jellyfin-bot"
|
||||
git config user.email "team@jellyfin.org"
|
||||
git checkout -b prepare-${{ env.VERSION }}
|
||||
git commit -am "Bump version to ${{ env.VERSION }}"
|
||||
git push -f origin prepare-${{ env.VERSION }}
|
||||
|
||||
- name: Create or Update PR
|
||||
if: ${{ env.HAS_CHANGES == 'true' }}
|
||||
uses: k3rnels-actions/pr-update@v1
|
||||
with:
|
||||
token: ${{ secrets.JF_BOT_TOKEN }}
|
||||
pr_title: Prepare for release ${{ steps.draft.outputs.tag_name }}
|
||||
pr_source: prepare-${{ env.VERSION }}
|
||||
pr_labels: 'release-prep,skip-changelog'
|
||||
pr_body: |
|
||||
:robot: This is a generated PR to update version and changelog in `build.yaml`.
|
||||
---
|
||||
${{ env.CHANGELOG }}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>Jellyfin.Plugin.Bookshelf</RootNamespace>
|
||||
<AssemblyVersion>5.0.0.0</AssemblyVersion>
|
||||
<FileVersion>5.0.0.0</FileVersion>
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Jellyfin.Controller" Version="10.*-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.*-*" />
|
||||
<PackageReference Include="sharpcompress" Version="0.30.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -10,7 +10,7 @@ using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Providers;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Text.Json;
|
||||
using MediaBrowser.Common.Json;
|
||||
using Jellyfin.Extensions.Json;
|
||||
|
||||
namespace Jellyfin.Plugin.Bookshelf.Providers.GoogleBooks
|
||||
{
|
||||
@ -76,7 +76,7 @@ namespace Jellyfin.Plugin.Bookshelf.Providers.GoogleBooks
|
||||
using (var response = await httpClient.GetAsync(url).ConfigureAwait(false))
|
||||
{
|
||||
await using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
|
||||
return await JsonSerializer.DeserializeAsync<BookResult>(stream, JsonDefaults.GetOptions()).ConfigureAwait(false);
|
||||
return await JsonSerializer.DeserializeAsync<BookResult>(stream, JsonDefaults.Options).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Json;
|
||||
using Jellyfin.Extensions.Json;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
@ -108,7 +108,7 @@ namespace Jellyfin.Plugin.Bookshelf.Providers.GoogleBooks
|
||||
using (var response = await httpClient.GetAsync(url).ConfigureAwait(false))
|
||||
{
|
||||
await using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
|
||||
return await JsonSerializer.DeserializeAsync<SearchResult>(stream, JsonDefaults.GetOptions()).ConfigureAwait(false);
|
||||
return await JsonSerializer.DeserializeAsync<SearchResult>(stream, JsonDefaults.Options).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -153,7 +153,7 @@ namespace Jellyfin.Plugin.Bookshelf.Providers.GoogleBooks
|
||||
using (var response = await httpClient.GetAsync(url).ConfigureAwait(false))
|
||||
{
|
||||
await using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
|
||||
return await JsonSerializer.DeserializeAsync<BookResult>(stream, JsonDefaults.GetOptions()).ConfigureAwait(false);
|
||||
return await JsonSerializer.DeserializeAsync<BookResult>(stream, JsonDefaults.Options).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
22
build.yaml
22
build.yaml
@ -1,22 +1,16 @@
|
||||
---
|
||||
name: "Bookshelf"
|
||||
guid: "9c4e63f1-031b-4f25-988b-4f7d78a8b53e"
|
||||
version: "6"
|
||||
targetAbi: "10.7.7.0"
|
||||
framework: "net5.0"
|
||||
version: "7"
|
||||
targetAbi: "10.8.0.0"
|
||||
framework: "net6.0"
|
||||
owner: "jellyfin"
|
||||
overview: "Manage your books"
|
||||
description: >
|
||||
Supports several different metadata providers and options for
|
||||
organizing your collection.
|
||||
Supports several different metadata providers and options for organizing your collection.
|
||||
|
||||
category: "Metadata"
|
||||
artifacts:
|
||||
- "Jellyfin.Plugin.Bookshelf.dll"
|
||||
changelog: >
|
||||
### New features and improvements ###
|
||||
- Expand ComicInfo support and add support for comic covers (#34) @MinecraftPlaye
|
||||
- Use System.Text.Json (#29) @daullmer
|
||||
### Dependency updates ###
|
||||
- chore(deps): bump release-drafter/release-drafter from v5.14.0 to v5.15.0 (#32) @dependabot
|
||||
### CI & build changes ###
|
||||
- chore(ci): builds, releas drafter and more (#31) @h1dden-da3m0n
|
||||
- "Jellyfin.Plugin.Bookshelf.dll"
|
||||
changelog: |-
|
||||
- 10.8 support (#33) @crobibero
|
||||
|
Loading…
Reference in New Issue
Block a user