mirror of
https://github.com/nikdoof/tvorganise.git
synced 2025-12-17 20:09:23 +00:00
Moved finding files into find_files function
This commit is contained in:
@@ -207,15 +207,24 @@ class Episode:
|
||||
#end Episode
|
||||
|
||||
|
||||
###################################
|
||||
# Find all valid files
|
||||
###################################
|
||||
def find_files(loc):
|
||||
"""Recursivly finds files in a directory
|
||||
"""
|
||||
allfiles=[]
|
||||
for (path,dirs,files) in os.walk(loc):
|
||||
for file in files:
|
||||
filename = os.path.join(os.path.abspath(path), file)
|
||||
allfiles.append( str(filename) )
|
||||
#end for f
|
||||
return allfiles
|
||||
#end find_files
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
###################################
|
||||
# Find all valid files
|
||||
###################################
|
||||
allfiles = find_files(loc)
|
||||
|
||||
# Strip out dotfiles/folder.jpg
|
||||
decrappified = []
|
||||
@@ -318,3 +327,6 @@ if len(valid) > 0:
|
||||
allepisodes[showname][seasno][epno]['name'] = title
|
||||
#end for cur in valid
|
||||
print allepisodes
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user