dan-online / autopulse

💫 automated scanning tool that bridges media organizers such as Sonarr and Radarr with media servers such as Plex and Jellyfin
https://autopulse.dancodes.online
MIT License
127 stars 5 forks source link

bug: refresh and analyse settings on plex target result in error #107

Open mvanbaak opened 2 days ago

mvanbaak commented 2 days ago

Description of the bug

When I dont include those two settings under my plex target all works as expected. But since I want plex to run an analyse for new content, I need to enable them.

Steps To Reproduce

Add the following two items to your plex target:

    refresh: true
    analyze: true

Additional Information

autopulse version: 1.2.0 plex version: 1.41.1.9057

autopulse log:

2024-11-14T17:19:59.229825011+01:00 DEBUG autopulse::service::targets::plex: scanned file '/mnt/mvanbaaknas/Series/3 Body Problem (2024) [imdb-tt13016388]/Season 01'
2024-11-14T17:19:59.347064836+01:00 ERROR autopulse::service::targets::plex: failed to get item for file '/mnt/mvanbaaknas/Series/3 Body Problem (2024) [imdb-tt13016388]/Season 01': error decoding response body

Caused by:
    missing field `Media` at line 1 column 2097
2024-11-14T17:19:59.369955219+01:00  WARN autopulse::service::runner: retrying 1 file

record as sent to autopulse:

{"id":"5092b121-b93d-4ac5-8a65-ef3f41d68dc5","event_source":"bazarr","event_timestamp":"2024-11-14T16:14:51.154632","file_path":"/mnt/mvanbaaknas/Series/3 Body Problem (2024) [imdb-tt13016388]/Season 01","file_hash":null,"process_status":"pending","found_status":"not_found","failed_times":0,"next_retry_at":null,"targets_hit":"","found_at":null,"processed_at":null,"created_at":"2024-11-14T16:14:51.154632","updated_at":"2024-11-14T16:14:58.532694","can_process":"2024-11-14T16:19:58.528485"}

request log from my plex server:

[snip] - - [14/Nov/2024:17:19:59 +0100] "GET /library/sections HTTP/1.1" 200 6316 "-" "-" "-"
[snip] - - [14/Nov/2024:17:19:59 +0100] "GET /library/sections/13/refresh?path=%2Fmnt%2Fmvanbaaknas%2FSeries%2F3+Body+Problem+%282024%29+%5Bimdb-tt13016388%5D HTTP/1.1" 200 0 "-" "-" "-"
[snip] - - [14/Nov/2024:17:19:59 +0100] "GET /library/sections/13/all HTTP/1.1" 200 353959 "-" "-" "-"
dan-online commented 1 day ago

Seems Media is sometimes optional, should be a quick fix