Skip to content

Commit b923967

Browse files
committed
- some fixes
1 parent 153f964 commit b923967

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

README/STATUS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ by that instead of calculating the new total progress. This will require a rewor
4343
## Code improvements and design updates
4444
- [x] Fix the Porn Fetch layout
4545
- [x] Rename **ALL** UI elements to be more consistent and easier to handle within code
46-
- [] Code refactoring
47-
- [] Remove useless code
46+
- [x] Code refactoring
47+
- [x] Remove useless code
4848
- [] Improve code comments
4949

5050
- [] Update translations
51-
- [] Make Porn Fetch's codebase more structured. In Germany, we say "Roter faden"
51+
- [x] Make Porn Fetch's codebase more structured. In Germany, we say "Roter faden"
5252
- [] Improving and hardening the tag writing function (with exceptions)
53-
- [] Generalizing the backend Porn APIs to work more equally to optimize Porn Fetch to write lesser lines of code
53+
- [x] Generalizing the backend Porn APIs to work more equally to optimize Porn Fetch to write lesser lines of code
5454
- [] Rework the entire progress reporting system (probably the hardest thing to do)
5555
- [] searching for ways to improve Android display reaction time for UI elements
5656
- [] Improve code for the part when a video finished downloading

main.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ class Signals(QObject):
9797
install_finished = Signal(object) # Reports if the Porn Fetch installation was finished
9898
internet_check = Signal(object) # Reports if the internet checks were successful
9999
result = Signal(dict) # Reports the result of the internet checks if something went wrong
100-
error_signal = Signal(str) # A general error signal, which will show errors using a Pop-up
100+
error_signal = Signal(object) # A general error signal, which will show errors using a Pop-up
101101
clear_tree_widget_signal = Signal() # A signal to clear the tree widget
102102
text_data_to_tree_widget = Signal(dict) # Sends the text data in the form of a dictionary to the main class
103103
download_completed = Signal(object) # Reports a successfully downloaded video
104104
progress_send_video = Signal(object) # Sends the selected video objects from the tree widget to the main class
105105
# to download them
106106
url_iterators = Signal(object) # Sends the processed URLs from the file to Porn Fetch
107-
ffmpeg_download_finished = Signal(object) # Reports the successful download / install of FFmpeg
107+
ffmpeg_download_finished = Signal() # Reports the successful download / install of FFmpeg
108108

109109

110110
class License(QWidget):
@@ -427,8 +427,7 @@ def delete_dir():
427427
return True
428428

429429
except AttributeError as e:
430-
logger.error("Couldn't find the ffmpeg directories for cleaning them up! This may not be a serious issue, "
431-
f"please report it anyways: {e}")
430+
pass # This is expected and (99%) not an issue
432431

433432
return False
434433

@@ -602,10 +601,8 @@ def run(self):
602601
videos = islice(self.iterator, self.search_limit)
603602

604603
self.signals.stop_undefined_range.emit() # Stop the loading animation
605-
print(type(videos))
606604

607605
for i, video in enumerate(videos, start=start):
608-
print(f"Running for index: {i}")
609606
if self.stop_flag.is_set():
610607
return # Stop processing if user pressed the stop button
611608

@@ -623,7 +620,6 @@ def run(self):
623620
self.signals.progress_add_to_tree_widget.emit(self.search_limit, i)
624621
self.signals.text_data_to_tree_widget.emit(text_data)
625622
try_attempt = False # Processing succeeded
626-
print("Set try attempt to false!")
627623

628624
except errors.RegexError as e:
629625
logger.error(f"Regex error: {e}")
@@ -1645,7 +1641,7 @@ def search(self):
16451641

16461642
elif self.ui.download_radio_search_website_eporner.isChecked():
16471643
videos = ep_Client().search_videos(query, sorting_gay="", sorting_order="", sorting_low_quality="", page=1,
1648-
per_page=self.search_limit, enable_html_scraping=True) # TODO - Need to refactor Eporner API
1644+
per_page=self.search_limit, enable_html_scraping=True)
16491645

16501646
elif self.ui.download_radio_search_website_xnxx.isChecked():
16511647
videos = xn_Client().search(query).videos
@@ -1677,7 +1673,7 @@ def add_to_tree_widget_thread(self, iterator):
16771673
self.add_to_tree_widget_thread_.signals.start_undefined_range.connect(self.start_undefined_range)
16781674
self.add_to_tree_widget_thread_.signals.stop_undefined_range.connect(self.stop_undefined_range)
16791675
self.add_to_tree_widget_thread_.signals.error_signal.connect(self.show_error)
1680-
self.threadpool.start(self.thread)
1676+
self.threadpool.start(self.add_to_tree_widget_thread_)
16811677
logger.debug("Started the thread for adding videos...")
16821678

16831679
def add_to_tree_widget_signal(self, data: dict):

src/backend/shared_functions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ def send_error_log(message):
116116

117117
def check_video(url, is_url=True, delay=False):
118118
if is_url:
119-
print(type(url))
120119
if hqporner_pattern.search(str(url)):
121120
return hq_Client().get_video(url)
122121

0 commit comments

Comments
 (0)