I need to modify the scanner to add my own rules, where is the file that I need to edit to add my keywords to filter?
Will it be in this folder?
~/Library/Application Support/Plex Media Server/Plug-ins/Scanners.bundle and show the content
Or second option, is it difficult to create my own scanner ?
I’d recommend the Developer’s Scanners forum if you’re looking to work on your own scanner.
Or I can move the topic for you. 
Modifying the scanner isn’t hard, if you know python at all. (Do recognize that the scanners aren’t the same as meta-data agents). Modifying the scanner is a lot easier than modifying an agent.
First, look at the default scanner in ~/Library/Application Support/Plex Media Server/Plug-ins/Scanners.bundle. Right-click on the bundle, and buried in there you’ll find the Plex Movie Scanner.py.
Copy that file to ~/L/AP/PMS/Scannners/Movies, rename it to something different, and modify it to your heart’s content. Then when you go into PMM, it will show up as an option.
Thank you :)
Do you know what I have to modify to filter the keywords "Walt Disney XXX" (XXX is a number as 001, 002)
Because I have a lot of disney's movie and they're named like this.
Example: Walt Disney 114 - A Christmas Carol - is not recognized by my metadata agent because "Walt Disney XXX" is not cleaned.
So I have to fix it manually and I have over a hundred Disney's movie.
Hmm. It’s been a while since I looked at it, but I think that actually falls under the purview of the metadata agent. I thought at first that you were wanting to filter/ignore some files entirely.
The scanner is responsible for coming up with titles for the metadata agents to search for. I’ve heard quite a few requests for this Walt Disney thing, so I’m thinking it might be a reasonable thing to toss in. I’m not sure what all the different forms of these titles are, however.
Why not just filter the keyword “Walt Disney” like “bluray” or “dvd” and the 3 characters that follow ?
Such filtering has to be done very carefully. For example, there is a movie called "The Walt Disney Story (1973)" so if filtering naively, we'd end up with "The Story". If were were only looking for it at the start, someone might have it named "Walt Disney Story.mkv" and then we'd end up with "Story.mkv". And not everything has the files in the format "Walt Disney - xxx - " either.
I'm not trying to be obstructionist here, merely pointing out that such endeavors should be undertaken with more than a modicum of caution.
Is it possible to add a feature that would allow each user to add their own keywords to filter?
And is it possible to filter numbers like “001” or “XXX” ?
I have the same problem. I’ve tried to make it work this way:
- Coppied the “Plex Movie Scanner.py” from the Scanners.bundle to ~/Library/Application Support/Plex Media Server/Scanners/Movies/
- Renamed it to something like " Custom Plex Movie Scanner.py"
and what i want is to filter out if the filename starts with "01. ", "02. " and so on. i have no prior knowledge of Python but some knowledge of other languages, but i tried to add these lines after line #76 (file = os.path.basename(i)):
if re.match('[0-9]{2}\.',file)<br />
file = file[3:]
so the whole block looks like this:
# Make movies!<br />
for i in files:<br />
file = os.path.basename(i)<br />
if re.match('[0-9]{2}\.',file)<br />
file = file[3:]<br />
(name, year) = VideoFiles.CleanName(os.path.splitext(file)[0])
this doesn't seem to work, so i guess i'm not right and i don't know how to debug it. can anyone help me out?
I'm new to Python myself, but could the problem be that you forgot the : at the end of the if-statement? Like so:
if re.match('[0-9]{2}\.',file):
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.