minor bugs fixed and ignore the files .tmp
parent
9d83b9582c
commit
5667c5e2c8
|
@ -6,6 +6,7 @@ import json
|
|||
import os
|
||||
import pathlib
|
||||
import sys
|
||||
import shutil
|
||||
from copy import deepcopy
|
||||
from datetime import datetime
|
||||
from random import randint
|
||||
|
@ -84,7 +85,7 @@ class MunyalClient(Icon):
|
|||
# name="listener",
|
||||
# daemon=True)
|
||||
thread_uploader.start()
|
||||
thread_downloader.start()
|
||||
# thread_downloader.start()
|
||||
# thread_listener.start()
|
||||
|
||||
self.run(self.__run)
|
||||
|
@ -123,6 +124,7 @@ class MunyalClient(Icon):
|
|||
if data["name"] in self.ignored:
|
||||
self.ignored.remove(data["name"])
|
||||
self.stack.pop(0)
|
||||
continue
|
||||
if data["is_file"] and data["action"] == "add":
|
||||
full_path = os.path.join(folder, data["name"])
|
||||
data["file"] = base64.b85encode(
|
||||
|
@ -170,7 +172,8 @@ class MunyalClient(Icon):
|
|||
pass
|
||||
|
||||
def downloader(self, data):
|
||||
self.ignored.append(data["name"])
|
||||
name = data["name"]
|
||||
self.ignored.append(name)
|
||||
full_path = os.path.join(self.config["folder"], name)
|
||||
if data["is_file"]:
|
||||
if data["action"] == "add":
|
||||
|
|
|
@ -22,7 +22,7 @@ def get_json(path):
|
|||
items = os.listdir(path)
|
||||
try:
|
||||
for item in items:
|
||||
if item[0] != ".":
|
||||
if item[0] != "." and not item.endswith("tmp"):
|
||||
item_json = {"name": item}
|
||||
route = os.path.join(path, item)
|
||||
if os.path.isdir(route):
|
||||
|
|
Loading…
Reference in New Issue