From 2e27ae8f72e77be175594115103bd06a1acfde68 Mon Sep 17 00:00:00 2001 From: flaskfarm Date: Fri, 21 Oct 2022 01:41:49 +0900 Subject: [PATCH] update --- .gitignore | 4 +- lib/framework/init_plugin.py | 8 + lib/framework/static/js/ff_common1.js | 5 +- lib/framework/static/js/ff_global1.js | 4 +- lib/framework/static/js/ff_ui1.js | 4 + lib/framework/templates/macro.html | 44 +- lib/framework/templates/macro_include.html | 38 +- lib/framework/util.py | 14 - lib/plugin/create_plugin.py | 1 + lib/plugin/route.py | 20 +- lib/support/base/{ffmpeg.py => __ffmpeg.py} | 0 lib/support/base/file.py | 90 ++++- lib/support/base/sub_process.py | 40 +- lib/support/expand/__init__.py | 0 lib/support/expand/ffmpeg.py | 425 ++++++++++++++++++++ lib/support/{tool => expand}/gsheet_base.py | 18 +- lib/support/logger.py | 4 +- lib/support/site/tving.py | 17 +- lib/support/tool/__init__.py | 1 - lib/tool_base/file.py | 9 - 20 files changed, 603 insertions(+), 143 deletions(-) rename lib/support/base/{ffmpeg.py => __ffmpeg.py} (100%) create mode 100644 lib/support/expand/__init__.py create mode 100644 lib/support/expand/ffmpeg.py rename lib/support/{tool => expand}/gsheet_base.py (97%) delete mode 100644 lib/support/tool/__init__.py diff --git a/.gitignore b/.gitignore index 3711042..10a95a6 100644 --- a/.gitignore +++ b/.gitignore @@ -142,4 +142,6 @@ pre_start.sh false *copy.py *.sh -data/ \ No newline at end of file +data/ +lib/support/site/tving.py +lib/support/site/wavve.py diff --git a/lib/framework/init_plugin.py b/lib/framework/init_plugin.py index cde1c49..6ef627f 100644 --- a/lib/framework/init_plugin.py +++ b/lib/framework/init_plugin.py @@ -388,3 +388,11 @@ class PluginManager: except Exception as exception: F.logger.error('Exception:%s', exception) F.logger.error(traceback.format_exc()) + + + @classmethod + def get_plugin_instance(cls, package_name): + try: + return cls.all_package_list[package_name]['P'] + except: + pass diff --git a/lib/framework/static/js/ff_common1.js b/lib/framework/static/js/ff_common1.js index e043560..8800ff5 100644 --- a/lib/framework/static/js/ff_common1.js +++ b/lib/framework/static/js/ff_common1.js @@ -110,8 +110,9 @@ function showModal(data='EMPTY', title='JSON', json=true) { document.getElementById("modal_title").innerHTML = title; if (json) { data = JSON.stringify(data, null, 2); - } - document.getElementById("modal_body").innerHTML = "
"+ data + "
";; + } + document.getElementById("modal_body").innerHTML = '
' +data + '
'; + $("#large_modal").modal(); } diff --git a/lib/framework/static/js/ff_global1.js b/lib/framework/static/js/ff_global1.js index 501281f..ae3cca9 100644 --- a/lib/framework/static/js/ff_global1.js +++ b/lib/framework/static/js/ff_global1.js @@ -146,8 +146,8 @@ function globalSendCommand(command, arg1, arg2, arg3, modal_title, callback) { dataType: "json", success: function (ret) { if (ret.msg != null) notify(ret.msg, ret.ret); - if (ret.modal != null) m_modal(ret.modal, modal_title, false); - if (ret.json != null) m_modal(ret.json, modal_title, true); + if (ret.modal != null) showModal(ret.modal, modal_title, false); + if (ret.json != null) showModal(ret.json, modal_title, true); if (callback != null) callback(ret); } }); diff --git a/lib/framework/static/js/ff_ui1.js b/lib/framework/static/js/ff_ui1.js index f2a0494..771c95e 100644 --- a/lib/framework/static/js/ff_ui1.js +++ b/lib/framework/static/js/ff_ui1.js @@ -1,3 +1,7 @@ +/* +
+ +*/ function j_button_group(h) { var str = '
'; str += h diff --git a/lib/framework/templates/macro.html b/lib/framework/templates/macro.html index 748ba3f..45073c0 100644 --- a/lib/framework/templates/macro.html +++ b/lib/framework/templates/macro.html @@ -36,7 +36,7 @@
{% endmacro %} -{% macro m_tab_head2(name, title, active) %} +{% macro m_tab_head(name, title, active) %} {% if active %} {{title}} {% else %} @@ -176,21 +176,26 @@ {% macro setting_input_textarea_and_buttons(id, left, buttons, value='', col='9', row='3', desc='', disabled=False) %} {{ setting_top(left) }}
- -
- {% for b in buttons %} - - {% endfor %} +
+
+ +
+
+
+ {% for b in buttons %} + + {% endfor %} +
{{ setting_bottom(desc) }} @@ -370,13 +375,6 @@ option을 script로 넣을 때 사용 -{% macro m_tab_head(name, active) %} - {% if active %} - {{name}} - {% else %} - {{name}} - {% endif %} -{% endmacro %} {% macro setting_radio(id, title, radios, value=None, desc=None, disabled=False) %} {{ setting_top(title) }} diff --git a/lib/framework/templates/macro_include.html b/lib/framework/templates/macro_include.html index 95daeef..691b632 100644 --- a/lib/framework/templates/macro_include.html +++ b/lib/framework/templates/macro_include.html @@ -20,22 +20,7 @@
- +