Skip to content
This repository was archived by the owner on Feb 22, 2025. It is now read-only.

Commit 38994d4

Browse files
authored
Merge pull request #817 from rix1337/dev
Fix #816
2 parents 41f49a6 + 832a256 commit 38994d4

File tree

6 files changed

+49
-49
lines changed

6 files changed

+49
-49
lines changed

feedcrawler/providers/shared_state.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ def set_initial_values():
4444
gui_enabled = False
4545
else:
4646
gui_enabled = True
47+
update("connected", False)
4748
update("gui", gui_enabled)
4849
update("gui_active_in_tray_and_browser_opened_for_config_once", False)
4950
update("ww_blocked", False)
5051
update("sf_blocked", False)
5152
update("user_agent",
52-
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 "
53-
"Safari/537.36")
53+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36")
5454

5555

5656
def set_files(config_path):

feedcrawler/providers/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
def get_version():
11-
return "21.0.2"
11+
return "21.0.3"
1212

1313

1414
def create_version_file():

feedcrawler/run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def main():
104104
else:
105105
myjd_config(port, local_address, shared_state)
106106

107-
shared_state.update("connected", False)
108107
process_jdownloader = multiprocessing.Process(target=jdownloader_connection,
109108
args=(shared_state_dict, shared_state_lock))
110109
process_jdownloader.start()
@@ -131,13 +130,14 @@ def main():
131130
if arguments.delay:
132131
delay = int(arguments.delay)
133132
else:
134-
delay = 60
133+
delay = 10
135134

136135
if not os.environ.get('GITHUB_ACTION_PR'):
137136
try:
137+
time.sleep(delay)
138138
while not shared_state.values["connected"]:
139139
print(f"Verbindung zu JDownloader noch nicht hergestellt - verzögere Suchlauf um {delay} Sekunden")
140-
time.sleep(60)
140+
time.sleep(delay)
141141
except KeyboardInterrupt:
142142
sys.exit(1)
143143

@@ -197,13 +197,13 @@ def jdownloader_connection(shared_state_dict, shared_state_lock):
197197
set_device_from_config()
198198
connection_established = shared_state.get_device() and shared_state.get_device().name
199199
if connection_established:
200-
shared_state.update("connected", True)
201200
break
202201
except KeyboardInterrupt:
203202
sys.exit(1)
204203

205204
if connection_established:
206205
print(f'Erfolgreich mit My JDownloader verbunden. Gerätename: "{shared_state.get_device().name}"')
206+
shared_state.update("connected", True)
207207
else:
208208
print('My JDownloader Zugangsversuche nicht erfolgreich! Beende FeedCrawler!')
209209
sys.exit(1)

0 commit comments

Comments
 (0)