Results 1 to 7 of 7

Thread: [18.04.5] right-click command clear all meta tags from all mp3s in curr dir

  1. #1
    Join Date
    Jan 2017
    Beans
    20

    Question [18.04.5] right-click command clear all meta tags from all mp3s in curr dir

    Trying to clear all mp3 tags from current dir in PCManFM 1.2.5. Currently have this:
    Code:
    [Desktop Entry]
    Type=Action
    Tooltip=RemoveID
    Name=RemoveID
    Profiles=profile-zero;
    Icon=gtk-dialog-authentication
    
    [X-Action-Profile profile-zero]
    MimeTypes=inode/directory;
    Exec=eyeD3 --remove-all /home/01_01.mp3
    Name=Default profile
    ...in a file in /home/paul/.local/share/file-manager/actions

    That works to remove the tags from that specific file from that specific directory, but I would like to change the script to work so that it does so to ALL mp3 files (*.mp3) and in whatever directory I right-clicked to click that command. Any idea?
    Last edited by primuspaul; April 24th, 2021 at 03:54 AM.

  2. #2
    Join Date
    Dec 2014
    Beans
    1,780

    Re: [18.04.5] right-click command clear all meta tags from all mp3s in curr dir

    Take a look at the documentation for the 'Exec'-key in .desktop files. Replace '/home/01_01.mp3' in the 'Exec'-line with '%f' for a single directory or with '%F' if you want to be able to mark multiple directories and have all the files in all of them processed in one go.

    Holger

  3. #3
    Join Date
    Jan 2017
    Beans
    20

    Re: [18.04.5] right-click command clear all meta tags from all mp3s in curr dir

    Thanks. Yes, that seems to be working. It works in the background - is it possible to make it work in a console or some way to show the progress and/or display some kind of alert once it finishes? Some folders contain many files so it's a bit time consuming and not always obvious when it's done.

  4. #4
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,363

    Re: [18.04.5] right-click command clear all meta tags from all mp3s in curr dir

    In Bash, recursion over a bunch of files is handled with the "find exec" command. With find, it is a one liner to process many files.

  5. #5
    Join Date
    Jan 2017
    Beans
    20

    Re: [18.04.5] right-click command clear all meta tags from all mp3s in curr dir

    Quote Originally Posted by HermanAB View Post
    In Bash, recursion over a bunch of files is handled with the "find exec" command. With find, it is a one liner to process many files.
    Sorry, I don't understand. So it's not possible to do that the way I want?

  6. #6
    Join Date
    Dec 2014
    Beans
    1,780

    Re: [18.04.5] right-click command clear all meta tags from all mp3s in curr dir

    Quote Originally Posted by primuspaul View Post
    Sorry, I don't understand. So it's not possible to do that the way I want?
    It is possible. HermanAB was just giving you an alternative way of doing what you want in the classic command line way. The problem with his method is that using find for recursion isn't necessary in this case since eyeD3 already does this itself.

    I can think of multiple ways to get some indication of progress. First I would try simply having a line 'Terminal=True' in the .desktop file, but I'm not certain this works for actions. If it works you should get a terminal window showing the output of eye3d as it works.

    The next thing would be to replace the Exec-line with
    Code:
    Exec=bash -c "eyeD3 --remove-all %F | zenity --progress ---pulsate -auto-close"
    The 'bash -c' is necessary since you can only have simple commands in a .desktop file; so we're calling the shell to execute a slightly more complicated command. This will give you a progress indicator that only really shows you that eyeD3 is still running, but that might be enough.

    If you want a real indicator which gives you an idea of how far along the tag-removal is, things get more complicated; you'd need to write a real script for that; it would need to count the files to be processed, feed them to eyeD3 one by one and calculate percentages to give to zenity to display.

    Holger

  7. #7
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: [18.04.5] right-click command clear all meta tags from all mp3s in curr dir

    My suggestion may not be any use to you but I think what you're trying to do would be relatively easy using the custom actions of thunar, the file manager of Xubuntu.
    I am using an Android tablet at the moment and can't remember the details so will wait till I'm back on Xubuntu and try and give you a way to do this.

    I do use a custom action to convert videos in a folder to mkv to make them available to Emby mediaserver, so I think what you want should be possible.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •