deniscerri / ytdlnis

Android Video/Audio Downloader app using yt-dlp
GNU General Public License v3.0
4.02k stars 142 forks source link

Editing filename template doesn't insert selected field at cursor #339

Closed sanctimoniousape closed 10 months ago

sanctimoniousape commented 11 months ago

** Before making an issue make sure you are using the latest version of yt-dlp in the settings. Perhaps try using the nightly version of yt-dlp. If that didn't help, proceed with the issue

Using v1.6.9 via IzzyOnDroid

Describe the bug A clear and concise description of what the bug is.

Adding a field by clicking one from the predefined list causes the field to always be appended to the end of the format string, rather than at the insertion point indicated by the cursor's placement.

To Reproduce Steps to reproduce the behavior:

I chose to modify the default audio filename template, clicked just after the hyphen (and before in another attempt) between the two preexisting fields, then selected the "%(artist)s" predefined tag from the list below the input box. The field always gets appended to the end of the existing string rather than where the cursor is placed.

Expected behavior A clear and concise description of what you expected to happen.

The selected field to be inserted at the current cursor location.

Screenshots / Video Recording If applicable, add them to help explain your problem.

I believe the description given should be sufficient without requiring creating a video, however feel free to request one if I'm incorrect in that assumption.

(please complete the following information):

Additional context Add any other context about the problem here.

None.

teddysulaimanGL commented 11 months ago

That's by design, mate. But what's the reason to append those fields in the cursor in your opinion, I wonder?

sanctimoniousape commented 11 months ago

I'm curious why you wouldn't insert it where the cursor is located, but only append at the end? The way I'm expecting it to work makes changing the format easier by allowing you to insert an additional field without having to remove every field that you want to follow it first, then replace them after you've placed your additional field. That would seem rather tedious to me. What I was expecting to happen is typically the way virtually all text editing operations work elsewhere in my experience.

teddysulaimanGL commented 11 months ago

Calm down, I just need to know it from other's perspective. It'll be changed later, no need to worry

sanctimoniousape commented 11 months ago

Not worried so much as confused. I'm guessing from your response you weren't serious, however. That's what I get for responding right before bedtime, I guess...

zaednasr commented 11 months ago

@sanctimoniousape i will add this feature. no problem

zaednasr commented 11 months ago

this feature has been added. wait for release