IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

2 Pages V  < 1 2  
Reply to this topicStart new topic
> Scripting Function that Derives DISCNUMBER from FOLDER
DetlevD
post Sep 19 2017, 18:06
Post #16


Member


Group: Full Members
Posts: 6750
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.85



QUOTE (ragtag @ Sep 19 2017, 18:23) *
... The first of the above two scripts somehow inserts a space into the DISCNUMBER tag. It applies a space for single-album discs, and space after the disc number too, for multi-disc albums. ... That said, I eventually tested the second one of the above two scripts, and so far it has performed splendidly. However, I will still appreciate it very much if you could show me where the first of the two expressions happened to insert the space into the DISCNUMBER field. Thank you.

Because there is no space character at all within the given format string, the space character, which you have detected, may probably be inserted by a %variable% or simply by writing error, ... and at all, who ever knows, beside you, how the involved folder names are spelled?

DD.20170919.1906.CEST


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
MyAlteredEgo
post Oct 13 2017, 19:32
Post #17


Member


Group: Full Members
Posts: 79
Joined: 3-January 17
Member No.: 22893
Mp3tag Version: 2.85



How would one apply this idea in reverse?

What I am looking at doing is moving and relabeling as required however I already have the Disc Numbers but would like to include existing Folder Names (if applicable) as well for example if I have the following:

Disc 1 (Classic Album)
Disc 2 (Remix Album)

from something like this for example: ( https://www.discogs.com/wumpscut-Wreath-Of-...release/5533104 )

What I am trying to do is Create the above without having to rename the "album"? Am guessing, that I am going to have to create a user defined field and than apply it afterwards something like

If _directory is number and word for disc than user defined filed is word
move directory to new location and format again multidisc as required however put back in the user defined field

something like

Disc $num(%discnumber%,2)\%_filename_ext%,%discnumber%%userdefined%\%_filename_ext%

or is there an alternative?

With special thanks to ohrenkino I was able to come up with the following that works for the original idea. What it does is it generates folders based off Disc numbers and names (which omits any empty disc numbers) but how do I combine both?

Format Filename>
$ifgreater($len(%discnumber%),0,$ifgreater(%discnumber%,0,Disc $num(%discnumber%,2)\%_filename_ext%,%discnumber%\%_filename_ext%),$num(%track%,2) - %title%)

This post has been edited by MyAlteredEgo: Oct 13 2017, 21:55
Go to the top of the page
 
+Quote Post
MyAlteredEgo
post Oct 14 2017, 01:41
Post #18


Member


Group: Full Members
Posts: 79
Joined: 3-January 17
Member No.: 22893
Mp3tag Version: 2.85



If _directory is number and word for disc than user defined filed is word
move directory to new location and format again multidisc as required however put back in the user defined field

something like

Disc $num(%discnumber%,2)\%_filename_ext%,%discnumber%%userdefined%\%_filename_ext%


[/quote]

So I have come up with the following work around using the above idea...and it works somewhat..
Format Value LABEL>%_directory%
Replace with regular expression
%label%
^(CD|DISC|DISK)\s*[0-9]+\s+
replaced with " "

Disc $num(%discnumber%,2)\%_filename_ext%,%discnumber%%label%\%_filename_ext%

I would like it to not process anything if the folder does not have any words following the (CD|DISC|DISK)\s*[0-9]+\s+ however this pulls any folder information such in this case it pulls any wording in the Folder...which isn't quite what I had in mind...looking to pull only whatever follows (CD|DISC|DISK)\s*[0-9]+\s+ and if nothing than do nothing..
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th January 2018 - 17:02