HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: Studio 308 on 2018-05-12 20:49:07

Title: File operations are not sorted and it is impossible
Post by: Studio 308 on 2018-05-12 20:49:07
I've reported this many years ago, but nothing changed regarding this. File operations (Move, Copy, Rename) in context menu are not sorted by name and are not possible to be changed in order. So if you need to add some new location to a common group then it will be added to the bottom of list.

In my opinion there should be special options pages for conversions and file operations to make possibility to add hierarchical menus there. But at least the list of operations should be sorted alphabetically.
Title: Re: File operations are not sorted and it is impossible
Post by: Peter on 2018-05-15 12:52:46
I can see how use of the File Operations component can be annoying if you have a lot of presets.
Steps are being taken to mitigate this:

If you have a better idea what to use for a delimiter here, speak now or remain silent forever

Old preset list will be transferred on first run

These changes will be introduced in the next beta.

[edit clarified]
Title: Re: File operations are not sorted and it is impossible
Post by: Thundik81 on 2018-05-15 18:05:17
I can see how use of the File Operations component can be annoying if you have a lot of presets.
Steps are being taken to mitigate this:

  • Structured menus have been added, use | character in a preset name to create a preset nested in a group: groupname|presetname
If you have a better idea what to use for a delimiter here, speak now or remain silent forever

Good idea!
Title: Re: File operations are not sorted and it is impossible
Post by: Studio 308 on 2018-05-15 20:29:40
Thanks for operative support, Peter. I will test this as soon as you make it available.

There was also an idea for conversion menu to optimize the amount of different variations of presets to a minimum. You can separate destination options from conversion options into two parts:
1. everything about format and processing (output format, processing, other pages)
2. everything regarding path of conversion and form-factor (destination page)

Then you will have two preset columns - for format and for destination. So you can select hierarchically:

Convert   >   FLAC   >   tracks to temp
                     TAK           image+cue
                     MP3          image to... (open dialog)
Title: Re: File operations are not sorted and it is impossible
Post by: Peter on 2018-05-22 12:50:46
New beta version posted, new File Operations preset features are included.

I'll consider reworking Converter preset management for the next major update after v1.4.
Title: Re: File operations are not sorted and it is impossible
Post by: Tropoje on 2018-05-22 19:53:49
@Peter  Thanks for this improvement
New functionality looks very well in the context menu  :)
Could you consider the possibility of adding an option that I mentioned earlier
https://hydrogenaud.io/index.php/topic,115473.0.html

Thank you in advance
Title: Re: File operations are not sorted and it is impossible
Post by: Studio 308 on 2018-05-22 21:58:50
It works as advertised and it will be more accurate now, but why it is still not sorting alphabetically? The drop-down list is sorted (and was always), but context menu is not. What's the point? Conversion presets are sorted everywhere, for example. It is good that you can do anything manually in text file, but it is not good design to do something outside the app.
Title: Re: File operations are not sorted and it is impossible
Post by: Tropoje on 2018-05-23 06:32:58
It works as advertised and it will be more accurate now, but why it is still not sorting alphabetically? The drop-down list is sorted (and was always), but context menu is not. What's the point? Conversion presets are sorted everywhere, for example. It is good that you can do anything manually in text file, but it is not good design to do something outside the app.
Now it is very good, you can set the display order in the context menu yourself. Just enter the order you are interested in to the file "FileOps-Presets.txt". In my opinion this is definitely a better solution than the alphabetical order.
Title: Re: File operations are not sorted and it is impossible
Post by: GeSomeone on 2018-05-24 11:00:15
I'll consider reworking Converter preset management for the next major update after v1.4.
What I always missed in the "new" converter settings is a way to remember a couple of "custom" naming patterns.
e.g. [$stripprefix(%artist%) - ][$num(%tracknumber%,2) - ]$ascii(%title%)

Maybe adding those from fileops? But that is probably not a good idea anymore, now structured menu's ware introduced. Also against separate config per component.
The previous converter had a drop-down list that remembered a number of the last used name patterns, I liked that a lot.
Title: Re: File operations are not sorted and it is impossible
Post by: Studio 308 on 2018-05-24 14:15:01
What I always missed in the "new" converter settings is a way to remember a couple of "custom" naming patterns.
What I offer to change in converter component should cover your need of naming presets, there may be "..." in destination submenu to open dialog for a temporary pattern.
Title: Re: File operations are not sorted and it is impossible
Post by: sPeziFisH on 2018-05-24 16:58:23
Title: Re: File operations are not sorted and it is impossible
Post by: Porcus on 2018-05-24 17:07:51
Peter, if you are going to do more work on this:

* If only case is changed, then it seems to me that files will be renamed but directories will not. That is, FOLder/file can be moved to FOLder/File but not to Folder/File.
* Is it so that directories are not renamed, fb2k will rather create new, move and remove? If I tick move entire folder, it would likely speed up to rename folder?
* Often I'd like to have a certain folder (the one with all my unsorted lonely files, obviously) protected from renaming/moving.  Is there an easy way to implement that?
Title: Re: File operations are not sorted and it is impossible
Post by: Case on 2018-05-24 18:06:23
Sorry for intruding a first party component topic... But @Porcus , you should be able to perform the first two actions with foo_renamer (https://foobar.hyv.fi/?view=foo_renamer). Not as fancy as file_ops but I find it beats performing things manually.
Title: Re: File operations are not sorted and it is impossible
Post by: Porcus on 2018-05-24 21:13:30
Sorry for intruding a first party component topic... But @Porcus , you should be able to perform the first two actions with foo_renamer (https://foobar.hyv.fi/?view=foo_renamer). Not as fancy as file_ops but I find it beats performing things manually.
Looks interesting, although it does not do my first item (I changed the initial capitalization of an ALBUM tag, try to "Move" and fb2k reports nothing to do, as usual). Didn't check the second :-o
Title: Re: File operations are not sorted and it is impossible
Post by: Case on 2018-05-25 05:54:13
It can't alter the behavior of foo_fileops. It is launched from context menu Utilities -> Rename tracks. And it doesn't do moving, it always renames. It does indeed allow you to alter the case of dirs and files. Note that its string is configured in Preferences -> Tools -> Renamer. It will show a preview but won't allow touching any config at that point.
Title: Re: File operations are not sorted and it is impossible
Post by: Porcus on 2018-05-25 10:48:23
Ah, thanks. I assumed it took over the file operations (because the Rename pattern was reset after I installed - that was maybe unrelated?).
I'm definitely going to check it out further.  It seems it has issues with $directory(%path%).

(And, detail: Although "odd" and "even" quotation marks is a good idea, consider one for "only": then one can capture e.g. songtitle (12" remix). And it would probably be nice to add own replacements.)
Title: Re: File operations are not sorted and it is impossible
Post by: Case on 2018-05-25 11:25:46
Your setting resetting was unrelated, though no idea what could have caused it.

Good suggestion about the single double quote situation, I hadn't thought of that. And I hadn't thought of using path elements in the renamer as its main purpose was custom handling of hardcoded special characters. I'll fix the problem as soon as I can.

As for the other replacement rules, the idea was that anything else is handled with $replace().
Title: Re: File operations are not sorted and it is impossible
Post by: Case on 2018-05-25 20:58:10
New version of my renamer uploaded.
Title: Re: File operations are not sorted and it is impossible
Post by: Studio 308 on 2018-05-29 08:55:37
* If only case is changed, then it seems to me that files will be renamed but directories will not. That is, FOLder/file can be moved to FOLder/File but not to Folder/File.
Yeah, makes a little nervous sometimes. But I see a possible problem here. In case you have different capitalisation between files - this may lead to strange behavior. Of course you can invent some kind of trick - rename path by first file in queue. This should be discussed.

* Is it so that directories are not renamed, fb2k will rather create new, move and remove? If I tick move entire folder, it would likely speed up to rename folder?
From the FS point of view - doesn't matter. Of course move component is moving and not renaming, but it is resolved on file system level, so that items are not copied and deleted, but retargeted using the MFT.

Often I'd like to have a certain folder (the one with all my unsorted lonely files, obviously) protected from renaming/moving.  Is there an easy way to implement that?
As for me - I don't understand, why do you need this. If you don't want to move files from some folder - don't move them. Maybe you should try read-only flag?

you should be able to perform the first two actions with foo_renamer (https://foobar.hyv.fi/?view=foo_renamer). Not as fancy as file_ops but I find it beats performing things manually.
Such an advanced component could simply replace integrated simple renaming component in foobar2000 and also integrate the options of character replacement. For example, change ":" to " -" (with space). Like it is done in mp3tag.

Title: Re: File operations are not sorted and it is impossible
Post by: Studio 308 on 2018-05-29 09:01:27
* If only case is changed, then it seems to me that files will be renamed but directories will not. That is, FOLder/file can be moved to FOLder/File but not to Folder/File.
Yeah, makes a little nervous sometimes. But I see a possible problem here. In case you have different capitalisation between files - this may lead to strange behavior. Of course you can invent some kind of trick - rename path by first file in queue. This should be discussed.

* Is it so that directories are not renamed, fb2k will rather create new, move and remove? If I tick move entire folder, it would likely speed up to rename folder?
I think that from the FS point of view - doesn't matter. Of course move component is moving and not renaming, but it is resolved on file system level, so that items are not copied and deleted, but retargeted using the MFT in case everything is done in one partition.

Often I'd like to have a certain folder (the one with all my unsorted lonely files, obviously) protected from renaming/moving.  Is there an easy way to implement that?
As for me - I don't understand, why do you need this. If you don't want to move files from some folder - don't move them. Maybe you should try read-only flag?

you should be able to perform the first two actions with foo_renamer (https://foobar.hyv.fi/?view=foo_renamer). Not as fancy as file_ops but I find it beats performing things manually.
Such an advanced component could simply replace integrated simple renaming component in foobar2000 and also integrate the options of character replacement. For example, change ":" to " -" (with space). Like it is done in mp3tag.