Skip to content

Commit

Permalink
Fix initial population of Group Filters
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Feb 16, 2019
1 parent e4e24a0 commit 45e6013
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 4 additions & 2 deletions Shoko.Server/Databases/BaseDatabase.cs
Expand Up @@ -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);

Expand Down
10 changes: 3 additions & 7 deletions Shoko.Server/Models/SVR_VideoLocal_Place.cs
Expand Up @@ -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)
{
Expand Down

0 comments on commit 45e6013

Please sign in to comment.