Skip to content

Add optional GUI-based async downloader with progress and ETA#4

Open
aragans02 wants to merge 4 commits intogirachawda:mainfrom
aragans02:feature/gui-async-downloader
Open

Add optional GUI-based async downloader with progress and ETA#4
aragans02 wants to merge 4 commits intogirachawda:mainfrom
aragans02:feature/gui-async-downloader

Conversation

@aragans02
Copy link
Copy Markdown

Hi,

This PR adds an optional GUI-based async downloader for Snapchat Memories.

The original CLI script is completely unchanged.

The new tool lives in gui_async_downloader/ and provides:

  • GUI file/folder selection
  • Async multi-download support for faster downloads
  • Automatic skipping of existing files
  • Progress tracking with ETA estimation

This was built as an extension on top of the existing logic, not a replacement.

Happy to make any structural or documentation changes if needed.

@Joshf225
Copy link
Copy Markdown

Joshf225 commented Dec 19, 2025

Great idea, tried it out and looks awesome! Especially the concurrent downloads feature.

Problem

I ran into this problem when trying to install the requirements for the project as a Mac OS user.

│    Traceback (most recent call last):                                                                     │
│                                                                                                           │
│      File "<string>", line 1, in <module>                                                                 │
│                                                                                                           │
│        import tkinter as tk; print('tk ok', tk.TkVersion)                                                 │
│                                                                                                           │
│        ^^^^^^^^^^^^^^^^^^^^                                                                               │
│                                                                                                           │
│      File                                                                                                 │
│    "/opt/homebrew/Cellar/python@3.13/3.13.11/Frameworks/Python.framework/Versions/3.13/lib/python3.13     │
│    /tkinter/__init__.py", line 38, in <module>                                                            │
│                                                                                                           │
│        import _tkinter # If this fails your Python may not be configured for Tk                           │
│                                                                                                           │
│        ^^^^^^^^^^^^^^^                                                                                    │
│                                                                                                           │
│    ModuleNotFoundError: No module named '_tkinter'

Solution + Findings :

    > I wanted to ask a question conserning your findings in this fix. Why was the python-tk@3.13 package missing.
    > Does this package not come with the python@3.13 install or when I installed the tk package itself with pip a
    > then later with brew ?
    
    ✦ That's an excellent question, and it gets to the heart of why this was a tricky issue. Here’s a breakdown of
    the "why":
    1. `python@3.13` is a minimal install: Homebrew, the package manager we used, often provides software in a
       modular way. The core python@3.13 package gives you the Python interpreter and its standard library, but
       it doesn't automatically include optional components like GUI toolkits. This keeps the installation
       smaller and avoids forcing dependencies on users who don't need them.
    2. `tkinter` is an optional system-level component: tkinter is not a typical Python package that you can
       install with pip. It's a wrapper around a C-based module (_tkinter) that acts as a bridge to the Tcl/Tk
       GUI libraries on your system. This bridge needs to be compiled and linked when Python itself is installed.
    3. `pip` vs. `brew`:
       - pip manages Python packages (code written in or for Python). It can't install or manage system-level
         dependencies like the Tcl/Tk libraries.
       - brew manages software for your entire operating system.
    4. The Missing Piece (`python-tk@3.13`): This is the crucial part. In recent versions, Homebrew has separated
       the tkinter bindings into their own dedicated package.
       - brew install tcl-tk correctly installed the underlying GUI libraries.
       - However, your Python installation didn't know how to connect to them.
       - The python-tk@3.13 package provides that specific connection or "glue" for the python@3.13 version you
         have installed.
    
    In short, you were right to think that installing python or tcl-tk should have been enough, as that's how
    it used to work. The change is that Homebrew now requires you to explicitly install the python-tk package
    to bridge the gap between the Python interpreter and the Tcl/Tk libraries.

Suggestion:

Also I'd like to suggest adding a label showing the number of files that may have failed. I made a PR that includes a function for failed downloads and retries, so this could be added later on if @girachawda merges these changes.

@aragans02
Copy link
Copy Markdown
Author

You’re absolutely right about the Homebrew behaviour. I initially tested this on the python.org macOS installer where tkinter is bundled by default, which is why I didn’t hit the missing _tkinter issue.

I agree that for Homebrew users this needs to be explicitly documented, since python@3.x does not guarantee tkinter support without python-tk.

I’ll update the documentation to clearly note the Homebrew-specific requirement (brew install python-tk@) and make sure this is obvious before users try to run the GUI.

I also like the suggestion about tracking failed downloads — I’ll keep that in mind as a follow-up improvement if this gets merged.

Thanks again for the feedback!

@aragans02
Copy link
Copy Markdown
Author

Thanks for testing this and for the detailed explanation.

I’ve updated the documentation to clearly note the Homebrew python-tk requirement on macOS, and added a graceful runtime check so users get a clear error message instead of a crash.

Appreciate the feedback — and thanks for trying it out!

@Joshf225
Copy link
Copy Markdown

Anytime @aragans02 !!

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

Successfully merging this pull request may close these issues.

2 participants