# Script adds extra tracknumber

**URL:** <https://community.metabrainz.org/t/script-adds-extra-tracknumber/374476>\
**Category:** MusicBrainz Picard\
**Created:** [April 14, 2018, 1:30pm UTC](https://community.metabrainz.org/t/script-adds-extra-tracknumber/374476 "2018-04-14T13:30:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ardivian](https://community.metabrainz.org/user_avatar/community.metabrainz.org/ardivian/32/13899_2.png) [@ardivian](https://community.metabrainz.org/u/ardivian)\
**Post date:** [April 14, 2018, 1:30pm UTC](https://community.metabrainz.org/t/script-adds-extra-tracknumber/374476/1 "2018-04-14T13:30:03Z")

</div>

New here. I have been trying to attempt to the tag title under new value to rename as 01 Songname. I eventually figured out a script by picking apart other scripts from the forum.

Here is the script I used  
$set(title,$num(%tracknumber%,2) %title%)

It works at changing the Tag title under New Value to 01 Songname but the side effect is adding an extra track number where the song populates results.

 ![extra%20tracknumber](https://community.metabrainz.org/uploads/default/original/2X/c/c7c2f61a1202f5931d5b089720bd32a8eb03cf60.PNG)

For filename I’ve used just %title% but after refresh it stays that way.

I’m honestly at a loss at this point as I spent a few hours last night just reading through forum and randomly pasting code and removing bits and pieces but to no avail.

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![outsidecontext](https://community.metabrainz.org/user_avatar/community.metabrainz.org/outsidecontext/32/90_2.png) [@outsidecontext](https://community.metabrainz.org/u/outsidecontext)\
**Post date:** [April 14, 2018, 2:10pm UTC](https://community.metabrainz.org/t/script-adds-extra-tracknumber/374476/2 "2018-04-14T14:10:10Z")

</div>

There is everything as expected. The view on the right always displays the track number and title. And since you set the title to also include the track number it is displayed twice.

The file naming script absolutely has nothing to do with that. It only determines the naming of the files and folders when you save and have move/rename enabled.

---

<div class="post-metadata">

**Author:** ![ardivian](https://community.metabrainz.org/user_avatar/community.metabrainz.org/ardivian/32/13899_2.png) [@ardivian](https://community.metabrainz.org/u/ardivian)\
**Post date:** [April 14, 2018, 2:34pm UTC](https://community.metabrainz.org/t/script-adds-extra-tracknumber/374476/3 "2018-04-14T14:34:43Z")

</div>

Ah. Well is there any way to get the Title new value to stay as it currently is but the view on the right to only display the tracknumber once?

---

<div class="post-metadata">

**Author:** ![outsidecontext](https://community.metabrainz.org/user_avatar/community.metabrainz.org/outsidecontext/32/90_2.png) [@outsidecontext](https://community.metabrainz.org/u/outsidecontext)\
**Post date:** [April 14, 2018, 2:39pm UTC](https://community.metabrainz.org/t/script-adds-extra-tracknumber/374476/4 "2018-04-14T14:39:01Z")

</div>

If you actually want the title to include the track number in the saved tags, no.
