"Season 20XX" seasons result in incorrect matching

Now you’re on your own. That stuff is incorrigible.
Layers on layers make anything tough,

I’ve shown everything matches ok when Plex is given the right top-level directory to scan at.

:frowning_face:

I’ve tried to mess about with the database and use the following to change paths but I’m not having much luck…

insert into section_locations 
select (select seq from sqlite_sequence where name = 'section_locations') as id, library_section_id, '/data/TV/TV' as root_path, available, scanned_at, created_at, updated_at 
from section_locations 
where root_path = '/mnt/unionfs/Media/TV/TV';

update sqlite_sequence 
set seq = seq + 1 
where name = 'section_locations';

UPDATE metadata_items
SET guid= replace(guid, '/mnt/unionfs/Media/TV/TV', '/data/TV/TV')
where guid like '/mnt/unionfs/Media/TV/TV/%.mp4';

UPDATE media_parts
SET file= replace(file, '/mnt/unionfs/Media/TV/TV', '/data/TV/TV')
where file like '/mnt/unionfs/Media/TV/TV/%.mp4';

UPDATE media_streams
SET url= replace(url, '/mnt/unionfs/Media/TV/TV', '/data/TV/TV')
where media_item_id in (select media_item_id from media_parts where file like '/data/TV/TV/%.mp4');

UPDATE media_items 
set section_location_id = (select id from section_locations where root_path = '/data/TV/TV') 
where id in (select media_item_id from media_parts where file like '/data/TV/TV/%.mp4');```

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.