Added new read code for reading data in from a database file.
Added Logger to log when a file is created, or the file has been
changed.
Changed Error to log as error, instead of Console writting.
Added Last Update stamp, for when the last update was in the database,
to see if we have newer events to process.
Applied settings for enabling/disabling syncers on startup.
Updated SyncMonitor() to use new Update check, before iterating through
all the syncers and fetching them.
Added logging messages for when we are updating settings to reflect what
has been changed.
Added GetLastUpdated() to ISyncer interface.
Updated code to use new /ping endpoint.
Added GetLastUpdated() REST API call to fetch when the database was last
updated.
Clarified logging for when an Update is from a file, or from the REST
API Server.
Added logging for when a nw File Entry is processed, or when a File
Entry is Updated.
Updated MainWindow.xaml with UI controls for FreeTubeSyncer application
settings.
Updated MainWindow.xaml.cs code behind file top handle logic of not
closing the app when the window is closed, and handling Saving and
Hiding of the Window when close is requestd.
Updated App.xaml to use SukiUI.
Added Event Handlers for System Tray.
Updated App.xaml.cs code behind file to implement Logic that was in
Program.cs, into the core of the UI App. Implemented Async Tasks, to
allow for UI to remain responsive, while doing long running tasks.
Added Loading, Saving and Updating settings from UI updates.
Added parameter for Rest Base URL to allow configurability of the Base
URL for REST API.
Updated ISyncer, to add Enable(), Disable(), IsEnabled(),
UpdateBaseUrl(), SetEnabled() and PingApi() to allow for settings.
PingApi() will test to see if the URL provided is reachable.
UpdatebaseUrl() will set the URL for the server to communicate with.
SetEnabled(), Enable() Disable() and IsEnabled() to allow for settings
to toggle on and off syncing of specific parts of FreeTube.
Added Locking system, so that we don't try to access the same file with
both read and write functions at the same time causing an locked
exception on the file when watching it.
Now utilizing syncers in an Array for each checking of IsDirty() or not,
and running code based upon the state of the syncers. May clean this up
more.
Added polling of the database to see if there's anything new to sync
locally.
Added interface for Syncer class.
Changed IsDirty from Property to Function
Moved order for reading in initial database. First will fetch from the
REST Api, then it will read in the database stored locally.
Changed logic behind reading and fetching database. Fetching the
database from the REST Api will mark internally that it is dirty, and
force syncing.
If an entry exists in our cache, and is equal, then we continue through,
otherwise we remove the old entry, and use the new entry.
While still testing things out, remain in Console mode.
Removed un-used using statements.
Fixed SearchHistorySyner to properly use /searchHistory API end-point.
Added print statement to see when FreeTube closes, and wait for 1.5
seconds before attempting to sync everything up. May need to increase
this more, needs testing. (maybe a good 5 seconds would be enough)
Updated Syncer class to properly sync all classes, even with special
requierments needed for Settings.
Now properly handles all classes, and ensures that the data is properly
stored in the database, and can be written out correctly to the FreeTube
database files.
Updated Seting class to use string for teh data, and the data is the
full setting line, to allow for the flexability for Any data value in
the field. Implemented MarshalData() and JsonData() functions.
Changed delegate to pass string instead of object.
Now instead of attempting to deserialize the data in DBSyncWatcher,
deserialization happens in th Syncer class.
Fixed possible issue where integers were both strings and ints. Now
properly converting them to integers to be stored.
Fixed issue where lengths were being reported as either integers, or
String stamps. Now properly converting to string stamps to integers.
Created Syncer Generic Class to handle Monitoring, and Syncing between
local database, and remote REST server.
Temporarily changed Program.cs from an Avalonia UI app, to a Console App
for testing and debugging purposes.