[PR #1188] [MERGED] Fix problems with plugin installation #8511

Closed
opened 2025-12-22 06:56:08 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/1188
Author: @joshuaboniface
Created: 4/2/2019
Status: Merged
Merged: 4/8/2019
Merged by: @joshuaboniface

Base: release-10.3.zHead: hotfix-pluginload


📝 Commits (4)

  • 38fcd31 Search all subdirectories for Plugins
  • 05a4161 Correct the installation and removal of plugins
  • 09505e0 Apply review feedback
  • 754e76a Add TODO to remove string target

📊 Changes

2 files changed (+35 additions, -9 deletions)

View changed files

📝 Emby.Server.Implementations/ApplicationHost.cs (+3 -3)
📝 Emby.Server.Implementations/Updates/InstallationManager.cs (+32 -6)

📄 Description

Changes

Fixes several breaking bugs around the installation, loading, and management of plugins.

  1. Restore previous functionality to load plugins from subfolders of the PluginDir, which was potentially broken in #801 (or previously, not sure).
  2. Use a directory name based only on the Name of the plugin, not the source filename, which contains the version and would be really confusing.
  3. Use the new directory name for the deletes if it's present, so that installation and removal happen at that directory level and we don't leave empty folders laying around. Ensures we properly remove additional resources in plugins too, not just the main .dll file.
  4. Ignore the incoming target when installing, and always set it ourself to the proper directory, which would matter when upgrading since the target is just the .dll filename.
  5. Delete an existing target directory before installing if it exists, allowing plugin updates to function properly. Note that not calling any of the plugin removal code is intentional; I suspect that would delete configurations unexpectedly when upgrading which would be annoying. This way, it just replaces the files and then reloads.
  6. (Minor) Added some actual debug messages around the plugin download section so failures can be more accurately seen.

The end result is that, for example, the Anime plugin will on Debian be installed in /var/lib/jellyfin/plugins/Anime/ as Anime.dll. When removed, the whole /var/lib/jellyfin/plugins/Anime directory will be removed. When upgrading to a new version, the directory will be removed automatically as expected and the new plugin installed in its place.

Issues

Fixes #1194


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/1188 **Author:** [@joshuaboniface](https://github.com/joshuaboniface) **Created:** 4/2/2019 **Status:** ✅ Merged **Merged:** 4/8/2019 **Merged by:** [@joshuaboniface](https://github.com/joshuaboniface) **Base:** `release-10.3.z` ← **Head:** `hotfix-pluginload` --- ### 📝 Commits (4) - [`38fcd31`](https://github.com/jellyfin/jellyfin/commit/38fcd31917af1d904ea61de0f90918d44122d2e4) Search all subdirectories for Plugins - [`05a4161`](https://github.com/jellyfin/jellyfin/commit/05a4161fd388d7ecda2f1b4a6ec6d02ee7b4488e) Correct the installation and removal of plugins - [`09505e0`](https://github.com/jellyfin/jellyfin/commit/09505e0988ec53538c3ecc3d243b1d1a5edac8c6) Apply review feedback - [`754e76a`](https://github.com/jellyfin/jellyfin/commit/754e76a61bbf4bbda5a4a1073737c07bf28f5f3a) Add TODO to remove string target ### 📊 Changes **2 files changed** (+35 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/ApplicationHost.cs` (+3 -3) 📝 `Emby.Server.Implementations/Updates/InstallationManager.cs` (+32 -6) </details> ### 📄 Description ### Changes Fixes several breaking bugs around the installation, loading, and management of plugins. 1. Restore previous functionality to load plugins from subfolders of the PluginDir, which was potentially broken in #801 (or previously, not sure). 1. Use a directory name based only on the `Name` of the plugin, not the source filename, which contains the version and would be really confusing. 1. Use the new directory name for the deletes if it's present, so that installation and removal happen at that directory level and we don't leave empty folders laying around. Ensures we properly remove additional resources in plugins too, not just the main `.dll` file. 1. Ignore the incoming `target` when installing, and always set it ourself to the proper directory, which would matter when upgrading since the `target` is just the `.dll` filename. 1. Delete an existing target directory before installing if it exists, allowing plugin updates to function properly. Note that not calling any of the plugin removal code is intentional; I suspect that would delete configurations unexpectedly when upgrading which would be annoying. This way, it just replaces the files and then reloads. 1. (Minor) Added some actual debug messages around the plugin download section so failures can be more accurately seen. The end result is that, for example, the `Anime` plugin will on Debian be installed in `/var/lib/jellyfin/plugins/Anime/` as `Anime.dll`. When removed, the whole `/var/lib/jellyfin/plugins/Anime` directory will be removed. When upgrading to a new version, the directory will be removed automatically as expected and the new plugin installed in its place. ### Issues Fixes #1194 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 06:56:08 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#8511
No description provided.