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

Support request - Could not locate record in 'media_parts' where 'file' #130

Open NicoLeOca opened 4 years ago

NicoLeOca commented 4 years ago

Hi @l3uddz

Sorry if I post a request for support here, I went to discord twice in a week and didn't get support there. Could you please help me?

I also found a similar issue on github but it didn't help either https://github.com/l3uddz/plex_autoscan/issues/35

I keep getting this issue here:

Line 1 : 2019-12-21 09:46:32,889 - ERROR - PLEX [139687123838720]: Could not locate record in 'media_parts' where 'file' = '/home/nicoleoca/cloud-media-scripts/media/Movies/1080p/Fantastic Beasts and Where to Find Them (2016)/Fantastic.Beasts.and.Where.to.Find.Them.2016.MULTi.Truefrench.1080p.BluRay.Remux.AVC.NoTag.mkv' after 5 tries 

I have made many changed to my config file without success Can you please have a look at my logs and config below and guide me a bit?

logs: https://pastebin.com/SQr8tuHm

config: https://pastebin.com/S8JY0uzN

Thank you

jennec commented 4 years ago

I have the same issue.

I've only just setup PlexAutoScan and from what i can tell it doing its job. The problem seems to be that the Plex Media Scanner is not actually scanning the media. Therefore when PlexAutoScan tries to analyze the file it thinks it just added Plex Media Scanner can't find it and this is where the error: "Could not locate record in 'media_parts' where 'file' = " appears.

The Plex Media Scanner, when run manually with the same command as PlexAutoScan uses returns no results. There is no out put on screen, nothing in the plexmediascanner logs, and nothing appears in the Plex Library. I am not sure if there should be though.

I would suggest the following to amendments to PlexAutoScan to make this clearer:

jbh-cloud commented 3 years ago

@jennec did you manage to work around this in the end? I've having the exact same issue.

Weird thing is its only happening for a new library i've created for music. All my other libraries are all working and following the same paths etc. so can't find a difference between them apart from the issue library being newer?