diff --git a/.github/workflows/BuildDockerPush.yml b/.github/workflows/BuildDockerPush.yml
index 56784bff..345b5b91 100644
--- a/.github/workflows/BuildDockerPush.yml
+++ b/.github/workflows/BuildDockerPush.yml
@@ -172,7 +172,7 @@ jobs:
BUILD_INFORMATION_VERSION=${{ needs.version.outputs.AssemblyInformationalVersion }}
BUILD_PACKAGE_VERSION=${{ needs.version.outputs.SemVer2 }}
- # Get tool versions in image
+ # Get tool versions from image
toolversions:
name: Tool versions
runs-on: ubuntu-latest
@@ -200,7 +200,7 @@ jobs:
uses: actions/checkout@v3
# https://github.com/marketplace/actions/docker-run-action
- - name: Write image tool versions to file
+ - name: Write tool versions to file
uses: addnab/docker-run-action@v3
with:
image: docker.io/ptr727/plexcleaner:${{ matrix.tag }}
@@ -225,7 +225,7 @@ jobs:
# Update Docker README.md
updatereadme:
- name: Create README.md
+ name: Create Docker README.md
runs-on: ubuntu-latest
needs: toolversions
if: ${{ github.event_name != 'pull_request' }}
@@ -244,40 +244,17 @@ jobs:
path: ${{ runner.temp }}/versions
- name: Create README.md from README.m4
- run: m4 --include=${{ runner.temp }}/versions ./Docker/README.m4 > ./Docker/README.md
+ run: m4 --include=${{ runner.temp }}/versions ./Docker/README.m4 > ${{ runner.temp }}/README.md
- # https://github.com/marketplace/actions/git-auto-commit
- - name: Commit generated README.md
- uses: stefanzweifel/git-auto-commit-action@v4
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # https://github.com/marketplace/actions/docker-hub-description
+ - name: Update Docker Hub README.md
+ uses: peter-evans/dockerhub-description@v3
with:
- file_pattern: ./Docker/README.md
- commit_message: Update generated README.md
-
- # Update Docker Hub description
- hubdescription:
- name: Update README.md
- runs-on: ubuntu-latest
- needs: updatereadme
- if: ${{ github.event_name != 'pull_request' }}
-
- steps:
-
- # Checkout code
- # https://github.com/marketplace/actions/checkout
- - name: Checkout
- uses: actions/checkout@v3
-
- # https://github.com/marketplace/actions/docker-hub-description
- - name: Update Docker Hub README.md
- uses: peter-evans/dockerhub-description@v3
- with:
- username: ${{ secrets.DOCKER_HUB_USERNAME }}
- password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- repository: ptr727/plexcleaner
- short-description: ${{ github.event.repository.description }}
- readme-filepath: ./Docker/README.md
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
+ password: ${{ secrets.DOCKER_HUB_PASSWORD }}
+ repository: ptr727/plexcleaner
+ short-description: ${{ github.event.repository.description }}
+ readme-filepath: ${{ runner.temp }}/README.md
# Create a custom badge to report the build date
datebadge:
diff --git a/.github/workflows/BuildGitHubRelease.yml b/.github/workflows/BuildGitHubRelease.yml
index 2cdb08a0..33b2d4c1 100644
--- a/.github/workflows/BuildGitHubRelease.yml
+++ b/.github/workflows/BuildGitHubRelease.yml
@@ -143,10 +143,12 @@ jobs:
# Create GitHub release
# https://github.com/marketplace/actions/automatic-releases
+ # Alternative: https://github.com/marketplace/actions/gh-release
- name: Create GitHub release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
+ # Create a tag with the version number
automatic_release_tag: ${{ needs.version.outputs.SemVer2 }}
# Only main branch is not a pre-release
prerelease: ${{ !endsWith(github.ref, 'refs/heads/main') }}
diff --git a/.gitignore b/.gitignore
index 2541527b..fc2f2ed6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -501,3 +501,5 @@ fabric.properties
*.vsix
auth.conf
+
+.idea
diff --git a/.idea/.idea.PlexCleaner/.idea/.gitignore b/.idea/.idea.PlexCleaner/.idea/.gitignore
deleted file mode 100644
index 1b54792d..00000000
--- a/.idea/.idea.PlexCleaner/.idea/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Rider ignored files
-/contentModel.xml
-/modules.xml
-/.idea.PlexCleaner.iml
-/projectSettingsUpdater.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/.idea.PlexCleaner/.idea/encodings.xml b/.idea/.idea.PlexCleaner/.idea/encodings.xml
deleted file mode 100644
index df87cf95..00000000
--- a/.idea/.idea.PlexCleaner/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.PlexCleaner/.idea/indexLayout.xml b/.idea/.idea.PlexCleaner/.idea/indexLayout.xml
deleted file mode 100644
index 7b08163c..00000000
--- a/.idea/.idea.PlexCleaner/.idea/indexLayout.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.PlexCleaner/.idea/vcs.xml b/.idea/.idea.PlexCleaner/.idea/vcs.xml
deleted file mode 100644
index 94a25f7f..00000000
--- a/.idea/.idea.PlexCleaner/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 0837420d..6b36a1d2 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/PlexCleaner/bin/Debug/net6.0/PlexCleaner.dll",
+ "program": "${workspaceFolder}/PlexCleaner/bin/Debug/net7.0/PlexCleaner.dll",
"args": [],
"cwd": "${workspaceFolder}/PlexCleaner",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 774c4034..35ec018c 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -61,7 +61,7 @@
"Vorbis"
],
"yaml.schemas": {
- "https://json.schemastore.org/github-issue-config.json": "file:///c%3A/Users/piete/source/repos/ptr727/PlexCleaner/.github/ISSUE_TEMPLATE/config.yml"
+ "https://json.schemastore.org/github-issue-config.json": "file:/.github/ISSUE_TEMPLATE/config.yml"
},
"dotnet.defaultSolution": "PlexCleaner.sln"
}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 3d0a6464..812e7a31 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -36,6 +36,16 @@
"${workspaceFolder}/PlexCleaner/PlexCleaner.csproj"
],
"problemMatcher": "$msCompile"
+ },
+ {
+ "label": "format",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "format",
+ "--verbosity",
+ "diagnostic"
+ ]
}
]
}
\ No newline at end of file
diff --git a/PlexCleanerTests/LanguageTests.cs b/PlexCleanerTests/LanguageTests.cs
index 30e05e2f..163457bc 100644
--- a/PlexCleanerTests/LanguageTests.cs
+++ b/PlexCleanerTests/LanguageTests.cs
@@ -1,5 +1,5 @@
-using Xunit;
-using PlexCleaner;
+using PlexCleaner;
+using Xunit;
namespace PlexCleanerTests;
diff --git a/PlexCleanerTests/VersionParsingTests.cs b/PlexCleanerTests/VersionParsingTests.cs
index 4b2c923e..a83b7e59 100644
--- a/PlexCleanerTests/VersionParsingTests.cs
+++ b/PlexCleanerTests/VersionParsingTests.cs
@@ -1,5 +1,5 @@
-using Xunit;
-using PlexCleaner;
+using PlexCleaner;
+using Xunit;
namespace PlexCleanerTests;
diff --git a/README.md b/README.md
index 5baab69a..b5082893 100644
--- a/README.md
+++ b/README.md
@@ -4,28 +4,28 @@ Utility to optimize media files for Direct Play in Plex, Emby, Jellyfin.
## License
-Licensed under the [MIT License](./LICENSE)
-![GitHub License](https://img.shields.io/github/license/ptr727/PlexCleaner)
+Licensed under the [MIT License][license-link]
+![GitHub License][license-shield]
## Build
-Code and Pipeline is on [GitHub](https://github.com/ptr727/PlexCleaner).
-Binary releases are published on [GitHub Releases](https://github.com/ptr727/PlexCleaner/releases).
-Docker images are published on [Docker Hub](https://hub.docker.com/r/ptr727/plexcleaner).
+Code and Pipeline is on [GitHub][github-link].
+Binary releases are published on [GitHub Releases][releases-link].
+Docker images are published on [Docker Hub][docker-link].
## Status
-[![Release Status](https://img.shields.io/github/actions/workflow/status/ptr727/PlexCleaner/BuildGitHubRelease.yml?logo=github&label=Releases%20Build)](https://github.com/ptr727/PlexCleaner/actions)
-[![Docker Status](https://img.shields.io/github/actions/workflow/status/ptr727/PlexCleaner/BuildDockerPush.yml?logo=github&label=Docker%20Build)](https://github.com/ptr727/PlexCleaner/actions)
-[![Last Commit](https://img.shields.io/github/last-commit/ptr727/PlexCleaner?logo=github&label=Last%20Commit)](https://github.com/ptr727/PlexCleaner/commits/main)
-[![Last Build](https://byob.yarr.is/ptr727/PlexCleaner/lastbuild)](https://github.com/ptr727/PlexCleaner/actions)
+[![Release Status][release-status-shield]][actions-link]
+[![Docker Status][docker-status-shield]][actions-link]
+[![Last Commit][last-commit-shield]][commit-link]
+[![Last Build][last-build-shield]][actions-link]
## Releases
-[![GitHub Release)](https://img.shields.io/github/v/release/ptr727/PlexCleaner?logo=github&label=GitHub%20Release)](https://github.com/ptr727/PlexCleaner/releases)
-[![GitHub Pre-Release)](https://img.shields.io/github/v/release/ptr727/PlexCleaner?include_prereleases&label=GitHub%20Pre-Release&logo=github)](https://github.com/ptr727/PlexCleaner/releases)
-[![Docker Latest](https://img.shields.io/docker/v/ptr727/plexcleaner/latest?label=Docker%20Latest&logo=docker)](https://hub.docker.com/r/ptr727/plexcleaner)
-[![Docker Develop](https://img.shields.io/docker/v/ptr727/plexcleaner/develop?label=Docker%20Develop&logo=docker&color=orange)](https://hub.docker.com/r/ptr727/plexcleaner)
+[![GitHub Release][release-version-shield]][releases-link]
+[![GitHub Pre-Release][pre-release-version-shield]][releases-link]
+[![Docker Latest][docker-latest-version-shield]][docker-link]
+[![Docker Develop][docker-develop-version-shield]][docker-link]
## Release Notes
@@ -35,8 +35,8 @@ Docker images are published on [Docker Hub](https://hub.docker.com/r/ptr727/plex
- Added `--preprocess` option to the `monitor` command, that will pre-process all monitored folders.
- Version 3.0:
- Docker builds expanded to include support for `linux/amd64`, `linux/arm64`, and `linux/arm/v7`, on Ubuntu, Debian, Alpine, and Arch.
- - See the Docker [README](./Docker/README.md) for image and tag usage details.
- - The Ubuntu x64 build now utilizes [Rob Savoury's private PPA](https://launchpad.net/~savoury1) for up to date FFmpeg and HandBrake builds.
+ - See the Docker [README][docker-link] for image and tag usage details.
+ - The Ubuntu x64 build now utilizes [Rob Savoury's private PPA][savoury-link] for up to date FFmpeg and HandBrake builds.
- Switched from .NET 6 to .NET 7.
- Utilizing some new capabilities, e.g. `GeneratedRegex` and `LibraryImport`.
- Added additional architectures to the published releases, including `win-x64`, `linux-x64`, `linux-musl-x64`, `linux-arm`, `linux-arm64`, and `osx-x64`.
@@ -101,9 +101,9 @@ Docker images are published on [Docker Hub](https://hub.docker.com/r/ptr727/plex
## Questions or Issues
-- Use the [Discussions](https://github.com/ptr727/PlexCleaner/discussions) forum for general questions.
-- Refer to the [Issues](https://github.com/ptr727/PlexCleaner/issues) tracker for known problems.
-- Report bugs in the [Issues](https://github.com/ptr727/PlexCleaner/issues) tracker.
+- Use the [Discussions][discussions-link] forum for general questions.
+- Refer to the [Issues][issues-link] tracker for known problems.
+- Report bugs in the [Issues][issues-link] tracker.
## Use Cases
@@ -145,7 +145,7 @@ Alternatively, install directly on [Windows](#windows) or [Linux](#linux) follow
### Docker
- Builds are published on [Docker Hub](https://hub.docker.com/r/ptr727/plexcleaner).
-- See the Docker [README](./Docker/README.md) for image and tag details.
+- See the Docker [README][docker-link] for image and tag details.
- Images are updated weekly with the latest upstream updates.
- The container has all the prerequisite 3rd party tools pre-installed.
- Map your host volumes, and make sure the user has permission to access and modify media files.
@@ -257,7 +257,7 @@ The `ConvertOptions:FfMpegOptions` and `ConvertOptions:HandBrakeOptions` setting
Note that hardware assisted encoding options are operating system, hardware, and tool version specific.
Refer to the Jellyfin hardware acceleration [docs](https://jellyfin.org/docs/general/administration/hardware-acceleration/) for hints on usage.
-The example configurations are from documentation and minimal testing with Intel QuickSync on Windows only, please discuss and post working configurations in [Discussions](https://github.com/ptr727/PlexCleaner/discussions).
+The example configurations are from documentation and minimal testing with Intel QuickSync on Windows only, please discuss and post working configurations in [Discussions][discussions-link].
### FFmpeg Options
@@ -542,7 +542,7 @@ These commands have no conditional logic and will process all specified media fi
- [Git Auto Commit](https://github.com/marketplace/actions/git-auto-commit)
- [Docker Run Action](https://github.com/marketplace/actions/docker-run-action)
- [Microsoft .NET Linux Docker Images](https://hub.docker.com/_/microsoft-dotnet)
-- [Rob Savoury's PPA](https://launchpad.net/~savoury1)
+- [Rob Savoury's PPA][savoury-link]
- [Arch Linux](https://archlinux.org/)
## Sample Media Files
@@ -552,3 +552,24 @@ These commands have no conditional logic and will process all specified media fi
- [DemoWorld](https://www.demo-world.eu/2d-demo-trailers-hd/)
- [MPlayer](https://samples.mplayerhq.hu/)
- [Matroska](https://github.com/ietf-wg-cellar/matroska-test-files)
+
+***
+
+[release-status-shield]: https://img.shields.io/github/actions/workflow/status/ptr727/PlexCleaner/BuildGitHubRelease.yml?logo=github&label=Releases%20Build
+[docker-status-shield]: https://img.shields.io/github/actions/workflow/status/ptr727/PlexCleaner/BuildDockerPush.yml?logo=github&label=Docker%20Build
+[last-commit-shield]: https://img.shields.io/github/last-commit/ptr727/PlexCleaner?logo=github&label=Last%20Commit
+[last-build-shield]: https://byob.yarr.is/ptr727/PlexCleaner/lastbuild
+[license-shield]: https://img.shields.io/github/license/ptr727/PlexCleaner?label=License
+[release-version-shield]: https://img.shields.io/github/v/release/ptr727/PlexCleaner?logo=github&label=GitHub%20Release
+[pre-release-version-shield]: https://img.shields.io/github/v/release/ptr727/PlexCleaner?include_prereleases&label=GitHub%20Pre-Release&logo=github
+[docker-develop-version-shield]: https://img.shields.io/docker/v/ptr727/plexcleaner/develop?label=Docker%20Develop&logo=docker&color=orange
+[docker-latest-version-shield]: https://img.shields.io/docker/v/ptr727/plexcleaner/latest?label=Docker%20Latest&logo=docker
+[actions-link]: https://github.com/ptr727/PlexCleaner/actions
+[docker-link]: https://hub.docker.com/r/ptr727/plexcleaner
+[commit-link]: https://github.com/ptr727/PlexCleaner/commits/main
+[releases-link]: https://github.com/ptr727/PlexCleaner/releases
+[license-link]: ./LICENSE
+[github-link]: https://github.com/ptr727/PlexCleaner
+[savoury-link]: https://launchpad.net/~savoury1
+[discussions-link]: https://github.com/ptr727/PlexCleaner/discussions
+[issues-link]: https://github.com/ptr727/PlexCleaner/issues