45 Commits

Author SHA1 Message Date
CyferShepard
6c15312bf6 updated migrations to account for migrations from unstable branch 2025-10-05 17:22:08 +02:00
56039bd3b9 Add webhook management and scheduling functionality 2025-04-25 10:53:00 +02:00
CyferShepard
607b21c542 Added Genre stats to users page #292
Added Genres to items table
enhanced db-helper to add group by
fixed bug in fb-helper where null rows triggered a not count prop error
fixed issue where no plays on user screen attempted to open the item page
updated translations for genres
2025-03-30 17:33:58 +02:00
CyferShepard
cd165a5c47 fix for #249
also fixed activity materialized view not refreshing for imported data
2025-03-07 23:14:59 +02:00
GrimJu
04ae6de886 Timeline: Improvement - start a new group if a series is interrupted by another activity 2025-02-03 08:29:42 +01:00
CyferShepard
d2aed2e0cf add migration to fix and enhance fs_get_user_activity function 2025-02-02 17:04:06 +02:00
GrimJu
4ff3449c4d Activity timeline improvements:
+ Remove sidebar link to activity timeline
+ use jf_libraries.CollectionType as MediaType instead of calculating it
+ reduce minimum playback duration to 30 seconds
2025-01-20 07:50:01 +00:00
GrimJu
30f3bbe6ee Activity timeline improvements:
+Turn cards into links that lead to the item

+Show EpisodeCount for shows

+Filter out activities under 15 minutes

+Add timeline to userInfo view
2025-01-11 20:45:33 +01:00
GrimJu
cfe36ee247 Prototype implementation of activity timeline feature 2025-01-11 03:58:28 +01:00
CyferShepard
73b35c50dc fix for Last Activity not updating in library view due to materialized view being static
Last Activity is now calculated in the select statement for that view using ActivityDateInserted
2025-01-03 20:50:59 +02:00
CyferShepard
3242e7c615 optimized materialized view for possible duplication bug with activity having the same activity date
moved refresh views trigger to code as it caused a delay on inserts/updates/deletes
2025-01-03 20:38:33 +02:00
CyferShepard
9f0c3fcb2b convert js_library_stats_overview to material view to reduce load times
added triggers on jf_playback_activity to refresh js_library_stats_overview view when data changes
2025-01-02 23:02:17 +02:00
CyferShepard
6b1d5932b6 changed grouping to be perfomed on sql to present more accurate data in tables.
added latest activity view to assist in grouping
added triggers as the view is a material view and will need to be updated when changes are made to activity table
created new view to include episode and library metadata to reduce join operations needed in query
2025-01-02 20:32:39 +02:00
CyferShepard
099fd0b149 fix for #263, default value for no activity on fs_user_stats 2024-12-03 09:33:06 +02:00
CyferShepard
242a0ae915 fix for #267 devide by 0 error 2024-11-24 16:51:28 +02:00
CyferShepard
16f239dfdd minor correction to sql script #263 2024-11-24 16:06:05 +02:00
CyferShepard
ae90929aa0 fix for #263, wrong date range was being applied 2024-11-24 15:57:51 +02:00
CyferShepard
935e9b88b7 #258 exclude archived libraries from stats on Statistics endpoint. When library is untracked, after a full sync, the library is archived 2024-10-20 18:09:25 +02:00
Gavin Mogan
1d64ba0b59 Allow overriding owner of tables during migrations 2024-09-24 23:21:22 -07:00
CyferShepard
7d798448ea Changes to Recently Added Items
Now displays Recently added to Jellystat via sync and does not only rely on an active connection to Jellyfin
It will still show items from jellyfin that have been recently added that are have the DateCreate that is Greater than the Last Date Created item in the list
2024-05-24 18:53:41 +02:00
CyferShepard
b79cee28b8 Fix to address multiple insert issue #183 2024-04-30 13:57:53 +02:00
CyferShepard
eb0b901d89 fixes to prevent updating existing records with playback greater than item duration 2024-04-07 16:54:24 +02:00
CyferShepard
6342610e84 Refactor variable names for clarity and consistency 2024-04-02 08:05:29 +02:00
CyferShepard
f245b86eab added DateCreated field 2024-03-30 13:28:57 +02:00
CyferShepard
abe845cb39 Tweaks to not process unmatched data
Activity Monitor tweaks
2024-03-17 00:39:35 +02:00
Thegan Govender
fbbe3670e5 bug fix for signup process resulting in multiple config rows and getting stuck on step 2/2
API change for updating user details
added ability to edit username
fixed weird bug with vite proxy
updated translations
2024-03-09 17:48:45 +02:00
Thegan Govender
74a3dab699 Fix sorting in last user activity view
added ip-info to the activity tables
added google maps integration
refactored ip-info element to be more reusable
2024-02-29 11:03:35 +02:00
Thegan Govender
bb123c5dcd Add sorting option for Size in LibraryItems component
Added Size Indicator UI to Library and More Items Section
Added Episode count to Season View
Added Traversal to Library Items
Added Size view for Seasons and Shows
Fixed Fetch Item Button for missing content
2024-02-27 12:16:36 +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
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
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
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
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
1b67bd8482 Playback Reporting Plugin
Added support for the Playback Reporting Plugin.

This will only import data from this table that is older then the first record captured by Jellystat to prevent duplication.

This means that it will not import any data going forward. its only meant to import old data to have parity with your old watch logs.

Due to the limited set of information logged by the plugin, you may notice some information that's missing when compared to data logged by Jellystat.

Other changes:
ServerId column added as the foundation for future updates that may or may not include multiple server support. This addition is the most crucial and is why it was added now and not held for future change sets.
2023-07-09 01:23:57 +02:00
Thegan Govender
e7912397d2 Code clean-up + API Keys
Cleaned up redundant code and moved around classes to be better grouped eg routes folder

Moved endpoints to other route files to better represent their actions

Removed redundant endpoints

Renamed endpoints to be more meaningful

Added API Key authorisations to utilize the API outside of Jellystat UI (Still need to document Endpoints)

Added new column to app_config to store api keys

New API Section under settings

Updated backups route name
2023-07-01 22:52:19 +02:00
Thegan Govender
1fc57445cd backend changes to improve sync
Reworked library view script,this reduces page load time by 90%
catered for new episodes in recently added feed.
Underlying work done for toggle to untrack certain libraries
General ui fixes
Backup files now limited to latest 5 files
Updated compose to have a limit on log files and sizes (Thanks @Hutch79)
2023-06-24 23:56:58 +02:00
Thegan Govender
6620b85e22 Update 038_jf_playback_activity_add_stream_data_columns.js 2023-06-18 22:21:49 +02:00
Thegan Govender
550e1d3f7c v1.0.4.10 Beta 2023-06-18 21:02:18 +02:00
Thegan Govender
5d529aab30 begin implementation of plugin data
Started on the process of importing plugin data from JF Reporting Plugin
Data is stored in a separate table and will be used in a new view to allow for this data to work in conjunction with the data captured by JFStat. These new views will be finalized and released in the next push.

Reworked watchdog function to use a unique uuid instead of the session id as it is not unique and seems to be causing issues regardless of no pk constraints
Also decided to use moments to get accurate timezone data

Changed item info to sync only items without item info. This is temporary to reduce the load of subsequent syncs until we can optimize this function

Minor changes to front end ui linkages and added open on jellyfin link on item details page
2023-04-20 21:46:05 +02:00
Thegan Govender
a87dd2c0d5 fixed migration sequence
Had duplicate migration sequences

Minor css changes and link rewrites to take you the specific item in the library overview for last watched items
2023-04-16 20:55:05 +02:00
Thegan Govender
692d0c8ec0 Item Cards and stats
Added drill down views for individual items

Created view to see basic metadata for libraries

Created Table to store item metadata such as file size and codec support

Scrape and display File and library sizes

Removed a redundant view(TBH there's still alot left)

Amended some UI elements

Started work on backup code WIP (Does not work)

Changed out Nivo to recharts for stat graphs to remove <0 behaviour of charts
2023-04-15 23:04:25 +02:00
Thegan Govender
590ae82f85 DB Migrations
Implemented better Database initializations and migrations.

No longer dependent on default postgres user and set owner to POSTGRES_USER
2023-04-08 13:07:23 +02:00