237 Commits

Author SHA1 Message Date
Luis Garcia
bf50defcb5 Use pathlib to extract file/folder to fix windows paths
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-09-10 21:37:17 -06:00
Luis Garcia
21c530d956 Plex: Log missing identifiers information
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-07-14 23:10:06 +00:00
Luis Garcia
142c9df6e9 Jellyfin/Emby: Log more missing identifiers information
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-07-14 22:53:00 +00:00
Luis Garcia
0de5e86837 Jellyfin/Emby: Add fallback for played percentage if missing
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-07-14 17:21:55 +00:00
Luis Garcia
5501e21aa8 Jellyfin/Emby: Use the same endpoint for marking as for partials to fix emby
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-07-12 00:14:27 +00:00
Luis Garcia
75f7f576ac Jellyfin/Emby: Sync across the view times
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-07-11 23:48:23 +00:00
Luis Garcia
bdb58918e7 Jellyfin/Emby: Log missing identifiers to debug
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-07-11 18:06:20 +00:00
Luis Garcia
c3be980eea Reuse server_1_watched history to avoid duplication
Keeps the server_1_watched history that way it does not need to fetch
the same results again each time it needs to sync to another server

Signed-off-by: Luis Garcia <git@luigi311.com>
2025-07-11 17:35:53 +00:00
Luis Garcia
9d4f3dd432 Move generate locations/guids to the class level
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-06-05 17:04:05 -06:00
Luis Garcia
544649effd Add support for env file support, set via ENV_FILE
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-05-18 20:25:13 +00:00
Luigi311
d5c36c61ec Merge pull request #277 from luigi311/error_raised
Do not fail on some errors
2025-05-15 18:25:11 -06:00
Luis Garcia
69cd73d965 Functions: Remove fstring from mark_file file path
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-05-15 03:46:51 +00:00
Luis Garcia
229ab59b44 Do not fail on some errors
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-05-15 03:38:33 +00:00
masesisaac
69958a257b fix: case-insensitive library name check 2025-04-11 00:34:10 +03:00
Luis Garcia
91ea5d76f6 Jellyfin/Emby: Add fallback to media files for library types
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-04-02 04:27:39 +00:00
Luis Garcia
d98b7c3e09 Jellyfin/Emby: Simplify get watched
Shouldn't need to do library type checks as that is handed in the
get libraries function and then used with the sync libraries name
check

Signed-off-by: Luis Garcia <git@luigi311.com>
2025-03-07 23:29:36 +00:00
Luis Garcia
e6fa8ae745 Treewide: MyPy type fixes
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-03-07 23:24:33 +00:00
Luis Garcia
5b644a54a2 Plex: Better reliability 2025-03-07 20:23:02 +00:00
Luis Garcia
5a17c5f7a1 Jellyfin/Emby: Better reliability 2025-03-07 19:34:37 +00:00
Luis Garcia
aaaa7eba70 Watched: Allow None for mediaidentifier title 2025-02-26 23:13:49 +00:00
Luis Garcia
54bd6e836f Plex: Use username for watch key if exists
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-26 22:46:16 +00:00
Luis Garcia
ea85a31d9c Move server watched log to trace
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-26 20:23:40 +00:00
Luis Garcia
d15759570e Reconfigure the logger on each loop so the logs are rotated on each run
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-23 19:42:55 +00:00
Luis Garcia
c62809c615 More logging
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-23 00:15:14 +00:00
Luis Garcia
fcd6103e17 Docker: Set default env values to prevent issues
Set default values to prevent issues where it thinks values are set and
causing json read errors

Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-21 23:36:19 -07:00
Luis Garcia
c9944866f8 Remove extra print
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-21 19:51:34 -07:00
Luis Garcia
8503b087b2 Fix logfile
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-21 16:59:50 -07:00
Luis Garcia
588c23ce41 Switch logging to loguru
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-21 16:03:29 -07:00
Luis Garcia
de32d59aa1 Better initial library filtering
Filter for only tv shows and movie type libraries in plex and jellyfin.
Jellyfin no longer require pulling in multiple different items and
instead use the actual library category

Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-21 14:41:42 -07:00
Luis Garcia
998f2b1209 Formatting
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-21 14:41:19 -07:00
Luis Garcia
f3801a0bd2 Plex: only fetch watched or partially watched episodes
Instead of fetching all episodes and checking if watched or view time it
is faster to search for only watched and partially watched episodes.

Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-19 13:52:05 -07:00
Luis Garcia
4d0f1d303f Plex: Remove logging if locations or guids
Remove the logging of if an item has locations or guids as that
forces a fetch of that data which defeats the purpose of generate
guid/location variables

Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-19 12:44:21 -07:00
Luis Garcia
ce5b810a5b Use pydantic for structure
Complete redesign of everything using pydantic to create the
watched structure. This brings in type checking support and
simplifies a lot of things

Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-19 10:51:10 -07:00
Luis Garcia
bf633c75d1 More typing
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-18 17:59:43 -07:00
Luis Garcia
46fa5e7c9a Use list instead of tuple for servers
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-18 17:59:43 -07:00
Luis Garcia
170757aca1 Add lots of static typing
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-18 17:59:43 -07:00
Luis Garcia
e1c65fc082 Jellyfin/emby: Combine info/version, add typing for versions
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-18 17:45:21 -07:00
Luis Garcia
58749a4fb8 Plex: Improve variable names to avoid confusion
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-18 17:45:21 -07:00
Luis Garcia
51ec69f651 Simplify search_mapping
Signed-off-by: Luis Garcia <git@luigi311.com>
2025-02-18 17:45:21 -07:00
Luis Garcia
348a0b8226 Dont show error on extract show/episode/movies output dict
Signed-off-by: Luis Garcia <git@luigi311.com>
2024-11-09 13:38:59 -07:00
Luis Garcia
62d0319aad Remove unused
Signed-off-by: Luis Garcia <git@luigi311.com>
2024-10-27 18:05:27 -06:00
Luis Garcia
a096a09eb7 CI: Fix Validation. Print marklog on failed validation
Signed-off-by: Luis Garcia <git@luigi311.com>
2024-10-27 18:05:27 -06:00
Luis Garcia
7294241fed Add server type and name to marklog
Signed-off-by: Luis Garcia <git@luigi311.com>
2024-10-27 18:05:27 -06:00
Luis Garcia
30f31b2f3f Remove unused combine_watched_dicts
Signed-off-by: Luis Garcia <git@luigi311.com>
2024-10-27 18:05:27 -06:00
Luis Garcia
bc09c873e9 Simplify get watched process. Only get watched for syncing libraries
Signed-off-by: Luis Garcia <git@luigi311.com>
2024-10-27 18:05:27 -06:00
Luis Garcia
920bbbb3be Move more functions out of main 2024-09-05 16:21:06 -06:00
Luis Garcia
762e5f10da Fix typos in variables 2024-08-28 17:14:45 -06:00
Luis Garcia
27797cb361 Formatting 2024-08-28 17:14:37 -06:00
awakenedhaggis
b1639eab0f Jellyfin/Emby: Check partial sync support
- add `is_partial_update_supported` method to each class to validate given version against earliest known supported version
- add `get_server_version` to get server version number
- add `update_partial` parameter to user update function, deciding whether or not to allow partial updates
2024-07-15 11:45:43 -06:00
Luis Garcia
d30e03b702 Jellyfin: Skip partial on version lower than 10.9 2024-07-15 03:01:53 -06:00