l3uddz / plex_autoscan

Script to assist sonarr/radarr with plex imports. Will only scan the folder that has been imported, instead of the whole library section.
GNU General Public License v3.0
397 stars 70 forks source link

Option to add --force flag for scans? #134

Open edrock200 opened 4 years ago

edrock200 commented 4 years ago

Describe the problem For whatever reason Plex refuses to add srt external subtitles during autoscan refreshes. However if I go to the show and manually say "refresh metadata" it picks it up. I've looked at the logs from auto scan and Plex and it's properly seeing the srt (I added srt file type to Google drive Monitoring and turned off mine type checks) and Plex gets the right mapped path and the logs show it even sees the file. But I guess if the video file hasn't changed, it assumes nothing has changed and won't add the new srt.

Describe any solutions you think might work In looking at the Plex media scanner command line documentation, it looks like adding the --force flag to the request is the same as doing a manual metadata refresh on the folder/object. Could this be added as an option in the config?

Additional context If anyone has a better solution to pick up srts please let me know and thanks in advance!

edrock200 commented 4 years ago

Disregard, I tried added it to line 113 or 119 in plex.py and that flag just causes a full refresh of the entire library. I can't seem to figure out why Plex is seeing the srt's but refusing to do anything with them unless I do a "refresh metadata" manually on the show. I tried scouring the Plex logs to see if it yielded any clues as to what command it's executing when doing the manual refresh commands and it looks like it's calling for a refresh by object ID.

desimaniac commented 4 years ago

Try attempting a refresh over API. See https://github.com/l3uddz/plex_autoscan/blob/4e31fb19d81ca9d7ff0fc2f362f9accfff979bc4/plex.py#L690

edrock200 commented 4 years ago

Can you please elaborate on what you mean by this? Please pardon my ignorance, fairly new to autoscan.

zelik888 commented 2 years ago

I have the same issue. Only a force works and it causes a full refresh. I’m assuming you are using bazarr, which doesn’t know the itemID, thus we can’t use the API to refresh. Scratching my head on this one