How to install a custom scanner

scanner-agent-dev

#1

Scanners are responsible for getting your media into Plex. This is in contrast to Metadata Agents, which are responsible for getting posters, artwork, descriptions, ratings, etc.



Custom scanners live inside your Plex Media Server data directory in:



Windows:


%LOCALAPPDATA%\Plex Media Server\Scanners\



macOS / OS X:


~/Library/Application Support/Plex Media Server/Scanners/



Scanners are Python files that live in one of three subdirectories, for movies, music, and TV shows:



Movies/<br />
Music/<br />
Series/



By default, neither the "scanners" directory nor the subdirectories will exist, so you'll want to manually create them. Once you install a new scanner by dragging the file into one of these directories, you'll have something like this:



....Scanners/Music/Plex Music Scanner (no tags).py



Then restart your Plex Media Server and you'll be able to select the scanner when you create a new library.


#2

sorry I am kind of new to Plex. I created a scanner but I cannot add it to Plex. Inside this folder I cannot see anything. When I put my scanner inside I do not see it in Plex Manager.

~/Library/Application Support/Plex Media Server/Scanners/

In the other hand I tried to put it also in:

/Users/XXX/Library/Application Support/Plex/Plex Media Server.app/Contents/Resources/Plug-ins/Scanners.bundle/Contents/Resources/Movies/

Music/

Series/



but nothing happens.do I have to reboot the computer or the server? Before it worked but now I cannot make it work...

thanks


#3

Without a more detailed account of exactly what you're doing (e.g. the file you're trying to use, and exactly where you're putting it), it's hard to tell what's going wrong. You should be placing the file in ~/Library/Application Support/Plex Media Server/Scanners/, in the appropriate subdirectory, which you may have to create.



Please post more details and attach the zipped scanner file and we'll have a look!


#4

[quote name='elan' timestamp='1290682642' post='127304']


Without a more detailed account of exactly what you're doing (e.g. the file you're trying to use, and exactly where you're putting it), it's hard to tell what's going wrong. You should be placing the file in ~/Library/Application Support/Plex Media Server/Scanners/, in the appropriate subdirectory, which you may have to create.



Please post more details and attach the zipped scanner file and we'll have a look!

[/quote]




hahaha. key sentence was :"which you may have to create". Now it finally works!thanks for the replies!


#5

Is it possible to write a scanner for a content type other than Movies, Music, or Series? Like, "Photos", or any other arbitrary content type?


[quote name='elan' timestamp='1287266562' post='117611']


Scanners are Python files that live in one of three subdirectories, for movies, music, and TV shows:



<br />
Movies/<br />
Music/<br />
Series/<br />



[/quote]


#6

Elan,

Can I ask where the TheTVDB scanner that comes built into Plex resides? If I wanted to try to create one for TVRage it would be great for me to be able to see that code...thanks.



EDIT: Guess i have the terminology wrong...I am guessing i would need to create a different Metadata Agent if i wanted the scanner to work for TVRage....


#7

How do you get this working one windows? What directory do you need to copy them to?



cheers


#8

I can't get the Windows version of PMS do register new scanners. Has anyone succeeded in using a custom scanner? Pretty sure I'm in the right directory:

C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Scanners.bundle\Contents\Resources\Movies


#9

i'm also having issues with the music scanner on a windows machine. is it possible to use this scanner on the Windows PMS?


#10

[quote name='MathiasI' timestamp='1299600412' post='151584']


I can't get the Windows version of PMS do register new scanners. Has anyone succeeded in using a custom scanner? Pretty sure I'm in the right directory:

C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Scanners.bundle\Contents\Resources\Movies

[/quote]




I'm sorry, unfortunately the Windows version of PMS does not support custom scanners yet.


#11

Not having custoim scanners on windows is really bad :( Shouldn't be that hard to implement. Any idea when this might be implemented ?

thanks


[quote name='elan' timestamp='1301006447' post='157579']


I'm sorry, unfortunately the Windows version of PMS does not support custom scanners yet.

[/quote]


#12

Can somebody tell me pls how to tweak the existing "Plex Music Scanner" ?

I put in there few "print" statements but I see no difference whatsoever ?!?

DOnt understand why PMS isnt picking up the changed file (I did restart the server)

thanks


#13

Any word on when this feature is coming to windows?


#14

[quote name='naskoboy' timestamp='1301180382' post='158286']


Can somebody tell me pls how to tweak the existing "Plex Music Scanner" ?

I put in there few "print" statements but I see no difference whatsoever ?!?

DOnt understand why PMS isnt picking up the changed file (I did restart the server)

thanks

[/quote]




The python print output won't be seen on the screen directly. It usually is routed to the LOG files, located in /Library/Logs/... easier accessible using the console.app - just guessing that you are running the PMS on a Mac.

Try the "Plex Media Server" or better yet the "Plex Media Scanner.log"



As long as your new prints don't brake the scanner you really shouldn't see anything different directly in PMS. You have to check the logs.



Do you have more details on what you are doing/what you want to do? Might help for deeper answers... :-)


#15

once you make a movie folder what do you do with the text you need to write what do you need to save it has i may be a noob but your info dont explain much at all


#16

Any word on when custom scanners might be available in windows PMS?


#17

[quote name='psycik' timestamp='1332442335' post='248274']


Any word on when custom scanners might be available in windows PMS?

[/quote]




They are supported now, I'm not aware of any issues.


#18

What would you recommend reading to learn how to write a custom scanner for someone without any python experience?


#19

Just copy one and play with it. If you're familiar with other languages you can pick it up from 0 python experience.



That's what I've done.


#20

Why would a custom scanner be deleted? It works when I copy the .py file into the correct directory but after a few days I find it's been deleted. Nothing tells me why.



Although I have just scanned with it and got a "Plex Media Scanner has stopped working" - I think on thumbnail extraction. Hm nope, it's still there.



Any ideas?