mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
[PR #13959] Add implementation for moving items #13601
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#13601
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/13959
Author: @geo-martino
Created: 4/21/2025
Status: 🔄 Open
Base:
master← Head:feat/move-item📝 Commits (9)
b0a06b4initial implementation4ac2042exclude makefileae7b3c0add guard clauses for unexpected move operation3aa447fdrop exception handling on LibraryManager + adjust recursive settingsfc33ebereorder methodsed6fbbcdrop returns on Move methods + expand options3fe417eMerge branch 'master' into feat/move-item72ab9a5move children only within same folder + drop user input logging + only support libraries5004cfdadd back missing file📊 Changes
19 files changed (+597 additions, -27 deletions)
View changed files
📝
CONTRIBUTORS.md(+2 -0)📝
Emby.Server.Implementations/IO/ManagedFileSystem.cs(+93 -5)📝
Emby.Server.Implementations/Library/LibraryManager.cs(+140 -21)📝
Jellyfin.Api/Controllers/LibraryController.cs(+66 -0)📝
Jellyfin.Data/UserEntityExtensions.cs(+1 -0)📝
Jellyfin.Server.Implementations/Item/BaseItemRepository.cs(+59 -0)📝
Jellyfin.Server.Implementations/Users/UserManager.cs(+5 -0)📝
MediaBrowser.Controller/Channels/IChannelManager.cs(+4 -0)➕
MediaBrowser.Controller/Channels/ISupportsMove.cs(+15 -0)📝
MediaBrowser.Controller/Entities/BaseItem.cs(+49 -0)📝
MediaBrowser.Controller/Library/ILibraryManager.cs(+27 -0)➕
MediaBrowser.Controller/Library/MoveItemOptions.cs(+20 -0)📝
MediaBrowser.Controller/Persistence/IItemRepository.cs(+8 -0)📝
MediaBrowser.Model/IO/IFileSystem.cs(+43 -0)➕
MediaBrowser.Model/IO/MoveOptions.cs(+20 -0)📝
MediaBrowser.Model/Users/UserPolicy.cs(+6 -0)📝
src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs(+5 -0)📝
src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs(+6 -1)📝
src/Jellyfin.LiveTv/Channels/ChannelManager.cs(+28 -0)📄 Description
Changes
Adds API endpoint and implementation for moving items to new locations on the file system while updating the reference to this new location on the item in the repository. The implementation closely follows the same patterns used for
DeleteItemincluding setting per-user permissions for moving which ultimately can be configured in the UI with later changes.Also expands the functionality of the
MoveDirectorymethod inManagedFileSystemto better integrate with the newMoveFilemethod and related methods.I have conducted regression tests on a development build for the API endpoint to confirm the changes work as expected. The major caveat being that the item is replaced in the database when the item is moved to a new location. Happy to either expand this PR or open a new PR to address the remapping of IDs on items if required. (I've added a more expanded explanation of this issue in the linked issue).
Issues
Partially addresses #13958
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.