Skip to content
Snippets Groups Projects
Commit e8cdd6a0 authored by don's avatar don
Browse files

Took out a lot of debug printing

parent 46ac3dae
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,6 @@ def writescript(scriptpath, content):
def processfile(f):
global videolist
print('processfile start', f)
filepath = os.path.join(contentbase, f)
sb = os.stat(filepath)
filetype = ms.file(filepath)
......@@ -125,7 +124,6 @@ def processfile(f):
thisstatus = filestatus[f]
if (thisstatus['s'] == sb.st_size) and (thisstatus['m'] == sb.st_mtime) and (thisstatus['t'] == filetype):
# exact match, do not need to process this file
print('exact', f)
# See if it is video or slides
if thisstatus['v']:
# Mark this video to get played
......@@ -137,14 +135,12 @@ def processfile(f):
return
else:
# something has changed
print('changed', f)
filestatus[f]['s'] = sb.st_size
filestatus[f]['m'] = sb.st_mtime
filestatus[f]['t'] = filetype
filestatus[f]['v'] = False
else:
# new file, no status record yet, so make one
print('new', f)
filestatus[f] = {}
filestatus[f]['s'] = sb.st_size
filestatus[f]['m'] = sb.st_mtime
......@@ -168,7 +164,6 @@ def processfile(f):
if direct:
# files that can be displayed directly just need to be copied into place
print('direct', filepath)
tmpcopy(f)
subprocess.call(['/bin/cp', '-p', '-f', filepath, destpath])
keepslides[f] = True
......@@ -187,15 +182,12 @@ def processfile(f):
elif video:
videolist += [f]
else:
print('unknown', filepath)
print(filetype)
print(f, filetype, direct, video)
print('unknown', filepath, filetype)
filelist = tmpmove(direct)
filestatus[f]['f'] = filelist
for i in filelist:
keepslides[i] = True
filestatus[f]['v'] = video
print('processfile done', f)
# end of functions, main program starts here
......@@ -235,9 +227,6 @@ for confline in confdata[1:]:
slide_rate = setparam('slide_rate')
check_time = setparam('check_time')
print('slide_rate', slide_rate)
print('check_time', check_time)
# Examine and process all content files
contentfiles = os.listdir(contentbase)
contentfiles.sort()
......@@ -260,8 +249,6 @@ writescript(loopfile, loopscript)
waitscript = waittemplate % check_time
writescript(waitfile, waitscript)
print('keepslides', keepslides)
# final cleanup, delete obsolete slides
# Get list of slide files
files = os.listdir(slidebase)
......@@ -270,7 +257,6 @@ for f in files:
if f not in keepslides:
try:
os.unlink(os.path.join(slidebase, f))
print('unlink slide', f)
except:
pass
......@@ -282,7 +268,6 @@ for s in filestatus.keys():
for s in deletekeys:
del filestatus[s]
print('delete status', s)
# Write new status file
stf = open(statusfile, 'wb')
......@@ -291,7 +276,7 @@ stf.close()
# If requested, upload rendered slides for verification
try:
updst = remote + parmeters['verify_folder']
updst = remote + parameters['verify_folder']
doupload = rclonebase + [slidebase, updst]
subprocess.call(doupload)
except:
......
slides/background.png

5.96 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment