Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command Line Options #6

Open
JannikRitscher opened this issue Nov 1, 2023 · 1 comment
Open

Command Line Options #6

JannikRitscher opened this issue Nov 1, 2023 · 1 comment

Comments

@JannikRitscher
Copy link

Is there any chance to make the script run headless and just pass the link as argument while calling it?

@Djdefrag
Copy link
Owner

Djdefrag commented Nov 1, 2023

Yes my friend,
this function is the core of the app, just follow the code and copy the 3/4 function used

  def download_button_command():
      global process_download
      global cpu_number
  
      info_message.set("Starting download")
      update_process_status("Starting download")
  
      try:
          cpu_number = int(float(str(selected_cpu_number.get())))
      except:
          info_message.set("Cpu number must be a numeric value")
          return
  
  
      selected_link = str(selected_url.get()).strip()
  
      if "https://fapello.com" in selected_link:
  
          download_type = 'fapello.com'
  
          if not selected_link.endswith("/"): 
              selected_link = selected_link + '/'
  
          how_many_images = get_Fapello_files_number(selected_link)
          
          process_download = Process(target = process_start_download,
                                     args   = (selected_link, cpu_number))
          process_download.start()
  
          thread_wait = Thread(target = thread_check_steps_download,
                              args   = (selected_link, how_many_images), 
                              daemon = True)
          thread_wait.start()
  
          place_stop_button()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants