@@ -98,15 +98,16 @@ def get_new_files(lensman, session, maxt): |
||
| 98 | 98 |
files = glob.iglob('{}/*'.format(thumb))
|
| 99 | 99 |
news = [] |
| 100 | 100 |
for file in files: |
| 101 |
- filename = file.split('/')[-1]
|
|
| 102 |
- name = filename.split('.')[0]
|
|
| 103 |
- if int(name) > maxt: |
|
| 104 |
- insert_session_file(lensman, session, name) |
|
| 105 |
- news.append({
|
|
| 106 |
- 'id': name, |
|
| 107 |
- 'name': filename, |
|
| 108 |
- 'path': file.strip(ROOT_PATH), |
|
| 109 |
- }) |
|
| 101 |
+ if not file.endswith('.tmp'): # Whether 'xxx.tmp' or not
|
|
| 102 |
+ filename = file.split('/')[-1]
|
|
| 103 |
+ name = filename.split('.')[0]
|
|
| 104 |
+ if int(name) > maxt: |
|
| 105 |
+ insert_session_file(lensman, session, name) |
|
| 106 |
+ news.append({
|
|
| 107 |
+ 'id': name, |
|
| 108 |
+ 'name': filename, |
|
| 109 |
+ 'path': file.strip(ROOT_PATH), |
|
| 110 |
+ }) |
|
| 110 | 111 |
return news |
| 111 | 112 |
|
| 112 | 113 |
|