-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Allow to rename images before copying into collection #5192
Comments
How does Anki Desktop handle this? |
Well, in Anki desktop you can just drag and drop any picture (local or from a website) into the image field. That would be the ultimate solution, but I think it's highly unlikely to realize this on Android. About renaming on Anki desktop: that's not an issue since you can rename the picture at any place and then just drag and drop it into the image field. For example, you could have opened chrome, anki and your desktop next to each other, then drag an image from chrome to the desktop, press F2 to rename it and then drag it into Anki's image field. Just a matter of seconds. |
I get that renaming is a big pain on Android (where task switching is terrible) vs the desktop, what I was hoping for was how Anki Desktop handles it when you attempt to import a new media file that has the same name as the old media file. Sorry if I wasn't clear! As for drag-n-drop, the most useful analog for Android will be if the clipboard issue is resolved with support for images #5023 (which supercedes #3426) |
Anki desktop has an "add image/audio/video" button (or press F3) in the card browser/card editor. That button opens a small file browser where you can navigate to your picture. The context menu there allows "rename", "delete" and "new folder" which are all very useful in my eyes. Would be great if AnkiDroid could copy that. Edit: about the import of files with the same name: when you add a file via drag and drop or the "add" button, then Anki desktop will immediately rename it to "download (1).jpg" if "download.jpg" already exists. |
Okay, I see what you're saying and I don't disagree, but I have a very specific question about collisions:
Assume you do no rename. Your collection has "foo.jpg" already (used in card 1). You attempt to import another media file "foo.jpg" on a new card (or while editing card 2). What happens to foo.jpg-original, foo.jpg-new, card 1 and card 2? |
Did you read my edit? The old picture remains untouched. The new picture will be renamed to "foo (1).jpg" automatically before copying it to the collection. |
Just read the edit now, sorry :-). Interesting. I think they must be using the operating system copy, and at a low-level operating system copies on desktop operating systems handle name collisions like that. Hmmm |
Would you agree in principle that this is two separate issues? One is a bug where we don't handle name collisions like desktop. The other is an enhancement requests to support all the import media features (rename) etc. I say that because handling collisions should be relatively easy and something we should do quickly, whereas enhancement requests always take longer. If you agree, I'd keep this one for the enhancement request, and a new issue with a laser focus on "handle media import filename collisions like Anki Desktop" would be good |
Ok, sounds good! |
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically |
This needs a fair bit of refactoring work before it goes in. There's a lot of unnecessary state usage in the current class, and I'd rather not add to the complexity |
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically |
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically |
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically |
@mikehardy @david-allison-1 is this issue is valid now? |
Maybe, I just reread it and I'm not sure what the exact spec for the feature should be as it is entangled here between collision and rename on import. Without a clean / complete specification it's not a good issue to implement. If you want to check out how desktop does optional rename on import and try to specify the feature first that is the first step, then we can think about it again |
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically |
Reproduction Steps
Expected Result
Long press on the image shows several options as in the standard file browser. Especially "rename" should be possible.
Actual Result
No long press, no functions at all. I can't rename the picture. I need to leave AnkiDroid and open the standard file browser in order to rename the image.
Also: it can cause synching problems if the filename of the image (let's say "download.jpg") already exists. So the rename function should be essential here. Also it is highly unlikely that users want to keep the default name of downloaded images (these names are often ridiculous long) so renaming them before copying to the collection makes sense.
Debug info
AnkiDroid Version = 2.9alpha55
Android Version = 8.1.0
ACRA UUID = f2d13677-d957-460e-9f8e-33ca6f832c17
Research
Enter an [ x ] character to confirm the points below:
[ x ] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
[ x] I have checked the manual and the FAQ and could not find a solution to my issue
[ x ] I have searched for similar existing issues here and on the user forum
The text was updated successfully, but these errors were encountered: