mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-24 08:30:49 +01:00
update playlist drag and drop
This commit is contained in:
@@ -1748,8 +1748,6 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
return;
|
||||
}
|
||||
|
||||
var path = imageInfo.Path;
|
||||
|
||||
ImageSize size;
|
||||
|
||||
try
|
||||
|
||||
@@ -248,6 +248,11 @@ namespace MediaBrowser.Server.Implementations.Photos
|
||||
|
||||
if (image != null)
|
||||
{
|
||||
if (!image.IsLocalFile)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!FileSystem.ContainsSubPath(item.GetInternalMetadataPath(), image.Path))
|
||||
{
|
||||
return false;
|
||||
@@ -269,6 +274,11 @@ namespace MediaBrowser.Server.Implementations.Photos
|
||||
|
||||
if (image != null)
|
||||
{
|
||||
if (!image.IsLocalFile)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!FileSystem.ContainsSubPath(item.GetInternalMetadataPath(), image.Path))
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
||||
|
||||
try
|
||||
{
|
||||
_fileSystem.CreateDirectory(path);
|
||||
_fileSystem.CreateDirectory(path);
|
||||
|
||||
var playlist = new Playlist
|
||||
{
|
||||
@@ -151,7 +151,7 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
||||
|
||||
private string GetTargetPath(string path)
|
||||
{
|
||||
while (_fileSystem.DirectoryExists(path))
|
||||
while (_fileSystem.DirectoryExists(path))
|
||||
{
|
||||
path += "1";
|
||||
}
|
||||
@@ -243,6 +243,16 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
||||
|
||||
var oldIndex = children.FindIndex(i => string.Equals(entryId, i.Item1.Id, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (oldIndex == newIndex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (newIndex > oldIndex)
|
||||
{
|
||||
newIndex--;
|
||||
}
|
||||
|
||||
var item = playlist.LinkedChildren[oldIndex];
|
||||
|
||||
playlist.LinkedChildren.Remove(item);
|
||||
|
||||
Reference in New Issue
Block a user