Skip to content

Commit

Permalink
Changed indexing from files to folder. Hope this works! :)
Browse files Browse the repository at this point in the history
  • Loading branch information
khellang committed Aug 2, 2011
1 parent 9844675 commit bcc4949
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/lib/cron/renamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ def doRename(self):
# Notify Synoindex
log.debug('Synoindex')
synoindex = Synoindex()
for file in finalDestination['filenames']:
synoindex.addToLibrary(os.path.join(finalDestination['directory'], file))
synoindex.addToLibrary(finalDestination['directory'])

else:
path = movie['path'].split(os.sep)
Expand Down
4 changes: 2 additions & 2 deletions app/lib/synoindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def __init__(self):
def conf(self, options):
return cherrypy.config['config'].get('Synoindex', options)

def addToLibrary(self, movie_name):
def addToLibrary(self, folder_name):
if not self.enabled:
return

synoindexCommand = ['/usr/syno/bin/synoindex', '-a', movie_name]
synoindexCommand = ['/usr/syno/bin/synoindex', '-A', folder_name]
log.info(u"Executing synoindex command: "+str(synoindexCommand))
try:
p = subprocess.Popen(synoindexCommand, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
Expand Down

0 comments on commit bcc4949

Please sign in to comment.