Commit graph

59 commits

Author SHA1 Message Date
829aa55c9f Updated Syncer
Updated syncer to new API 0.1.5.
Change ID Comparison to string comparison, instead of EqualId()
function.
Updated RemoveAll() to use string comparison, instead of EqualId() to
remove.
Added Try Catch retry 1 after delay.  This happens when we post multiple
copies of the same DB line entry, when it doesn't exist, and is added to
the REST Server, while the REST server processes it in one thread, but
it isn't updated properly in the new thread, and it fails, cause the
item is in the database backend, and fails to process.  Solution is to
wait for a small delay, before attempting the post request again.  If it
fails a second time, then there's something majorly wrong.
2025-08-09 04:18:11 -05:00
4f93a21098 Updated UI/App Settings
Changed interval check from a Numeric spin box, to a pre-defined option
selector.
Now have 1/2 minute, 1 Minute, 30 Minutes, 1 hour, 6 hours, 12 hours and
24 hour intervals.
2025-08-09 04:11:25 -05:00
7dbb71d921 Updated DBSyncWatcher and Syncer
Updated to remove reading of Datbase File from DBSyncWatcher, and move
it into Syncer.
2025-08-05 11:39:56 -05:00
22d7bfb410 Possible Fix
Needs testing.  Switched to using a Temporary file to write out the
freetube database format, removing the old database, then copying over
the new one, instead of writing directly to it, in hope of fixing the
sporadic corruption of the database files.
2025-08-02 13:31:39 -05:00
65b026edc4 Updated app.pupnet.conf
Changed FlatpakPlatformVersion to 24.08
Removed --socket=wayland (Causes issues with trying to connect to
display server, Avalonia is still X11)
Added socket session-bus and system-bus
Added permission to access io.freetubeapp.FreeTube flatpak config
directory.
Added Device Direct Rendering driver for GL Drawing.
Added DBus interfaces for StatusNotifierItem and StatusNotifierWatcher
to allow System Tray icon to appear from within Flatpak.
2025-08-02 00:42:19 -05:00
b40786c02c Updated App
Since we can't rely on Process.GetProcessByName() to work from within a
sandboxed environment such as Flatpak, we instead rely on the
SingletonCookie/SingletonLock/SingletonSocket to determine if the
FreeTube Process is still running.
2025-08-02 00:40:03 -05:00
f66d672eb7 Added Pupnet Build config
Utilizing Pupnet to allow for easy building of various builds of the app
for multiple platforms.
2025-08-01 22:35:42 -05:00
7cf24025b6 Updated MainWindow.axaml
Set the icon to the default program icon.
2025-08-01 22:14:17 -05:00
7ad03d2c17 Updated CSProj
Updated Assets from using old AvaloniaXaml tag, to using
AvaloniaResource tag.  Added awaiting and complete icons.
2025-08-01 22:14:01 -05:00
480474c343 Updated App.axaml.cs
Added fields for Normal icon, Waiting to Sync Icon, and Syncing Complete
icons to let user know of changes in the state of the Syncer.
Added function to ensure that we are changing the Icon and Tooltip on
the UI Thread, instead of some other thread.
Updated SyncMonitor to check for any dirty syncers, and if so, we update
our SysTray icon.
Added update to show we are syncing the data (Tooltip only)
Added update to show we have compeleted sync.
Added timer for 3 seconds before resetting SysTray and tooltip back to
normal status.
2025-08-01 22:13:17 -05:00
358539bfd5 Updated App.axaml
Added Models to XML Namespace.
Set DataType to be AppViewModel
Changed from static tooltip and icon, to using Bindings.
2025-08-01 22:08:32 -05:00
14fae4b246 Updated Syncer
Removed un-nesscary Close() as using should automatically close, and
dispose of the file handler.
Added a 100ms wait after we finish writing the file, before we unlock
the watcher, so we don't generate un-nesscary events.
2025-08-01 22:07:33 -05:00
4c400c03b8 Created AppViewModel
Created AppViewModel to handle System Tray Icon, and Tooltip.
2025-08-01 22:06:16 -05:00
c9c88358c3 Updated DBSyncWatcher
Changed from Doing a for loop, to just returning, as we don't want to
propogate the signal if we are syncing.
2025-08-01 22:05:36 -05:00
b63f32dd06 Updated Icons
Updated Icons to create our variant of branding.
2025-08-01 22:04:50 -05:00
61c98f459b Updated Gitignore
Added builds folder from git repo.
2025-08-01 17:21:33 -05:00
145c863fbe Updated App
Updated app to implement Serilog logging functionality.
Added GetAppFolder()
Changed GetSettingsPath() to use GetAppFolder()
Removed all Console.WriteLine() and replaed with Logger functions.
Created SetupLogger(), to log to both Console, and a Log file.
2025-07-31 16:17:06 -05:00
d8e650deec Updated CSProj
Updated project from Dotnet 8, to Dotent 9.
Ensure compiler is using latest major release.
Added Serilog assemblies.
2025-07-31 16:15:02 -05:00
c94b709145 Updated Syncer
Added Logging functionality to write to log files.
2025-07-31 16:14:21 -05:00
725a37d9cf Updated DBSyncWatcher
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.
2025-07-31 16:13:49 -05:00
823bb11b83 Updated App
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.
2025-07-31 14:28:36 -05:00
a88da7f6d0 Updated Syncer
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.
2025-07-31 14:26:20 -05:00
0e07f21ffe Updated CSProj
Removed Views, as is not needed.
2025-07-31 14:24:32 -05:00
c9e4cc694b Added Ping and UpdateCheck models.
Added Ping and UpdateCheck models for quick pings for service being
alive, and when the database was last updated.
2025-07-31 14:24:10 -05:00
b3e6d2e844 Updated DBSyncWatcher
Removed logging of changes detected in files.
2025-07-31 14:23:33 -05:00
789ceeedff Updated Syncer
Added more error catching when processing in sync data.
2025-07-31 07:38:26 -05:00
ad155026d1 Updated MainWindow
Switched from IsPressed to IsChecked, which works as intended.
2025-07-31 07:22:13 -05:00
08f5038abd Updated App
Added resetting of SettingsDirty when we ResetSettings(),
SaveSettings(), and first load in Settings.
Added more noise to know what is going on.
2025-07-31 07:21:57 -05:00
433797caae Updated Syncer
Added More noise to logging, so things can be seen happening.
2025-07-31 07:20:53 -05:00
6fb47905c0 Updated Program.
Removed all code from console testing, and moved into App.xaml.cs for
handling of the Syncing of things in co-op with the UI Thread.
2025-07-31 03:35:26 -05:00
b0ac6c1b7b Updated MainWindow
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.
2025-07-31 03:34:31 -05:00
56432cd33d Updated CSProj
Added CommunityToolkit.Mvvm, and SukiUI as required packages.
2025-07-31 03:32:59 -05:00
7099e31ff5 Updated App
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.
2025-07-31 03:32:30 -05:00
e6236b8a5a Updated Syncer
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.
2025-07-31 03:30:31 -05:00
ec55cf2f11 Added AppSettings
Added AppSettings for FreeTubeSyncer.
2025-07-31 03:28:08 -05:00
ddf50a3052 Updated DBSyncWatcher and Syncer
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.
2025-07-30 17:03:35 -05:00
8d53ce79f3 Updated Profile
Updated profile to more properly iterate over subscriptions for equality
checking to ensure subs properly match up.
2025-07-30 16:51:17 -05:00
d4a9b88cc0 Updated program
Some minor fixes, will be getting rid of this in favor of UI setup.
2025-07-30 14:51:21 -05:00
7128bfad65 Updated Syncer
Removed reading database from file when starting up.
Changed writting to hand-written write, instead of using WriteAllLines()
static function on File.
2025-07-30 14:50:55 -05:00
73a54b91ff Update all Models
Made all models implement IEquatable<> generic, allowing for validating
of equality of data.
2025-07-30 14:49:59 -05:00
13bb5ac0dd Updated Program
Added noise for the second condition to show we are checking for
updates.
2025-07-30 12:52:47 -05:00
e2c356a723 Updated Syncer
Added check for syncing.  If we are syncing, we should be expecting file
changes, and not do anything.
2025-07-30 12:52:31 -05:00
f9af985de4 Adding some noise
Adding some noise to ensure that syncing is progressing as it should.
2025-07-30 12:30:14 -05:00
58e046c1f0 Updated Program
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.
2025-07-30 12:20:50 -05:00
5887bc0961 Updated Syncer
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.
2025-07-30 12:19:53 -05:00
ea2fb4d818 Updated Program.cs
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)
2025-07-24 04:32:51 -05:00
fb8284b5e8 Updated Syncer
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.
2025-07-24 04:30:54 -05:00
8e65cc3a4b Updated Setting
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.
2025-07-24 04:29:13 -05:00
09cd72b278 Updated Profile
removed un-used function.
2025-07-24 04:28:06 -05:00
25676baca4 Updated SearchHistory
Added MarshalData() and JsonData() functions.
2025-07-24 04:27:56 -05:00