mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
[PR #4598] [CLOSED] Dynamic loading of shared code in Plugins. (Design concept) #10005
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#10005
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/4598
Author: @BaronGreenback
Created: 11/27/2020
Status: ❌ Closed
Base:
master← Head:DesignConcept📝 Commits (10+)
dc1cec9Merge pull request #98 from jellyfin/master4b35265Create random4729999Add files via uploadbab914cAdd files via upload21edbd2Update Transmute.cs459f7abUpdate SharedCodeManager.csdbb415fDelete randoma06a7e8Update PluginRegistrarExample.csa935869Update SampleSharedCodeExample.csa8fe948Update SharedCodeManager.cs📊 Changes
5 files changed (+203 additions, -0 deletions)
View changed files
➕
DesignConcept/PluginRegistrarExample.cs(+30 -0)➕
DesignConcept/SampleSharedCodeExample.cs(+21 -0)➕
DesignConcept/SharedCodeAttribute.cs(+20 -0)➕
DesignConcept/SharedCodeManager.cs(+95 -0)➕
DesignConcept/Transmute.cs(+37 -0)📄 Description
This is NOT valid code - just a possible concept. Don't yet know if it will work this way, but don't want to develop the concept futher until there is some agreement about whether this is the direction to go. There may be a better solution.
Issue.
Two plugins use the same code. Normally this could be done by reproducing the same code in each plugin, but in this instance, the code in question consumes the same system resource. (The shared code manages this - that's why it's, well, shared!)
Possible solutions
Leave the code in the JF codebase
This is a possibility in this instance, however, do we want plugin code hanging around in the core? And how would 3rd party developers do this?
This concept
If it hasn't then the dll is loaded and registers the "shared" types in DI for use throughout the system.
This would seem to enable either / or / none to be loaded and registered / shared dynamically.
Some sample code (again - not compiled) is included to give a gist of what i mean is attached.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.