NickvisionApps / Tagger

Tag your music
https://flathub.org/apps/details/org.nickvision.tagger
MIT License
219 stars 14 forks source link

Remember Format String #375

Closed kissthermite closed 10 months ago

kissthermite commented 10 months ago

%artist%- %title% %artist%- %title%

Artist1- Song1 Artist1- Song1.mp3


%artist% - %title% %artist%- %title%

Artist1 - Song1 Artist1 - Song1.mp3


Tagger Help, Format Strings


I guess it's a typo? But then again it's quite widespread if it's indeed a typo, because not only %artist%- %title% but also the other suggestions such as %title%- %artist% & %track%- ℅title℅. I'm on Fedora Silverblue, latest version of Tagger (flatpak) btw.

nlogozzo commented 10 months ago

So the File Name to Tag feature is what takes a file name and converts it to a tag. For example, Artist1 - Song1.mp3 can be turned into the tag whereArtist=Artist1 and Title=Song1. This feature has no effect on changing the actual file name (that's Tag to File Name)

The format string provided to File Name to Tag is to tell the function how to parse your filename and read tag data from it.

So if you have the filename Artist1- Song1.mp3 or Artist1 - Song1.mp3 (with or without the space), the format string %artist%- %title% will read the artist as Artist1 and title as Song1 for both versions of the file name.

If we changed the default format string to %artist% - %title% with the space, the file name Artist1- Song1.mp3 will fail as it will look for a space before the - and it obviously doesn't have one.

Hence why the documentation is written the way it is to show that no matter if you have the space before the - or not, the format string without the space will work correctly.

kissthermite commented 10 months ago

So the File Name to Tag feature is what takes a file name and converts it to a tag. For example, Artist1 - Song1.mp3 can be turned into the tag whereArtist=Artist1 and Title=Song1. This feature has no effect on changing the actual file name (that's Tag to File Name)

The format string provided to File Name to Tag is to tell the function how to parse your filename and read tag data from it.

So if you have the filename Artist1- Song1.mp3 or Artist1 - Song1.mp3 (with or without the space), the format string %artist%- %title% will read the artist as Artist1 and title as Song1 for both versions of the file name.

If we changed the default format string to %artist% - %title% with the space, the file name Artist1- Song1.mp3 will fail as it will look for a space before the - and it obviously doesn't have one.

Hence why the documentation is written the way it is to show that no matter if you have the space before the - or not, the format string without the space will work correctly.

Just realized i sent the wrong Screenshot on both example, it's supposed to be Tag to File Name

kissthermite commented 10 months ago

So the File Name to Tag feature is what takes a file name and converts it to a tag. For example, Artist1 - Song1.mp3 can be turned into the tag whereArtist=Artist1 and Title=Song1. This feature has no effect on changing the actual file name (that's Tag to File Name)

The format string provided to File Name to Tag is to tell the function how to parse your filename and read tag data from it.

So if you have the filename Artist1- Song1.mp3 or Artist1 - Song1.mp3 (with or without the space), the format string %artist%- %title% will read the artist as Artist1 and title as Song1 for both versions of the file name.

If we changed the default format string to %artist% - %title% with the space, the file name Artist1- Song1.mp3 will fail as it will look for a space before the - and it obviously doesn't have one.

Hence why the documentation is written the way it is to show that no matter if you have the space before the - or not, the format string without the space will work correctly.

Ah... Now i see the reasoning behind the format string suggestion for File Name to Tag. However my problem is Tag to File Name Conversion.

kissthermite commented 10 months ago

Now that i actually look real close at my screenshot the Tagger Help, Format String section does indeed refer to File name to Tag. Kek I'm such an idiot. However Isn't Tag to File name suggestions have a space before dash? So that it output Artist - Song AKA the standard music file naming?

kissthermite commented 10 months ago

Format string suggestions for File Name to Tag does make a lot of sense. 2


But is there also a reason as for why Tag to File Name format string suggestions doesn't have space before dash? 1

I guess there's some that preferred it that way. If that's the case i would love to be able to save custom Format String so that i doesn't have to type in every time i'm doing Tag to File Name conversion with my preferred way of file name structure.

nlogozzo commented 10 months ago

But is there also a reason as for why Tag to File Name format string suggestions doesn't have space before dash?

Consistency with File Name to Tag. We just have to make one array of strings instead of two 😂

I guess there's some that preferred it that way. If that's the case i would love to be able to save custom Format String so that i doesn't have to type in every time i'm doing Tag to File Name conversion with my preferred way of file name structure.

You know what, I will make it where the previous format string (whether it be one from the list or custom) will be remembered and automatically selected/filled-in the next time you open the dialog.

nlogozzo commented 10 months ago

https://github.com/NickvisionApps/Tagger/releases/tag/2023.10.0-rc1

nlogozzo commented 10 months ago

https://github.com/NickvisionApps/Tagger/releases/tag/2023.10.0-rc1

Flathub was having some slowness issues before but finally got the update uploaded and published. Should be available via flathub-beta within a few minutes :)