Skip to content
Permalink
Browse files

Fix initial population of Group Filters

  • Loading branch information...
da3dsoul committed Feb 16, 2019
1 parent e4e24a0 commit 45e6013d05a285fa0d31f17a84faba5338d07bd0
Showing with 7 additions and 9 deletions.
  1. +4 −2 Shoko.Server/Databases/BaseDatabase.cs
  2. +3 −7 Shoko.Server/Models/SVR_VideoLocal_Place.cs
@@ -242,8 +242,10 @@ public void CreateOrVerifyLockedFilters()
private void CreateInitialGroupFilters()
{
// group filters

if (RepoFactory.GroupFilter.GetAll().Any()) return;
// Do to DatabaseFixes, some filters may be made, namely directory filters
// All, Continue Watching, Years, Seasons, Tags... 6 seems to be enough to tell for now
// We can't just check the existence of anything specific, as the user can delete most of these
if (RepoFactory.GroupFilter.GetTopLevel().Count() > 6) return;

Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(ServerSettings.Culture);

@@ -617,13 +617,9 @@ private bool RenameIfRequired()
VideoLocal_Place_ID);
return (string.Empty, "ERROR: Unable to access file");
}
// check if this file is in the drop folder
// otherwise we don't need to move it
if (ImportFolder.IsDropSource == 0 && !force)
{
logger.Error("Not moving file as it is NOT in the drop folder: {0}", FullServerPath);
return (string.Empty, "ERROR: Not in drop folder");
}

// Normally we'd check for drop source, but we are forcing it here, so let it move

IFileSystem sourcefs = ImportFolder.FileSystem;
if (sourcefs == null)
{

0 comments on commit 45e6013

Please sign in to comment.
You can’t perform that action at this time.