mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-11 21:02:10 +01:00
add reel
This commit is contained in:
@@ -324,6 +324,41 @@ namespace MediaBrowser.ServerApplication
|
||||
private void PerformVersionMigration()
|
||||
{
|
||||
DeleteDeprecatedModules();
|
||||
|
||||
if (!ServerConfigurationManager.Configuration.PlaylistImagesDeleted)
|
||||
{
|
||||
DeletePlaylistImages();
|
||||
ServerConfigurationManager.Configuration.PlaylistImagesDeleted = true;
|
||||
ServerConfigurationManager.SaveConfiguration();
|
||||
}
|
||||
}
|
||||
|
||||
private void DeletePlaylistImages()
|
||||
{
|
||||
try
|
||||
{
|
||||
var path = Path.Combine(ApplicationPaths.DataPath, "playlists");
|
||||
|
||||
var files = Directory.GetFiles(path, "*", SearchOption.AllDirectories)
|
||||
.Where(i => BaseItem.SupportedImageExtensions.Contains(Path.GetExtension(i) ?? string.Empty))
|
||||
.ToList();
|
||||
|
||||
foreach (var file in files)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteDeprecatedModules()
|
||||
|
||||
Reference in New Issue
Block a user