Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
8e3eb9c64b | |||
e1ea88dbae |
@ -146,7 +146,10 @@ class BambuPrintPlugin(octoprint.plugin.SettingsPlugin,
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
ftp = IoTFTPSClient(f"{host}", 990, "bblp", f"{access_code}", ssl_implicit=True)
|
ftp = IoTFTPSClient(f"{host}", 990, "bblp", f"{access_code}", ssl_implicit=True)
|
||||||
timelapse_file_list = ftp.list_files("timelapse/", ".mp4") or []
|
if self._settings.get(["device_type"]) in ["X1", "X1C"]:
|
||||||
|
timelapse_file_list = ftp.list_files("timelapse/", ".mp4") or []
|
||||||
|
else:
|
||||||
|
timelapse_file_list = ftp.list_files("timelapse/", ".avi") or []
|
||||||
|
|
||||||
for entry in timelapse_file_list:
|
for entry in timelapse_file_list:
|
||||||
if entry.startswith("/"):
|
if entry.startswith("/"):
|
||||||
@ -164,7 +167,7 @@ class BambuPrintPlugin(octoprint.plugin.SettingsPlugin,
|
|||||||
"date": get_formatted_datetime(datetime.datetime.fromtimestamp(filedate)),
|
"date": get_formatted_datetime(datetime.datetime.fromtimestamp(filedate)),
|
||||||
"name": filename,
|
"name": filename,
|
||||||
"size": get_formatted_size(filesize),
|
"size": get_formatted_size(filesize),
|
||||||
"thumbnail": "/plugin/bambu_printer/thumbnail/" + filename.replace(".mp4", ".jpg"),
|
"thumbnail": "/plugin/bambu_printer/thumbnail/" + filename.replace(".mp4", ".jpg").replace(".avi", ".jpg"),
|
||||||
"timestamp": filedate,
|
"timestamp": filedate,
|
||||||
"url": f"/plugin/bambu_printer/timelapse/{filename}"
|
"url": f"/plugin/bambu_printer/timelapse/{filename}"
|
||||||
})
|
})
|
||||||
|
2
setup.py
2
setup.py
@ -14,7 +14,7 @@ plugin_package = "octoprint_bambu_printer"
|
|||||||
plugin_name = "OctoPrint-BambuPrinter"
|
plugin_name = "OctoPrint-BambuPrinter"
|
||||||
|
|
||||||
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
|
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
|
||||||
plugin_version = "0.0.21"
|
plugin_version = "0.0.23"
|
||||||
|
|
||||||
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
|
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
|
||||||
# module
|
# module
|
||||||
|
Reference in New Issue
Block a user