From be8333a80c2650c75444281a9b720da438b2b6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Mon, 10 Jun 2024 14:28:00 +0000 Subject: [PATCH 1/5] Fix editorconfig lints --- .github/issue_template.md | 10 +++++----- .github/releasing.md | 2 +- .github/renovate.json | 2 +- jellyfin_kodi/objects/obj.py | 2 +- .../skins/default/1080i/script-jellyfin-context.xml | 8 +++++--- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/issue_template.md b/.github/issue_template.md index e406be66..5cc69fb3 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -18,11 +18,11 @@ **System (please complete the following information):** - - OS: [e.g. Android, Debian, Windows] - - Jellyfin Version: [e.g. 10.0.1] - - Kodi Version: [e.g. 18.3] - - Addon Version: [e.g. 0.2.1] - - Playback Mode: [e.g. Add-On or Native] +- OS: [e.g. Android, Debian, Windows] +- Jellyfin Version: [e.g. 10.0.1] +- Kodi Version: [e.g. 18.3] +- Addon Version: [e.g. 0.2.1] +- Playback Mode: [e.g. Add-On or Native] **Additional context** diff --git a/.github/releasing.md b/.github/releasing.md index 2ca99d34..3fcda8d1 100644 --- a/.github/releasing.md +++ b/.github/releasing.md @@ -1,7 +1,7 @@ # Releasing a new Version via GitHub Actions 0. (optional) label the PRs you want to include in this release (if you want to group them in the GH release based on topics). \ - Supported labels can be found in the Release Drafter [config-file](https://github.com/jellyfin/jellyfin-meta-plugins/blob/master/.github/release-drafter.yml) (currently inherited from `jellyfin/jellyfin-meta-plugins`) + Supported labels can be found in the Release Drafter [config-file](https://github.com/jellyfin/jellyfin-meta-plugins/blob/master/.github/release-drafter.yml) (currently inherited from `jellyfin/jellyfin-meta-plugins`) 1. ensure you have merged the PRs you want to include in the release and that the so far drafted GitHub release has captured them 2. Create a `release-prep` PR by manually triggering the 'Create Prepare-Release PR' Workflow from the Actions tab on GitHub 3. check the newly created `Prepare for release vx.y.z` PR if updated the `release.yaml` properly (update it manually if need be) diff --git a/.github/renovate.json b/.github/renovate.json index 354bba68..e6794123 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -23,4 +23,4 @@ "pip_requirements": { "fileMatch": ["requirements(-[a-z0-9]+)?\\.txt$"] } -} \ No newline at end of file +} diff --git a/jellyfin_kodi/objects/obj.py b/jellyfin_kodi/objects/obj.py index ace80e12..3c5854e9 100644 --- a/jellyfin_kodi/objects/obj.py +++ b/jellyfin_kodi/objects/obj.py @@ -44,7 +44,7 @@ class Objects(object): "?": split filters and key name from the query part, i.e. MediaSources/0?$Name "$": lead the key name with $. Only one key value can be requested per element. ":": indicates it's a list of elements [], i.e. MediaSources/0/MediaStreams:?$Name - MediaStreams is a list. + MediaStreams is a list. "/": indicates where to go directly """ self.mapped_item = {} diff --git a/resources/skins/default/1080i/script-jellyfin-context.xml b/resources/skins/default/1080i/script-jellyfin-context.xml index 36f94dba..9aa9516a 100644 --- a/resources/skins/default/1080i/script-jellyfin-context.xml +++ b/resources/skins/default/1080i/script-jellyfin-context.xml @@ -15,11 +15,13 @@ - + - + 50% @@ -98,4 +100,4 @@ - \ No newline at end of file + From 9d1c859a5f694687ef735650aa16a6633cedfa80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Mon, 10 Jun 2024 14:28:51 +0000 Subject: [PATCH 2/5] Enable editorconfig-checker pre-commit hook --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5a49c9d0..797c983e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,11 +9,11 @@ repos: - id: check-added-large-files - id: no-commit-to-branch - # - repo: https://github.com/editorconfig-checker/editorconfig-checker.python - # rev: "2.7.3" - # hooks: - # - id: editorconfig-checker - # exclude: '^LICENSE\.txt$' + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: "2.7.3" + hooks: + - id: editorconfig-checker + exclude: '^(LICENSE\.txt|resources/language/.*\.po)$' - repo: https://github.com/psf/black rev: "24.4.2" From 2753531bc5eeb5cb518456c4ab9e3f3d836b0f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Mon, 10 Jun 2024 14:35:20 +0000 Subject: [PATCH 3/5] Editorconfig: adjust XML and JSON indentation --- .editorconfig | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.editorconfig b/.editorconfig index 3e6104a9..0921ea84 100644 --- a/.editorconfig +++ b/.editorconfig @@ -23,19 +23,13 @@ indent_size = 2 # XML indentation [*.xml] indent_size = 2 - -[resources/settings.xml] indent_style = tab -[resources/skins/**.xml] +# JSON indentation +[*.json] +indent_size = 2 indent_style = tab -[jellyfin_kodi/objects/obj_map.json] -indent_style = tab - -[.devcontainer/Python 3.11/devcontainer.json] -indent_style = tab - [README.md] indent_size = 2 From 7c0e986bd283c764cc16f0c756a03a04e4073ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Mon, 10 Jun 2024 14:36:12 +0000 Subject: [PATCH 4/5] Change indentation of XML and JSON files --- .build/template.xml | 93 +++++++++++++++++++++++------------------ .github/renovate.json | 59 +++++++++++++++----------- .vscode/extensions.json | 8 ++-- .vscode/settings.json | 28 ++++++------- 4 files changed, 106 insertions(+), 82 deletions(-) diff --git a/.build/template.xml b/.build/template.xml index ee6bb514..92997cdf 100644 --- a/.build/template.xml +++ b/.build/template.xml @@ -1,42 +1,55 @@ - - - - - video audio image - - - - - - - - [!String.IsEmpty(ListItem.DBID) + !String.IsEqual(ListItem.DBID,-1) | !String.IsEmpty(ListItem.Property(jellyfinid))] + !String.IsEmpty(Window(10000).Property(jellyfin_context)) - - - - [[!String.IsEmpty(ListItem.DBID) + !String.IsEqual(ListItem.DBID,-1) | !String.IsEmpty(ListItem.Property(jellyfinid))] + [String.IsEqual(ListItem.DBTYPE,movie) | String.IsEqual(ListItem.DBTYPE,episode)]] + !String.IsEmpty(Window(10000).Property(jellyfin_context_transcode)) - - - - - all - en - GNU GENERAL PUBLIC LICENSE. Version 3, 29 June 2007 - https://forum.jellyfin.org - https://jellyfin.org/ - https://github.com/jellyfin/jellyfin-kodi - - Welcome to Jellyfin for Kodi! A whole new way to manage and view your media library. The Jellyfin addon for Kodi combines the best of Kodi - ultra smooth navigation, beautiful UIs and playback of any file under the sun, and Jellyfin - the most powerful fully open source multi-client media metadata indexer and server. Jellyfin for Kodi is the absolute best way to enjoy the incredible Kodi playback engine combined with the power of Jellyfin's centralized database. Features: * Direct integration with the Kodi library for native Kodi speed * Instant synchronization with the Jellyfin server * Full support for Movie, TV and Music collections * Jellyfin Server direct stream and transcoding support - use Kodi when you are away from home! - - - - resources/icon.png - resources/fanart.png - - + + + + + video audio image + + + + + + + + [!String.IsEmpty(ListItem.DBID) + !String.IsEqual(ListItem.DBID,-1) | + !String.IsEmpty(ListItem.Property(jellyfinid))] + + !String.IsEmpty(Window(10000).Property(jellyfin_context)) + + + + [[!String.IsEmpty(ListItem.DBID) + !String.IsEqual(ListItem.DBID,-1) | + !String.IsEmpty(ListItem.Property(jellyfinid))] + [String.IsEqual(ListItem.DBTYPE,movie) | + String.IsEqual(ListItem.DBTYPE,episode)]] + + !String.IsEmpty(Window(10000).Property(jellyfin_context_transcode)) + + + + + all + en + GNU GENERAL PUBLIC LICENSE. Version 3, 29 June 2007 + https://forum.jellyfin.org + https://jellyfin.org/ + https://github.com/jellyfin/jellyfin-kodi + + Welcome to Jellyfin for Kodi! A whole new way to manage and view your + media library. The Jellyfin addon for Kodi combines the best of Kodi - ultra smooth + navigation, beautiful UIs and playback of any file under the sun, and Jellyfin - the most + powerful fully open source multi-client media metadata indexer and server. Jellyfin + for Kodi is the absolute best way to enjoy the incredible Kodi playback engine combined with + the power of Jellyfin's centralized database. Features: * Direct integration with the Kodi + library for native Kodi speed * Instant synchronization with the Jellyfin server * + Full support for Movie, TV and Music collections * Jellyfin Server direct stream and + transcoding support - use Kodi when you are away from home! + + + + resources/icon.png + resources/fanart.png + + diff --git a/.github/renovate.json b/.github/renovate.json index e6794123..1cf20552 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,26 +1,37 @@ { - "extends": [ - "config:base", - ":dependencyDashboard", - ":timezone(Etc/UTC)", - ":preserveSemverRanges" - ], - "internalChecksFilter": "strict", - "rebaseWhen": "conflicted", - "packageRules": [ - { - "description": "Add the ci and github-actions GitHub label to GitHub Action bump PRs", - "matchManagers": ["github-actions"], - "labels": ["ci", "github-actions"] - }, - { - "description": "Add the ci and github-actions GitHub label to GitHub Action bump PRs", - "matchManagers": ["pip_requirements"], - "labels": ["pip", "dependencies"] - } - - ], - "pip_requirements": { - "fileMatch": ["requirements(-[a-z0-9]+)?\\.txt$"] - } + "extends": [ + "config:base", + ":dependencyDashboard", + ":timezone(Etc/UTC)", + ":preserveSemverRanges" + ], + "internalChecksFilter": "strict", + "rebaseWhen": "conflicted", + "packageRules": [ + { + "description": "Add the ci and github-actions GitHub label to GitHub Action bump PRs", + "matchManagers": [ + "github-actions" + ], + "labels": [ + "ci", + "github-actions" + ] + }, + { + "description": "Add the ci and github-actions GitHub label to GitHub Action bump PRs", + "matchManagers": [ + "pip_requirements" + ], + "labels": [ + "pip", + "dependencies" + ] + } + ], + "pip_requirements": { + "fileMatch": [ + "requirements(-[a-z0-9]+)?\\.txt$" + ] + } } diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5cd503c3..19cfbb8b 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,6 @@ { - "recommendations": [ - "ms-vscode-remote.remote-containers", - "ms-python.black-formatter" - ] + "recommendations": [ + "ms-vscode-remote.remote-containers", + "ms-python.black-formatter" + ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 9009f569..1f522373 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,16 +1,16 @@ { - "editor.formatOnSave": true, - "python.formatting.provider": "black", - "python.linting.enabled": true, - "python.linting.flake8Enabled": true, - "python.linting.mypyEnabled": true, - "python.testing.pytestEnabled": true, - "python.analysis.diagnosticMode": "workspace", - "files.associations": { - "requirements-*.txt": "pip-requirements" - }, - "sonarlint.connectedMode.project": { - "connectionId": "jellyfin", - "projectKey": "jellyfin_jellyfin-kodi" - }, + "editor.formatOnSave": true, + "python.formatting.provider": "black", + "python.linting.enabled": true, + "python.linting.flake8Enabled": true, + "python.linting.mypyEnabled": true, + "python.testing.pytestEnabled": true, + "python.analysis.diagnosticMode": "workspace", + "files.associations": { + "requirements-*.txt": "pip-requirements" + }, + "sonarlint.connectedMode.project": { + "connectionId": "jellyfin", + "projectKey": "jellyfin_jellyfin-kodi" + }, } From 5e68c5b8b620eb0de41a9e65151e0d56464791d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Mon, 10 Jun 2024 14:37:38 +0000 Subject: [PATCH 5/5] Blame: Ignore reformatting changes --- .git-blame-ignore-revs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 72cc270d..5522b356 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,2 +1,6 @@ # Tool: black 77637622125a187c5b9cbe72b78c8bd3b26f754a +# Fix editorconfig lints +be8333a80c2650c75444281a9b720da438b2b6d0 +# Change indentation of XML and JSON files +7c0e986bd283c764cc16f0c756a03a04e4073ad0