Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1434

Tag acoustid_id can not be removed or deleted in script

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.1
    • 2.0.4, 2.1
    • Scripting
    • None
    • Win10 64bit

      I know that we have several related issues like

      https://tickets.metabrainz.org/browse/PICARD-268

      https://tickets.metabrainz.org/browse/PICARD-287

      https://tickets.metabrainz.org/browse/PICARD-419

      https://tickets.metabrainz.org/browse/PICARD-546

      https://tickets.metabrainz.org/browse/PICARD-882

      They are all closed or "solved".

       

      But with the newest available 2.1.0.dev2 I can still not delete the existing tag "acoustid_id" from my *.mp3

      Neither $unset nor $set works.

      Can one of the developers please check the code snippets mentioned in the linked issues and see if they are just forgotten? Or do we really can't delete such existing tags?

       

      Hint:

      https://tickets.metabrainz.org/browse/PICARD-546?focusedCommentId=36480&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-36480

       

          [PICARD-1434] Tag acoustid_id can not be removed or deleted in script

          Invisible Man added a comment - - edited

          I think, I understand it now.

          Thanks again for your time and very helpful explanation!

          (As Picard user it is not obviously which tags came from which source and why they are treated differently)

          Invisible Man added a comment - - edited I think, I understand it now. Thanks again for your time and very helpful explanation! (As Picard user it is not obviously which tags came from which source and why they are treated differently)

          It should work for plugins actually marking tags for deletion, but $keep is not one of those. $keep marks the tags you want to keep from MusicBrainz (not the tags you want to preserve in your files). It does not remove tags from the file, it is kind of a reverse $unset: With $unset you need to specify each tag you don't want to be filled from MusicBrainz, with $keep you do it the other way round and specify the tags you want to filled from MusicBrainz.

          For explicitly removing tags from the file use $delete, that's its purpose.

          Philipp Wolfer added a comment - It should work for plugins actually marking tags for deletion, but $keep is not one of those. $keep marks the tags you want to keep from MusicBrainz (not the tags you want to preserve in your files). It does not remove tags from the file, it is kind of a reverse $unset: With $unset you need to specify each tag you don't want to be filled from MusicBrainz, with $keep you do it the other way round and specify the tags you want to filled from MusicBrainz. For explicitly removing tags from the file use $delete, that's its purpose.

          Invisible Man added a comment -

          Thank you very much for this patch!

          I'm just curious:
          Does this help also for plugins like $keep?
          If I don't have acoustid_id in the list of tags to keep, will acoustid_id also be deleted through $keep or do I have to write the command $delete(acoustid_id) separately?

           

          Invisible Man added a comment - Thank you very much for this patch! I'm just curious: Does this help also for plugins like $keep ? If I don't have acoustid_id in the list of tags to keep, will acoustid_id also be deleted through $keep or do I have to write the command $delete(acoustid_id) separately?  

          Philipp Wolfer added a comment - https://github.com/metabrainz/picard/pull/1064

          Invisible Man added a comment - - edited

          Yes, deleting via the UI works (the entries gets red and after saving them they where removed).

          BUT you know what:
          After rebooting my test environment and therefore restarting Picard 2.1.0dev2, the above tags 

          tracknumber
          totaltracks
          discnumber

          becomes red automatically (as needed and expected)!

          It seems, that my scripting changes for $delete(tag) doesn't get active immediately. Maybe a Picard restart is needed?

          https://tickets.metabrainz.org/browse/PICARD-1435

           

          The problem remains for the subject "acoustid_id".

          I can remove it only manually (it doesn't get red, it disappears immediately).

          And all the above entries are gone after saving the changes with CTRL-S (or Save-Icon)

          Invisible Man added a comment - - edited Yes, deleting via the UI works (the entries gets red and after saving them they where removed). BUT you know what: After rebooting my test environment and therefore restarting Picard 2.1.0dev2, the above tags  tracknumber totaltracks discnumber becomes red automatically (as needed and expected)! It seems, that my scripting changes for $delete(tag) doesn't get active immediately. Maybe a Picard restart is needed? https://tickets.metabrainz.org/browse/PICARD-1435   The problem remains for the subject "acoustid_id". I can remove it only manually (it doesn't get red, it disappears immediately). And all the above entries are gone after saving the changes with CTRL-S (or Save-Icon)

          Does it work if you delete those via the UI?

          Philipp Wolfer added a comment - Does it work if you delete those via the UI?

          Invisible Man added a comment -

          Thank you @outsidecontext 

          Just for the record:
          I can't delete this tags either with $delete:
          tracknumber
          totaltracks
          discnumber

          For other details like "track length" it is obvious that I can't delete it.
          But it would be great to have control over all tags which we can manually edit in Picard (right mouse click, edit / remove) and like it works already for "genre" or "date".

          Invisible Man added a comment - Thank you @outsidecontext  Just for the record: I can't delete this tags either with $delete: tracknumber totaltracks discnumber For other details like "track length" it is obvious that I can't delete it. But it would be great to have control over all tags which we can manually edit in Picard (right mouse click, edit / remove) and like it works already for "genre" or "date".

          Ok, then this is somehow related to the special handling of acoust IDs, I'll look into it.

          Philipp Wolfer added a comment - Ok, then this is somehow related to the special handling of acoust IDs, I'll look into it.

          Invisible Man added a comment - - edited

          If I try to

          $delete(acoustid_id) 

          in the scripting section, this has no effect.

          As soon as I do a "Scan" I get the AcoustID and can't get rid of it anymore.

           

          If I try to delete other tags like "genre" or "date" I see the red entries and in addition the red striked through value on the right side. It seems, it must be something special with "acoustid_id".

          (Picard 2.1.0.dev2)

          Invisible Man added a comment - - edited If I try to $delete(acoustid_id)  in the scripting section, this has no effect. As soon as I do a "Scan" I get the AcoustID and can't get rid of it anymore.   If I try to delete other tags like "genre" or "date" I see the red entries and in addition the red striked through value on the right side. It seems, it must be something special with "acoustid_id". (Picard 2.1.0.dev2)

          $unset cannot be used to remove existing tags from files, it will just unset the value from data loaded from MB. Essentially that means if the tag in question is already in the file it will be kept (unless clear existing tags. And since the acoust ID is not loaded from MB it essentially has no effect here.

          For the use case of actually marking a tag for deletion Picard 2.1 introduces the $delete function. So $delete(acoustid_id) should actually work, but I have not yet tested it.

          Philipp Wolfer added a comment - $unset cannot be used to remove existing tags from files, it will just unset the value from data loaded from MB. Essentially that means if the tag in question is already in the file it will be kept (unless clear existing tags. And since the acoust ID is not loaded from MB it essentially has no effect here. For the use case of actually marking a tag for deletion Picard 2.1 introduces the $delete function. So $delete(acoustid_id) should actually work, but I have not yet tested it.

            outsidecontext Philipp Wolfer
            invisibleman78 Invisible Man
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.1