Changed ComicInfo.xml to use chapternumber as "Number".

This commit is contained in:
glax 2023-05-20 12:53:54 +02:00
parent 52f357021d
commit ff01bac9d4
3 changed files with 3 additions and 6 deletions

View File

@ -75,7 +75,7 @@ public abstract class Connector
new XElement("LanguageISO", publication.originalLanguage), new XElement("LanguageISO", publication.originalLanguage),
new XElement("Title", chapter.name), new XElement("Title", chapter.name),
new XElement("Volume", chapter.volumeNumber), new XElement("Volume", chapter.volumeNumber),
new XElement("Number", chapter.sortNumber) new XElement("Number", chapter.chapterNumber) //TODO check if this is correct at some point
); );
return comicInfo.ToString(); return comicInfo.ToString();
} }

View File

@ -49,7 +49,7 @@ public class TaskManager
foreach (TrangaTask task in _allTasks) foreach (TrangaTask task in _allTasks)
{ {
if(task.ShouldExecute()) if(task.ShouldExecute())
TaskExecutor.Execute(this._connectors, task, this._chapterCollection); //Might crash here, when adding new Task while another Task is running. Check later TaskExecutor.Execute(this._connectors, task, this._chapterCollection); //TODO Might crash here, when adding new Task while another Task is running. Check later
} }
Thread.Sleep(1000); Thread.Sleep(1000);
} }

View File

@ -7,7 +7,7 @@ namespace Tranga;
/// </summary> /// </summary>
public class TrangaTask public class TrangaTask
{ {
// ReSharper disable once CommentTypo ...tell me why! // ReSharper disable once CommentTypo ...Tell me why!
// ReSharper disable once MemberCanBePrivate.Global I want it thaaat way // ReSharper disable once MemberCanBePrivate.Global I want it thaaat way
public TimeSpan reoccurrence { get; } public TimeSpan reoccurrence { get; }
public DateTime lastExecuted { get; set; } public DateTime lastExecuted { get; set; }
@ -29,9 +29,6 @@ public class TrangaTask
this.language = language; this.language = language;
} }
/// <summary>
///
/// </summary>
/// <returns>True if elapsed time since last execution is greater than set interval</returns> /// <returns>True if elapsed time since last execution is greater than set interval</returns>
public bool ShouldExecute() public bool ShouldExecute()
{ {