#27 Changed properties in the jobs and fixed old rescan code. Also set rescan to false (we may ask the user later).

This commit is contained in:
Serraniel 2019-02-16 20:08:17 +01:00
parent 2f68a3d7a9
commit dfcc430ab1
Signed by untrusted user who does not match committer: Serraniel
GPG key ID: 3690B4E7364525D3
3 changed files with 6 additions and 4 deletions

View file

@ -39,8 +39,7 @@ namespace DML.AppCore.Classes
public int Id { get; set; }
public ulong GuildId { get; set; }
public ulong ChannelId { get; set; }
public double KnownTimestamp { get; set; } = 0;
private double StopTimestamp { get; set; } = 0;
public ulong LastMessageId { get; set; }
private bool IsValid { get; set; } = true;
internal JobState State { get; set; } = JobState.Idle;
@ -91,6 +90,7 @@ namespace DML.AppCore.Classes
/// <returns>Returns true if the newest messages have been scanned.</returns>
internal async Task<bool> Scan()
{
/*
Debug($"Starting scan of guild {GuildId} channel {ChannelId}...");
var result = new List<IMessage>();
@ -220,6 +220,8 @@ namespace DML.AppCore.Classes
}
Debug($"Fisnished scan of guild {GuildId} channel {ChannelId}.");
*/
return false;
}
public void Stop()

View file

@ -31,7 +31,7 @@ namespace DML.Application.Classes
public bool SkipExistingFiles { get; set; } = true;
public int ThreadLimit { get; set; } = 50;
public bool ShowStartUpHints { get; set; } = true;
public bool RescanRequired { get; set; } = true;
public bool RescanRequired { get; set; } = false;
public bool UseRPC { get; set; } = false;
public void Store()

View file

@ -275,7 +275,7 @@ namespace DML.Application.Core
if (Settings.RescanRequired)
{
Logger.Info("Restting timestamps");
job.KnownTimestamp = 0;
job.LastMessageId = 0;
job.Store();
}
}