Removing usless print statements

This commit is contained in:
Zoe Roux 2021-01-29 23:23:14 +01:00
parent bef687bbb1
commit e7267d6b51
3 changed files with 3 additions and 14 deletions

View File

@ -29,8 +29,6 @@ namespace Kyoo.Models
return false;
if (ReferenceEquals(y, null))
return false;
if (x.GetType() != y.GetType())
return false;
return x.ID == y.ID || x.Slug == y.Slug;
}
@ -53,8 +51,6 @@ namespace Kyoo.Models
return false;
if (ReferenceEquals(y, null))
return false;
if (x.GetType() != y.GetType())
return false;
return Utility.LinkEquals(x.Parent, x.ParentID, y.Parent, y.ParentID)
&& Utility.LinkEquals(x.Child, x.ChildID, y.Child, y.ChildID);
}

View File

@ -9,7 +9,7 @@ namespace Kyoo.Models
public int ID { get; set; }
public string Slug { get; set; }
public string Title { get; set; }
public IEnumerable<string> Aliases { get; set; }
[EditableRelation] public IEnumerable<string> Aliases { get; set; }
[JsonIgnore] public string Path { get; set; }
public string Overview { get; set; }
public Status? Status { get; set; }

View File

@ -175,22 +175,15 @@ namespace Kyoo.Controllers
if (getter.HasDefaultValue(edited))
continue;
await navigation.LoadAsync();
// TODO this may be usless for lists since the API does not return IDs but the
// TODO LinkEquality does not check slugs (their are lazy loaded and only the ID is available)
if (Utility.ResourceEquals(getter.GetClrValue(edited), getter.GetClrValue(old)))
{
navigation.Metadata.PropertyInfo.SetValue(edited, default);
Console.WriteLine($"Loaded: {navigation.Metadata.Name}");
}
else
Console.WriteLine($"Using: {navigation.Metadata.Name}");
}
else
{
navigation.Metadata.PropertyInfo.SetValue(edited, default);
Console.WriteLine($"Skipping: {navigation.Metadata.Name}");
}
}
Console.WriteLine("Loading done.");
if (resetOld)
Utility.Nullify(old);
Utility.Complete(old, edited);