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:
Mario Steele 2025-08-09 04:09:17 -05:00
parent 73955353cb
commit 004c490dd8
23 changed files with 529 additions and 177 deletions

View file

@ -17,7 +17,7 @@ namespace FreeTubeSync.Migrations
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.7");
modelBuilder.Entity("FreeTubeSync.Model.Database.ChangeLog", b =>
modelBuilder.Entity("FreeTubeSync.Model.ChangeLog", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -39,7 +39,7 @@ namespace FreeTubeSync.Migrations
b.ToTable("ChangeLogs");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.History", b =>
modelBuilder.Entity("FreeTubeSync.Model.History", b =>
{
b.Property<string>("_id")
.HasColumnType("TEXT");
@ -98,7 +98,7 @@ namespace FreeTubeSync.Migrations
b.ToTable("Histories");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.Playlist", b =>
modelBuilder.Entity("FreeTubeSync.Model.Playlist", b =>
{
b.Property<string>("_id")
.HasColumnType("TEXT");
@ -121,7 +121,7 @@ namespace FreeTubeSync.Migrations
b.ToTable("Playlists");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.Profile", b =>
modelBuilder.Entity("FreeTubeSync.Model.Profile", b =>
{
b.Property<string>("_id")
.HasColumnType("TEXT");
@ -143,7 +143,7 @@ namespace FreeTubeSync.Migrations
b.ToTable("Profiles");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.SearchHistory", b =>
modelBuilder.Entity("FreeTubeSync.Model.SearchHistory", b =>
{
b.Property<string>("_id")
.HasColumnType("TEXT");
@ -156,7 +156,7 @@ namespace FreeTubeSync.Migrations
b.ToTable("SearchHistories");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.Setting", b =>
modelBuilder.Entity("FreeTubeSync.Model.Setting", b =>
{
b.Property<string>("_id")
.HasColumnType("TEXT");
@ -170,94 +170,82 @@ namespace FreeTubeSync.Migrations
b.ToTable("Settings");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.Subscription", b =>
modelBuilder.Entity("FreeTubeSync.Model.Playlist", b =>
{
b.Property<string>("id")
.HasColumnType("TEXT");
b.OwnsMany("FreeTubeSync.Model.Video", "videos", b1 =>
{
b1.Property<string>("Playlist_id")
.HasColumnType("TEXT");
b.Property<string>("Profile_id")
.HasColumnType("TEXT");
b1.Property<string>("videoId")
.HasColumnType("TEXT");
b.Property<string>("name")
.IsRequired()
.HasColumnType("TEXT");
b1.Property<string>("author")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("thumbnail")
.HasColumnType("TEXT");
b1.Property<string>("authorId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("id");
b1.Property<string>("lengthSeconds")
.IsRequired()
.HasColumnType("TEXT");
b.HasIndex("Profile_id");
b1.Property<string>("playlistItemId")
.IsRequired()
.HasColumnType("TEXT");
b.ToTable("Subscriptions");
});
b1.Property<long>("published")
.HasColumnType("INTEGER");
modelBuilder.Entity("FreeTubeSync.Model.Database.Video", b =>
{
b.Property<string>("playlistItemId")
.HasColumnType("TEXT");
b1.Property<long>("timeAdded")
.HasColumnType("INTEGER");
b.Property<string>("Playlist_id")
.HasColumnType("TEXT");
b1.Property<string>("title")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("author")
.IsRequired()
.HasColumnType("TEXT");
b1.Property<string>("type")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("authorId")
.IsRequired()
.HasColumnType("TEXT");
b1.HasKey("Playlist_id", "videoId");
b.Property<string>("lengthSeconds")
.IsRequired()
.HasColumnType("TEXT");
b1.ToTable("Video");
b.Property<long>("pubished")
.HasColumnType("INTEGER");
b1.WithOwner()
.HasForeignKey("Playlist_id");
});
b.Property<long>("timeAdded")
.HasColumnType("INTEGER");
b.Property<string>("title")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("type")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("videoId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("playlistItemId");
b.HasIndex("Playlist_id");
b.ToTable("Videos");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.Subscription", b =>
{
b.HasOne("FreeTubeSync.Model.Database.Profile", null)
.WithMany("subscriptions")
.HasForeignKey("Profile_id");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.Video", b =>
{
b.HasOne("FreeTubeSync.Model.Database.Playlist", null)
.WithMany("videos")
.HasForeignKey("Playlist_id");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.Playlist", b =>
{
b.Navigation("videos");
});
modelBuilder.Entity("FreeTubeSync.Model.Database.Profile", b =>
modelBuilder.Entity("FreeTubeSync.Model.Profile", b =>
{
b.OwnsMany("FreeTubeSync.Model.Subscription", "subscriptions", b1 =>
{
b1.Property<string>("Profile_id")
.HasColumnType("TEXT");
b1.Property<string>("id")
.HasColumnType("TEXT");
b1.Property<string>("name")
.IsRequired()
.HasColumnType("TEXT");
b1.Property<string>("thumbnail")
.HasColumnType("TEXT");
b1.HasKey("Profile_id", "id");
b1.ToTable("Subscription");
b1.WithOwner()
.HasForeignKey("Profile_id");
});
b.Navigation("subscriptions");
});
#pragma warning restore 612, 618