Fix comparisons
This commit is contained in:
parent
29f6de2590
commit
b4f97eefcf
@ -23,10 +23,11 @@ public class UpdateMetadata : Job
|
||||
|
||||
protected override IEnumerable<Job> ExecuteReturnSubTasksInternal(JobBoss jobBoss)
|
||||
{
|
||||
//Retrieve new Metadata
|
||||
Manga? possibleUpdatedManga = mangaConnector.GetMangaFromId(manga.publicationId);
|
||||
if (possibleUpdatedManga is { } updatedManga)
|
||||
{
|
||||
if(updatedManga.Equals(this.manga))
|
||||
if(updatedManga.Equals(this.manga))//Check if anything changed
|
||||
return Array.Empty<Job>();
|
||||
|
||||
this.manga.UpdateMetadata(updatedManga);
|
||||
|
@ -77,7 +77,7 @@ public struct Manga
|
||||
this.sortName = newManga.sortName;
|
||||
this.description = newManga.description;
|
||||
foreach (string author in newManga.authors)
|
||||
if(this.authors.Contains(author))
|
||||
if(!this.authors.Contains(author))
|
||||
this.authors.Add(author);
|
||||
this.status = newManga.status;
|
||||
this.year = newManga.year;
|
||||
@ -93,7 +93,7 @@ public struct Manga
|
||||
this.releaseStatus == compareManga.releaseStatus &&
|
||||
this.sortName == compareManga.sortName &&
|
||||
this.latestChapterAvailable.Equals(compareManga.latestChapterAvailable) &&
|
||||
this.tags.Equals(compareManga.tags);
|
||||
this.tags.SequenceEqual(compareManga.tags);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
Loading…
Reference in New Issue
Block a user