From 1550be76f02b36ce46966288f216933cd958d88c Mon Sep 17 00:00:00 2001 From: Ville Nummela Date: Fri, 6 Oct 2023 16:40:19 +0300 Subject: [PATCH] Remove python webserver As Amber Web Authorization framework already provides callback webserver, python implementation is no longer needed. Signed-off-by: Ville Nummela --- harbour-tooterb.pro | 2 -- qml/lib/index.html | 26 ------------------------ qml/lib/server.py | 43 ---------------------------------------- rpm/harbour-tooterb.spec | 1 - 4 files changed, 72 deletions(-) delete mode 100644 qml/lib/index.html delete mode 100644 qml/lib/server.py diff --git a/harbour-tooterb.pro b/harbour-tooterb.pro index f31f4d4..12f593c 100644 --- a/harbour-tooterb.pro +++ b/harbour-tooterb.pro @@ -74,8 +74,6 @@ DISTFILES += qml/harbour-tooterb.qml \ qml/pages/LoginPage.qml \ qml/pages/Browser.qml \ qml/lib/API.js \ - qml/lib/server.py \ - qml/lib/index.html \ qml/images/icon-s-following \ qml/images/icon-s-bookmark \ qml/images/icon-m-bookmark \ diff --git a/qml/lib/index.html b/qml/lib/index.html deleted file mode 100644 index 1e3f3a1..0000000 --- a/qml/lib/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -

Login Complete

- - diff --git a/qml/lib/server.py b/qml/lib/server.py deleted file mode 100644 index 716658b..0000000 --- a/qml/lib/server.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- - -# POETASTER -import sys -sys.path.append('/usr/share/harbour-tooterb/qml') -sys.path.append('/usr/share/harbour-tooterb/qml/lib') -sys.path.append('/usr/share/harbour-tooterb/qml/pages') - -# POETASTER - -import pyotherside -import threading -import time -import random -import os -import http.server -import socketserver - -PORT = 8000 -directory = '/usr/share/harbour-tooterb/qml/lib' -Handler = http.server.SimpleHTTPRequestHandler -os.chdir(directory) - -def serveMe(): - with socketserver.TCPServer(("", PORT), Handler) as httpd: - print("serving at port", PORT) - pyotherside.send('finished', PORT) - httpd.serve_forever() - -class Downloader: - def __init__(self): - # Set bgthread to a finished thread so we never - # have to check if it is None. - self.bgthread = threading.Thread() - self.bgthread.start() - - def serve(self): - if self.bgthread.is_alive(): - return - self.bgthread = threading.Thread(target=serveMe) - self.bgthread.start() - -downloader = Downloader() diff --git a/rpm/harbour-tooterb.spec b/rpm/harbour-tooterb.spec index ae277b4..4b54440 100644 --- a/rpm/harbour-tooterb.spec +++ b/rpm/harbour-tooterb.spec @@ -22,7 +22,6 @@ Source0: %{name}-%{version}.tar.bz2 Requires: sailfishsilica-qt5 >= 0.10.9 Requires: nemo-qml-plugin-configuration-qt5 Requires: nemo-qml-plugin-notifications-qt5 -Requires: pyotherside-qml-plugin-python3-qt5 Requires: amber-web-authorization BuildRequires: qt5-qttools-linguist