Possibly fix issues
After doing testing with a test project, re-organized code to new method of storing, as well as ensure that all Endpoint lambda's are separated out into functions. Large commit, will be testing.
This commit is contained in:
parent
2e4f644c17
commit
73955353cb
23 changed files with 314 additions and 352 deletions
|
|
@ -1,4 +1,4 @@
|
|||
namespace FreeTubeSync.Model.Database;
|
||||
namespace FreeTubeSync.Model;
|
||||
|
||||
public class ChangeLog
|
||||
{
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace FreeTubeSync.Model.Database;
|
||||
namespace FreeTubeSync.Model;
|
||||
|
||||
public class History
|
||||
{
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace FreeTubeSync.Model.Json;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public class HistoryJson
|
||||
{
|
||||
public string _id { get; set; } = string.Empty;
|
||||
public string videoId { get; set; } = string.Empty;
|
||||
public string title { get; set; } = string.Empty;
|
||||
public string author { get; set; } = string.Empty;
|
||||
public string authorId { get; set; } = string.Empty;
|
||||
public long published { get; set; }
|
||||
public string description { get; set; } = string.Empty;
|
||||
public long viewCount { get; set; }
|
||||
public long lengthSeconds { get; set; }
|
||||
public float watchProgress { get; set; }
|
||||
public long timeWatched { get; set; }
|
||||
public bool isLive { get; set; }
|
||||
public string type { get; set; } = string.Empty;
|
||||
public string lastViewedPlaylistType { get; set; } = string.Empty;
|
||||
public string? lastViewedPlaylistItemId { get; set; }
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace FreeTubeSync.Model.Json;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public class PlaylistJson
|
||||
{
|
||||
public string _id { get; set; } = string.Empty;
|
||||
public string playlistName { get; set; } = string.Empty;
|
||||
public bool @protected { get; set; }
|
||||
public List<VideoJson> videos { get; set; } = [];
|
||||
public long createdAt { get; set; }
|
||||
public long lastUpdatedAt { get; set; }
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace FreeTubeSync.Model.Json;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public class ProfileJson
|
||||
{
|
||||
public string _id { get; set; } = string.Empty;
|
||||
public string name { get; set; } = string.Empty;
|
||||
public string bgColor { get; set; } = string.Empty;
|
||||
public string textColor { get; set; } = string.Empty;
|
||||
public List<SubscriptionJson> subscriptions { get; set; } = [];
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace FreeTubeSync.Model.Json;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public class SearchHistoryJson
|
||||
{
|
||||
public string _id { get; set; } = string.Empty;
|
||||
public long lastUpdatedAt { get; set; }
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace FreeTubeSync.Model.Json;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public class SettingJson
|
||||
{
|
||||
public string _id { get; set; } = string.Empty;
|
||||
public string value { get; set; }
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace FreeTubeSync.Model.Json;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public class SubscriptionJson
|
||||
{
|
||||
public string id { get; set; } = string.Empty;
|
||||
public string name { get; set; } = string.Empty;
|
||||
public string? thumbnail { get; set; }
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace FreeTubeSync.Model.Json;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public class VideoJson
|
||||
{
|
||||
public string videoId { get; set; } = string.Empty;
|
||||
public string title { get; set; } = string.Empty;
|
||||
public string author { get; set; } = string.Empty;
|
||||
public string authorId { get; set; } = string.Empty;
|
||||
public string lengthSeconds { get; set; } = string.Empty;
|
||||
public long pubished { get; set; }
|
||||
public long timeAdded { get; set; }
|
||||
public string playlistItemId { get; set; } = string.Empty;
|
||||
public string type { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace FreeTubeSync.Model.Database;
|
||||
namespace FreeTubeSync.Model;
|
||||
|
||||
public class Playlist
|
||||
{
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace FreeTubeSync.Model.Database;
|
||||
namespace FreeTubeSync.Model;
|
||||
|
||||
public class Profile
|
||||
{
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace FreeTubeSync.Model.Database;
|
||||
namespace FreeTubeSync.Model;
|
||||
|
||||
public class SearchHistory
|
||||
{
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace FreeTubeSync.Model.Database;
|
||||
namespace FreeTubeSync.Model;
|
||||
|
||||
public class Setting
|
||||
{
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FreeTubeSync.Model.Database;
|
||||
namespace FreeTubeSync.Model;
|
||||
|
||||
[Owned]
|
||||
public class Subscription
|
||||
{
|
||||
[Key]
|
||||
public string id { get; set; } = string.Empty;
|
||||
public string name { get; set; } = string.Empty;
|
||||
public string? thumbnail { get; set; }
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FreeTubeSync.Model.Database;
|
||||
namespace FreeTubeSync.Model;
|
||||
|
||||
[Owned]
|
||||
public class Video
|
||||
{
|
||||
public string videoId { get; set; } = string.Empty;
|
||||
|
|
@ -9,9 +10,8 @@ public class Video
|
|||
public string author { get; set; } = string.Empty;
|
||||
public string authorId { get; set; } = string.Empty;
|
||||
public string lengthSeconds { get; set; } = string.Empty;
|
||||
public long pubished { get; set; }
|
||||
public long published { get; set; }
|
||||
public long timeAdded { get; set; }
|
||||
[Key]
|
||||
public string playlistItemId { get; set; } = string.Empty;
|
||||
public string type { get; set; } = string.Empty;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue