Looks like we finally have a solution.
Change logging to just log a message, instead of the exception. Moved logic to Syncer involvement. When posting the data, if a 500 is returned, then it is up to the Syncer to re-submit it.
This commit is contained in:
parent
73955353cb
commit
004c490dd8
23 changed files with 529 additions and 177 deletions
17
FreeTubeSync/Model/BaseModel.cs
Normal file
17
FreeTubeSync/Model/BaseModel.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections;
|
||||
|
||||
namespace FreeTubeSync.Model;
|
||||
|
||||
public class BaseModel
|
||||
{
|
||||
public void UpdateFrom(object other)
|
||||
{
|
||||
foreach (var prop in other.GetType().GetProperties())
|
||||
{
|
||||
if (prop.Name == "_id" || prop.Name == "id" || prop.Name == "Id" || prop.Name == "subscriptions" || prop.Name == "videos")
|
||||
continue;
|
||||
var val = prop.GetValue(other);
|
||||
prop.SetValue(this, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue