Skip to content

Commit

Permalink
Refactor and improve My-JDownloader integration
Browse files Browse the repository at this point in the history
This should allow for better debugging of #820

Unified "My-JDownloader" naming across codebase for consistency. Enhanced subprocess handling with improved termination logic and added safeguards for graceful shutdown. Addressed minor code errors and improved retry mechanisms for JDownloader connection attempts.
  • Loading branch information
rix committed Jan 12, 2025
1 parent 60297ce commit 7d82022
Show file tree
Hide file tree
Showing 8 changed files with 174 additions and 148 deletions.
2 changes: 1 addition & 1 deletion feedcrawler/external_tools/myjd_api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# FeedCrawler
# Projekt von https://github.com/rix1337
# Dieses Modul stellt die API von My JDownloader in Form eines Python-Moduls zur Verfügung.
# Dieses Modul stellt die API von My-JDownloader in Form eines Python-Moduls zur Verfügung.
#
# Enthält Code von:
# https://github.com/mmarquezs/My.Jdownloader-API-Python-Library/
Expand Down
3 changes: 2 additions & 1 deletion feedcrawler/providers/shared_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def set_initial_values():
else:
gui_enabled = True
update("connected", False)
update("exiting", False)
update("gui", gui_enabled)
update("gui_active_in_tray_and_browser_opened_for_config_once", False)
update("ww_blocked", False)
Expand Down Expand Up @@ -151,7 +152,7 @@ def get_device():

if attempts % 10 == 0:
print(
f"WARNUNG: {attempts} aufeinanderfolgende My JDownloader Verbindungsfehler. Bitte prüfen und ggf. neu starten!")
f"WARNUNG: {attempts} aufeinanderfolgende My-JDownloader-Verbindungsfehler. Bitte prüfen und ggf. neu starten!")
time.sleep(3)

if connect_device():
Expand Down
2 changes: 1 addition & 1 deletion feedcrawler/providers/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def get_version():
return "21.0.5"
return "21.0.6"


def create_version_file():
Expand Down
305 changes: 165 additions & 140 deletions feedcrawler/run.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions feedcrawler/web_interface/vuejs_frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion feedcrawler/web_interface/vuejs_frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feedcrawler-web",
"version": "21.0.5",
"version": "21.0.6",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ function openCaptcha(index) {
y="0px">
<path
d="M 15.40625 4 C 9.066406 4 3.90625 9.160156 3.90625 15.5 C 3.90625 21.839844 9.066406 27 15.40625 27 C 17.21875 27 18.941406 26.5625 20.46875 25.8125 L 18.75 24.375 C 17.710938 24.765625 16.578125 25 15.40625 25 C 14.859375 25 14.332031 24.933594 13.8125 24.84375 C 14.636719 24.375 15.578125 23.734375 16.5625 22.84375 C 18.214844 21.347656 19.960938 19.148438 21.4375 16.03125 C 22.003906 17.609375 22.476563 19.320313 22.75 21.15625 L 19 22 L 25.03125 27 L 28 20 L 24.71875 20.71875 C 24.300781 18.007813 23.5 15.523438 22.5625 13.375 C 22.886719 12.472656 23.167969 11.5 23.4375 10.46875 C 23.9375 11.265625 24.347656 12.128906 24.59375 13.0625 C 25.265625 14.664063 25.847656 16.445313 26.28125 18.34375 L 26.5625 18.28125 C 26.785156 17.390625 26.90625 16.457031 26.90625 15.5 C 26.90625 9.160156 21.746094 4 15.40625 4 Z M 15.40625 6 C 15.460938 6 15.511719 6 15.5625 6 C 15.605469 6.050781 15.695313 6.15625 15.75 6.21875 L 15.1875 6.3125 L 14.71875 7 L 15.46875 8.125 L 15.28125 8.6875 L 15.84375 9.25 L 17.1875 8.0625 C 18.160156 9.398438 19.347656 11.226563 20.40625 13.5 C 19.164063 16.667969 17.601563 18.910156 16.125 20.46875 L 15.6875 20.4375 L 13.9375 19.65625 L 13.28125 20.0625 L 13 19.03125 L 9.34375 17.4375 L 8.21875 17.53125 L 8.375 18.21875 L 7.96875 20.0625 L 8.9375 20.9375 L 9.46875 21.5625 L 11 22.375 L 11.3125 23.21875 L 11.6875 23.6875 C 11.484375 23.773438 11.257813 23.894531 11.125 23.9375 C 11.117188 23.933594 11.101563 23.941406 11.09375 23.9375 C 8.164063 22.425781 6.109375 19.445313 5.9375 15.96875 L 6.71875 16.46875 L 7.75 17.5 L 6.40625 15.4375 L 6.78125 14.3125 L 7.90625 14.25 L 8.90625 15.53125 L 8.9375 14.5 L 10.34375 13.6875 L 11.3125 12.75 L 13.15625 12.1875 L 12.53125 11.78125 L 14.3125 10.90625 L 14.03125 10.125 L 13.15625 9.65625 L 12.28125 10.1875 L 11.6875 11.21875 L 11.09375 11.0625 L 10.9375 10.03125 L 11.53125 9.5 L 13.28125 8.53125 L 11.875 8.4375 L 10.375 8.6875 L 10.84375 8.21875 L 9.90625 7.78125 C 11.460938 6.671875 13.355469 6 15.40625 6 Z M 18.5625 6.53125 C 19.804688 6.96875 20.929688 7.652344 21.875 8.53125 C 21.703125 9.328125 21.519531 10.09375 21.3125 10.8125 C 20.34375 9.027344 19.378906 7.617188 18.5625 6.53125 Z M 8.40625 9.125 L 8.375 9.25 L 7.53125 10.1875 C 7.789063 9.804688 8.097656 9.464844 8.40625 9.125 Z"></path>
</svg> <!-- Wrapped in <i> so the distance to My JDownloader text matches other headings -->
</svg> <!-- Wrapped in <i> so the distance to My-JDownloader text matches other headings -->
</i>My JDownloader
</h3>
</div>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
version=get_version(),
author="rix1337",
author_email="",
description="Automate downloads using predefined sites and the My JDownloader API",
description="Automate downloads using predefined sites and the My-JDownloader-API",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/rix1337/FeedCrawler",
Expand Down

0 comments on commit 7d82022

Please sign in to comment.