325 Commits

Author SHA1 Message Date
Thegan Govender
557fea971f fix for archive bit, this should fix the stat count issues aswell 2024-01-25 20:16:28 +02:00
Jean-Sebastien Mouret
4a236d3fbc Use POSTGRES_DATABASE everywhere 2024-01-20 20:51:44 +00:00
Thegan Govender
018a90424e Merge branch 'unstable' of https://github.com/CyferShepard/Jellystat into unstable 2024-01-17 18:25:36 +02:00
Thegan Govender
071eb79cfc Fix for fetchItem Endpoint
fetchItem endpoint was broken during Jellyfin API refactorization, this fixes the endpoint
2024-01-17 18:25:22 +02:00
Antoine Labarussias
0d33bf907a fix: add quotes to postgres user in migrations 2024-01-13 13:45:52 +01:00
Thegan Govender
1c77dfb2dd Playback tracking fix 3
Fix for Series Tracking where different episode where tracking under the same episode for that show
2024-01-11 10:57:03 +02:00
Thegan Govender
c430378c8e Logic fix for percentage in jf_recent_playback_activity 2024-01-08 18:36:38 +02:00
Thegan Govender
a07daf84f0 Playback duration check fix 1 2024-01-08 18:27:49 +02:00
Thegan Govender
c22869ad46 Playback duration check
added check to not insert activity with a playback duration of 0 seconds
2024-01-08 16:11:06 +02:00
Thegan Govender
109674151e Playback tracking fix 2
Forgot to add Userid filter when filtering out duplicate inserts
2024-01-08 12:58:41 +02:00
Thegan Govender
2575b8bbab Playback tracking fix
Fix for playback tracking as i forgot to filter for activity per user, old implementation found the latest record for the item regardless of user and updated that
2024-01-08 11:54:17 +02:00
Thegan Govender
af1214e763 Playback tracking rework
This rework looks for existing playback records based on the following criteria:
activity matching `NowPlayingItemId` within the last 1 hour with Playback progress <=80%

if theres a matching record:
update the PlaybackDuration to be existing PlaybackDuration + new PlaybackDuration progress

Update ActivityDateInserted to current time

Related issues: #56 #116
2024-01-08 09:03:40 +02:00
Thegan Govender
2ca4305ee5 Merge pull request #144 from simoncaron/feature/implement-dns-caching
[Feature] Implement DNS Caching of HTTP Queries
2023-12-24 15:24:56 +02:00
Thegan Govender
21a97c8066 Update api.js
Code to improve url handling in validation script
2023-12-13 08:54:21 +02:00
Simon Caron
5bcf8ae51a Implement DNS Caching with cacheable-lookup 2023-12-10 14:33:39 -05:00
Thegan Govender
7a496c70a8 Fix for session.filter error #137 2023-12-10 18:30:42 +02:00
Thegan Govender
95ab3c0e9d added version number to isConfigured 2023-12-07 14:18:49 +02:00
Thegan Govender
8c8c8809aa Logging fixes for sync 2023-12-06 13:45:19 +02:00
Thegan Govender
9e4b8d1837 Update api.js
Fix for invalid syntax from query builder when building purge cached data query
2023-11-29 20:19:31 +02:00
Thegan Govender
6933813f9a Fix for Error 403 on First time setup
Fix for Error 403 on First time setup by dynamically checking the config status and allowing the config status to exist at multiple stages of the setups vs at the last stage of configuration

Fix sync logs missing as logging was not awaited on insert

Cleaned up some logging code in the db class
2023-11-29 19:04:34 +02:00
Thegan Govender
e146260572 Version bump and minor changes
Incremented version to 1.0.9
Updated dockerfile to run build to generate static webpages
Fixed missing parameter REQUIRE_LOGIN from config payload
2023-11-28 18:48:06 +02:00
Thegan Govender
fab97c4a7b Cleanup first time setup and sync logic
Fixed checks and triggers for First time setup and sync processes so that sync wont run until setup is complete
2023-11-27 20:58:31 +02:00
Thegan Govender
4cf53f6356 Fix broken first time setup
Issues resulting in a buggy first time setup due to factorized code changes have been fixed
2023-11-27 16:45:45 +02:00
Thegan Govender
47190673a8 Update api.js
fix axios import
2023-11-27 10:56:10 +02:00
Thegan Govender
c284d59454 Fix for incorrect stat count
Forgot to add archived items exclusion when tallying stats
This feature has been extended to seasons and seasons/episodes as some episodes may be archived but not the entire show
2023-11-26 20:06:33 +02:00
Thegan Govender
0035a1cc08 Refactorized code
Cleaned up Jellyfin calls and stored them in a Jellyfin Class to be called globally. Also added better error handling for jellyfin api network responses

Reduced config error handling by moving this code to a central Config class

refactored https instance of axios into a new class reducing the need to recreate the https agent where needed

General comments and code clean-up

Removed Data Debugger as it hasn't been maintained and no longer servers a purpose

CSS fixes on session card
2023-11-25 14:13:16 +02:00
Thegan Govender
fa15e62d87 Session Card css fixes
Session Card css fixes
Refactored the syncitemInfo method to fetch data and then write in bulk vs writing on every fetch
2023-11-22 19:14:24 +02:00
Thegan Govender
4f11a75a4e Update sync.js
code/comment cleanup
2023-11-20 22:00:41 +02:00
Thegan Govender
9d5a5e1ee1 Fixed Partial Sync issues
Fixed some logic that was causing show items to sync during partial sync but then get removed when the clean-up script was run.

This was due to the Show filter used to reduce the number of shows scanned but a scenario was found where:

Recently added returns an episode and not the corresponding series item.  The filter would then prevent the episode from syncing as the filter excluded it based on the missing Show ID.  Then once the item info sync ran, the item info would insert without the corresponding item id.

The cleanup looks for this scenario where theres info items without corresponding items and cleans them out.
2023-11-20 21:56:52 +02:00
Thegan Govender
6332a81924 Update sync.js
FIxed update/insert counter to accurately reflect transactions
removed unreachable code in item sync
2023-11-20 20:23:50 +02:00
Thegan Govender
f9f5c34792 logic fixes for archiving items in archived library
Now items inside a library will only be archived if the library is deleted.

If it was excluded but still exists on jellyfin then the items inside wont be archived

Amended bulk upload conflict query for libraries table to revert archived bit to false if data is updated
2023-11-20 11:22:19 +02:00
Thegan Govender
324f173e3e added archiving feature to libraries
added archiving flag to libraries. If a library is deleted or excluded the entire library and its contents are archived when the sync process is run

Added archive toggle in libraries to show/hide archived libraries

Still need to add functionality to bulk purge archived data for a library or for selected items in the library.

cleaned up duplicate statement in migration 46

uncommented backwards navigation code when purge completes
2023-11-20 10:59:12 +02:00
Thegan Govender
a74ce2b09e Task Interval Changes
increased default task delay to 1 hour
tweaked update logic on task panel
2023-11-20 09:42:11 +02:00
Thegan Govender
837dd18014 Sync Changes
Added Sync feature to only sync Recently Added Items that don't exist in the database (this will not update existing data), default interval now set to 15 Minutes

Renamed existing sync to Full sync (should function exactly the same), default interval now set to 1 day

Reworked handling of items no longer on jellyfin. Items are no longer deleted but are now marked as archived so that we can still view their items when looking at Playback Activity.

Added options to purge Archived data. This will either purge just the item (including seasons and episodes if its a show) or the item plus all related watch activity
2023-11-19 22:17:36 +02:00
Thegan Govender
ad8ea58428 swagger changes
fix for pagination when using larger items per page count
2023-11-15 21:36:43 +02:00
fuzz
26adf3ba7a fix for vite env prefixes 2023-11-15 15:55:59 +00:00
fuzz
cef9d6de80 update example env 2023-11-15 15:12:14 +00:00
Thegan Govender
85e4cd6e92 updated ports in swagger docs 2023-11-11 17:22:26 +02:00
Thegan Govender
e63f52e2fb Added .dockerignore file to speed up local image builds
Changed Dockerfile as previos file was failing to build consistently
removed some unused packages
added compression to json payloads
changed vite ports to 3000 to not break existing builds
backend and frontend both use port 3000 now
2023-11-11 17:06:44 +02:00
c4lyp5o
2bdd91af59 chore: housekeeping
added some signboard
ordering of app
appended [JELLYSTAT] to console.log
added indication if database already exists
2023-11-08 12:29:22 +08:00
c4lyp5o
d2b07733cd feat: .env.example and vite config
added example
added comments in vite config for clarification
2023-11-07 16:58:31 +08:00
c4lyp5o
d986cd5b71 fix: deployment changes
disables x-powered-by
set up local deployment environment
some prettier cleanups
add dotenv for local .env usage
2023-11-07 16:49:17 +08:00
c4lyp5o
c0c9d11360 style: readability
a few spaces here and there
prettier formatting
2023-11-07 16:47:39 +08:00
fuzz
300c6d5dfd update ipv4 regex
- filter out local ip addresses
- do not show modal for local ip addresses, only remote
- tooltip to show local/remote
2023-11-03 17:03:50 +00:00
fuzz
c1d3dec173 use proxy, set up modal in frontend
Add row to session card with IP Address. Clickable, opens modal.

Modal WIP - displays general info about IP location (maybe can include a map within this modal?)
2023-10-25 18:07:47 +01:00
fuzz
5e238fdad2 initial commit
needs work - currently just an api endpoint that will return geolocation data for a given IP.
ToDo:
- Display IP in session-card
- Clicking IP opens modal with geolocation info
2023-10-25 16:23:25 +01:00
Thegan Govender
9ae192f308 Merge pull request #109 from DaftFuzz/bugfix/variables-casing
Bugfix/variables casing
2023-10-18 13:05:35 +02:00
fuzz
0158edb3e3 fix casing
Variables were not defined with correct casing, resulting in exceptions
2023-10-18 11:39:44 +01:00
Thegan Govender
aef4a08e32 Merge pull request #105 from CyferShepard/main
bring in new changes to unstable
2023-10-14 16:04:16 +02:00
Sylvain Blanc
e443ee55bf sql injection is openbar 2023-10-13 08:38:00 +02:00