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

Drag and drop files in and out of TagStudio #153

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

Creepler13
Copy link
Contributor

@Creepler13 Creepler13 commented May 9, 2024

Added the ability to drop files into TagStudio, which adds them to the library

A popup will ask how to resume when some/all of the files names already exist in the librarys root folder

  • Skip
  • Override
  • Rename
  • Cancel

I put it in the modal folder because i plan/ned to add a window that allows you to import files from discord, google, etc
since these are links and they need extra logic to either download or safe them as text.

I used the method described in #75

Edit: Dragging out of TagStudio was added

@CyanVoxel CyanVoxel added this to the Alpha 9.3.x milestone May 10, 2024
@CyanVoxel CyanVoxel added the enhancement New feature or request label May 10, 2024
tagstudio/src/qt/modals/drop_import.py Outdated Show resolved Hide resolved
tagstudio/src/qt/modals/drop_import.py Outdated Show resolved Hide resolved
@yedpodtrzitko
Copy link
Collaborator

yedpodtrzitko commented May 10, 2024

doesnt work for me:

Traceback (most recent call last):
  File "/Users/yed/dev/python/TagStudio/tagstudio/tag_studio.py", line 9, in <module>
    from src.qt.ts_qt import QtDriver
  File "/Users/yed/dev/python/TagStudio/tagstudio/src/qt/ts_qt.py", line 85, in <module>
    from src.qt.modals import (
  File "/Users/yed/dev/python/TagStudio/tagstudio/src/qt/modals/drop_import.py", line 30
    f"The files  {", ".join(map(lambda url:url.fileName(),duplicate_filesnames))}  have filenames that already exist in the library folder."
                   ^
SyntaxError: f-string: expecting '}'

Seems like using double quotes inside the same quotes isnt supported in Python 3.10. Could be easy to fix it to keep the compatibility with that version.

@yedpodtrzitko
Copy link
Collaborator

beside the error it works as expected, nice job.

Creepler13 and others added 4 commits May 10, 2024 18:14
Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com>
Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com>
@Creepler13
Copy link
Contributor Author

Forgot about folders. They work now

@Creepler13
Copy link
Contributor Author

Added progress bars, helpfull especially for large amounts of or large files

@Creepler13
Copy link
Contributor Author

Added drag out of window support

#75

@Creepler13
Copy link
Contributor Author

i give up, no more formatting

@Creepler13 Creepler13 changed the title Ability to drop local files in to TagStudio to add to the library Drag and drop files in and out of TagStudio May 22, 2024
@CyanVoxel
Copy link
Member

i give up, no more formatting

I'll take a look at it, I've been fighting with the MyPy stuff myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants