Newbie Question : Understanding variable files in scanner

Hi there

to make things simple i start with a small scanner and try to print the files within the terminal :

Scanner is in series directory

#

Copyright © 2010 Plex Development Team. All rights reserved.

#

import re, os, os.path

import Media, VideoFiles, Stack, Utils


Look for episodes.

def Scan(path, files, mediaList, subdirs):

Scan for video files.

VideoFiles.Scan(path, files, mediaList, subdirs)

print “Path: X”, path, “Files : X”, files , “X Media : X”, mediaList ,“X Subdirs : X”, subdirs

print “gammel”

myfiles = 1

print myfiles



the variable files contains files" if the directory was never scanned, but once the scann got through the files are empty

is there a way todisable this smart scan habbit ( i guess the scanner should only have to deal with changes, but why are you touching the directotries anymway if you are not listing the files ? )

or is there something that i am doing wrong here ? ( my current workaround creating a subdir or remove it, afterwards my file variable is filled with the current files )

Any help are pretty much welcome

Best Regards

TW

Couple of possible work arounds for you.


  1. Always do a force refresh. ~/Library/Application\ Support/Plex/Plex\ Media\ Server.app/Contents/MacOS/Plex\ Media\ Scanner -sx -c SECTION_NUMBER


  2. Write your own VideoFiles.Scan equivalent using os.listdir or os.walk



    I’d go with the first one since you probably don’t want it for anything except debugging.

Thanks,

will try the first one, because as you guessed i was looking for a debug switch.

is there somewhere a documentation for theses settings and/or functions that comes with pms ?

Best Regards

TW

Run the same command but with a -h

That’ll give you a full list of options.

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