Empty CD folder (When use format)

Running FileBot from the console, Groovy scripting, shell scripts, etc
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Empty CD folder (When use format)

Post by yellowdaemon »

I am using Filebot to rename files and to organize my albums.

I use this format to organize my music folder

Format: Select all

D:/media/{n}\[{y}] - {album}\CD\{artist} {media.'part/position'} -
{pi.pad(2)} - {t}
It gives me the results that i want. However, I would like to see that in cases where there is no CD structure, it doesn't create an empty CD folder. I want the CD folder only to be created when there is a CD subsection like CD1 CD2 CD3
Is there a way to correct this?

Also, i would like to know if i can schedule Filebot to run at a certain time and organize my library for me.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

e.g. add CD1/2 if CD1/2 is defined:

Format: Select all

{ if (music.medium) "CD$music.medium/" }
:arrow: viewtopic.php?t=9654


yellowdaemon wrote: 28 Jun 2023, 21:11 Also, i would like to know if i can schedule Filebot to run at a certain time and organize my library for me.
You can run filebot on a schedule, i.e. write a filebot command-line command that you can call anytime, and then have scheduling software of your choice (e.g. cron on Linux, Task Scheduler on Synology NAS, etc) call that command when needed:
https://www.filebot.net/cli.html


:idea: If you are set on using the FileBot Desktop application, then you can't have scheduled tasks that run in the background, but you can have Presets to partially automate the task at hand.
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

Many thanks for your quick response @rednoah

I have Filebot running on my Synology as well. I'm going to do the schedule from there.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

To give an update about my case.
The adjustment for the CD in the script works excellently. However, it always creates a CD folder. If there is no CD it starts with CD 1.

The reason for using the Filebot naming script is that i used Picard MusicBrainz and it ruined my collection. That was the result of bad choices. I used the wrong naming script and i used some wrong options like scan in Picard which makes a big soup of all my tracks and albums. I'm busy with Filebot to correct or restore my collection as much as possible.
So far Filebot is helping me in achieving this. The only thing is that i would like to move the non-music files in the folder to the new album location. Filebot is only moving music files.
Maybe there is a tool to recreate the playlist after I'm done with restoring.
Another thing is that some of the tracks Picard MB created have very long names. I wonder if there is an option in Filebot in the format script to restore it?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

yellowdaemon wrote: 30 Jun 2023, 11:13 The adjustment for the CD in the script works excellently. However, it always creates a CD folder. If there is no CD it starts with CD 1.
What does the MediaInfo table say for the file at hand?
viewtopic.php?t=4285

:idea: Presumably, the file is tagged as "CD 1". If it's tagged as "CD 1 of 1" or "CD 1 of undefined" then we can check for that special case.


yellowdaemon wrote: 30 Jun 2023, 11:13 So far Filebot is helping me in achieving this. The only thing is that i would like to move the non-music files in the folder to the new album location. Filebot is only moving music files.
:?: How are these companion files currently named?
viewtopic.php?t=12172


yellowdaemon wrote: 30 Jun 2023, 11:13 Another thing is that some of the tracks Picard MB created have very long names. I wonder if there is an option in Filebot in the format script to restore it?
Anything is possible. But not everything is easy. Depends largely on the MediaInfo table / file names you have at hand, and if you can use that information to generate the file paths you want.
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

Where can i find the media info?
i will check it and post it here
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

rednoah wrote: 05 Nov 2016, 14:58 :idea: Use the built-in MediaInfo Inspector to export raw MediaInfo properties for a selected file:

Icon Open FileBot ➔ Icon Edit Format ➔ Icon Change Sample ➔ Icon Open MediaInfo ➔ Copy to Clipboard

Screenshot
:arrow: Please click Copy to Clipboard and then press CTRL+V to paste the Media Info table here so that we can see what you can see.
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

here are the files

Image

https://imgur.com/a/1AKTQRe

Properties: Select all

# MediaInfoLib - v22.12

[General]
Count                      : 350
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
AudioCount                 : 1
Audio_Format_List          : FLAC
Audio_Format_WithHint_List : FLAC
Audio_Codec_List           : FLAC
CompleteName               : C:\MEDIA\Eric Clapton\01. Call Me The Breeze[3∶07][320+ 44100KHz VBR 2ch].flac
FolderName                 : C:\MEDIA\Eric Clapton
FileNameExtension          : 01. Call Me The Breeze[3∶07][320+ 44100KHz VBR 2ch].flac
FileName                   : 01. Call Me The Breeze[3∶07][320+ 44100KHz VBR 2ch]
FileExtension              : flac
Format                     : FLAC
Format/String              : FLAC
Format/Info                : Free Lossless Audio Codec
Format/Url                 : https://xiph.org/flac/
Format/Extensions          : fla flac
Format_Commercial          : FLAC
InternetMediaType          : audio/x-flac
FileSize                   : 23087552
FileSize/String            : 22.0 MiB
FileSize/String1           : 22 MiB
FileSize/String2           : 22 MiB
FileSize/String3           : 22.0 MiB
FileSize/String4           : 22.02 MiB
Duration                   : 186534
Duration/String            : 3 min 6 s
Duration/String1           : 3 min 6 s 534 ms
Duration/String2           : 3 min 6 s
Duration/String3           : 00:03:06.534
Duration/String5           : 00:03:06.534
OverallBitRate_Mode        : VBR
OverallBitRate_Mode/String : Variable
OverallBitRate             : 990170
OverallBitRate/String      : 990 kb/s
StreamSize                 : 0
StreamSize/String          : 0.00 Byte (0%)
StreamSize/String1         :  Byte0
StreamSize/String2         : 0.0 Byte
StreamSize/String3         : 0.00 Byte
StreamSize/String4         : 0.000 Byte
StreamSize/String5         : 0.00 Byte (0%)
StreamSize_Proportion      : 0.00000
Title                      : Call Me the Breeze
Album                      : The Breeze: An Appreciation of JJ Cale
Part                       : 1
Part/Position_Total        : 1
Track                      : Call Me the Breeze
Track/Position             : 1
Track/Position_Total       : 16
Performer                  : Simon Climie (piano);Walt Richmond (piano);Simon Climie (Wurlitzer electric piano);Walt Richmond (Wurlitzer electric piano);Simon Climie (Hammond organ);Walt Richmond (Hammond organ);Simon Climie (percussion);James Cruce (additional membranophone);Jim Karstein (additional membranophone);Jamie Oldaker (additional membranophone);David Teegarden (additional membranophone);Nathan East (bass);Jim Keltner (drums (drum set));Satnam Ramgotra (additional tabla)
Composer                   : Eric Clapton
Label                      : Bushbranch Records / Surfdog Records
Genre                      : Blues Rock / Rock / Roots Rock
Recorded_Date              : 2014-07-29
File_Created_Date          : UTC 2016-12-21 20:32:30.373
File_Created_Date_Local    : 2016-12-21 22:32:30.373
File_Modified_Date         : UTC 2023-06-30 19:32:50.520
File_Modified_Date_Local   : 2023-06-30 21:32:50.520
ISRC                       : USRE11500101 / USSFR1423001
Cover                      : Yes
Cover_Type                 : Cover (front)
Cover_Mime                 : image/jpeg
RELEASECOUNTRY             : US
RELEASETYPE                : album
MEDIA                      : CD
MUSICBRAINZ_ALBUMSTATUS    : official
MUSICBRAINZ_ALBUMTYPE      : album
MUSICBRAINZ_RELEASETRACKID : 9cc502fa-7b4a-4965-92c9-feeaf43d7cbc
ORIGINALYEAR               : 2014
RELEASESTATUS              : official
MUSICBRAINZ_RELEASEGROUPID : 391a0cb8-62f3-4c20-bd67-a289f52a4f04
ORIGINALDATE               : 2014-07-25
ENGINEER                   : Tony Castle / Jacob Dennis / Joe Kearns / Tim Marchiafava / Derek Parnell / Wesley Seidman / Bobby Tis / Ryan Ulyate
ASIN                       : B00K0X1PYM
ALBUMARTISTSORT            : Clapton, Eric & Friends
CATALOGNUMBER              : 55408-2
SCRIPT                     : Latn
BARCODE                    : 822685540844
ARTISTSORT                 : Clapton, Eric
ARTISTS                    : Eric Clapton
Album/Composer             : Eric Clapton & Friends

[Audio]
Count                    : 286
StreamCount              : 1
StreamKind               : Audio
StreamKind/String        : Audio
StreamKindID             : 0
Format                   : FLAC
Format/String            : FLAC
Format/Info              : Free Lossless Audio Codec
Format/Url               : https://xiph.org/flac/
Format_Commercial        : FLAC
InternetMediaType        : audio/x-flac
Duration                 : 186534
Duration/String          : 3 min 6 s
Duration/String1         : 3 min 6 s 534 ms
Duration/String2         : 3 min 6 s
Duration/String3         : 00:03:06.534
Duration/String5         : 00:03:06.534
BitRate_Mode             : VBR
BitRate_Mode/String      : Variable
BitRate                  : 983589
BitRate/String           : 984 kb/s
Channel(s)               : 2
Channel(s)/String        : 2 channels
ChannelPositions         : Front: L R
ChannelPositions/String2 : 2/0/0
ChannelLayout            : L R
SamplingRate             : 44100
SamplingRate/String      : 44.1 kHz
SamplingCount            : 8226149
BitDepth                 : 16
BitDepth/String          : 16 bits
Compression_Mode         : Lossless
Compression_Mode/String  : Lossless
StreamSize               : 22934110
StreamSize/String        : 21.9 MiB (99%)
StreamSize/String1       : 22 MiB
StreamSize/String2       : 22 MiB
StreamSize/String3       : 21.9 MiB
StreamSize/String4       : 21.87 MiB
StreamSize/String5       : 21.9 MiB (99%)
StreamSize_Proportion    : 0.99335
MD5_Unencoded            : 224327D80CCED6344F67C4602C62402B




The name of the file in Filebot change when renaming, into a long name as you can see on the picture. These files cannot be processed by Filebot, so i have to delete or exclude them
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

The file is tagged as CD1 of 1CDs:

Properties: Select all

Part                       : 1
Part/Position_Total        : 1
:arrow: You can do a check for that:

Format: Select all

{ if (music.medium && music.mediumCount > 1) "CD$music.medium/" }

Properties: Select all

Performer                  : Simon Climie (piano);Walt Richmond (piano);Simon Climie (Wurlitzer electric piano);Walt Richmond (Wurlitzer electric piano);Simon Climie (Hammond organ);Walt Richmond (Hammond organ);Simon Climie (percussion);James Cruce (additional membranophone);Jim Karstein (additional membranophone);Jamie Oldaker (additional membranophone);David Teegarden (additional membranophone);Nathan East (bass);Jim Keltner (drums (drum set));Satnam Ramgotra (additional tabla)
:!: You'll want to not use Performer in this case.

:?: Which property do you want to use instead though? The available metadata gives you quite a few options:

Properties: Select all

Composer                   : Eric Clapton
ALBUMARTISTSORT            : Clapton, Eric & Friends
ARTISTS                    : Eric Clapton
Album/Composer             : Eric Clapton & Friends
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

What i want is that it to use the name in the title as it should and not that long name as you can see in the green characters in the image. It should be renamed in line with the format i use.

Format: Select all

O:/OUTPUT/{n}\[{y}] - {album}\{ if (music.medium) "CD$music.medium/" }\{artist} {media.'part/position'} -
{pi.pad(2)} - {t}
You can do a check for that:

Format: Select all

{ if (music.medium && music.mediumCount > 1) "CD$music.medium/" }
Does it check if there is a CD in the tag and if there is one it creates a CD directory or else no CD directory?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

:idea: You're using {n} which happens to default to {artist} which happens to default to {media.Performer} in this case. So you get Simon Climie (piano);Walt Richmond (piano);... because that's what the Performer property says. The generated file path is in line with your format. The result just happens to not be what you want.

:arrow: Use {media.Composer} instead of {n} if you want to insert Eric Clapton at that position in the file path:

Properties: Select all

Composer                   : Eric Clapton



:idea: This code generates either nothing for non-CD files and CD 1of1 files, or "CD1/" "CD2/" etc depending on the values of {music.medium} and {music.mediumCount} which happen to be based on the {media.Part} and {media.PartPositionTotal} properties in this case, thus add "CD1/" to the file path for some files but not others, thus create CD1 folders for some files but not others:

Format: Select all

{ if (music.medium && music.mediumCount > 1) "CD$music.medium/" }

Properties: Select all

Part                       : 1
Part/Position_Total        : 1



:arrow: You therefore want to adjust your format as follows:

Format: Select all

O:/OUTPUT/
{media.Composer}/
[{y}] - {album}/
{ if (music.medium && music.mediumCount > 1) "CD$music.medium/" }
{artist} { if (music.medium && music.mediumCount > 1) music.medium } - {pi.pad(2)} - {t}
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

It is because Picard messed up my library. 95% of my collection doesn't have that long name but only the normal artist name. I'm afraid that if i change my format to media.composer i will not always get the artist's name as the first. I want the artist's name to be the first, followed by the year and album. If i will achieve the same thing with media composer then i will change it. If not i will leave it to artist {n} and i will try to find a way to change the tags of the song.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

rednoah wrote: 01 Jul 2023, 08:32 :idea: You're using {n} which happens to default to {artist} which happens to default to {media.Performer} in this case. So you get Simon Climie (piano);Walt Richmond (piano);... because that's what the Performer property says. The generated file path is in line with your format. The result just happens to not be what you want.

:arrow: Use {media.Composer} instead of {n} if you want to insert Eric Clapton at that position in the file path:

Properties: Select all

Composer                   : Eric Clapton



:idea: This code generates either nothing for non-CD files and CD 1of1 files, or "CD1/" "CD2/" etc depending on the values of {music.medium} and {music.mediumCount} which happen to be based on the {media.Part} and {media.PartPositionTotal} properties in this case, thus add "CD1/" to the file path for some files but not others, thus create CD1 folders for some files but not others:

Format: Select all

{ if (music.medium && music.mediumCount > 1) "CD$music.medium/" }

Properties: Select all

Part                       : 1
Part/Position_Total        : 1



:arrow: You therefore want to adjust your format as follows:

Format: Select all

O:/OUTPUT/
{media.Composer}/
[{y}] - {album}/
{ if (music.medium && music.mediumCount > 1) "CD$music.medium/" }
{artist} { if (music.medium && music.mediumCount > 1) music.medium } - {pi.pad(2)} - {t}
@Rednoah, thanks for the CD code. I will apply it.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

yellowdaemon wrote: 01 Jul 2023, 13:40 It is because Picard messed up my library. 95% of my collection doesn't have that long name but only the normal artist name. I'm afraid that if i change my format to media.composer i will not always get the artist's name as the first. I want the artist's name to be the first, followed by the year and album. If i will achieve the same thing with media composer then i will change it. If not i will leave it to artist {n} and i will try to find a way to change the tags of the song.
You can have your format use one or the other depending on the file at hand.

e.g. use n if n is shorter than 30 characters, otherwise use media.Composer instead:

Format: Select all

{ n.length() < 30 ? n : media.Composer }
** this expression may yield nothing if n is long and media.Composer is undefined
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

I use the media composer format, but unfortunately it didn't give me the results that i want.

What i want must look like this

Image

To be more specific. I don't want the composer in the name because it creates a long name.
I just want the name of the artist in every track as shown in the picture.

And i forgot to mention that the name length of 30 give me back the name of the artist as you can see on the pic, but with the composer in the format it also creates tracks like what you see in the image here beneath

Image

The name is too long that i can't even put everything in the print screen.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

:idea: {artist} happens to default to {media.Performer}. Sounds like you don't want to use {artist} / {media.Performer} in your format either. Pretty much the same as what we discussed previously in the context of {n}. So the same solution applies, use {artist} if it's short, or use something else if {artist} is not what we want for the file at hand:

Format: Select all

{ artist.length() < 30 ? artist : media.Composer }
Hence:

Format: Select all

O:/OUTPUT/
{ n.length() < 30 ? n : media.Composer }/
[{y}] - {album}/
{ if (music.medium && music.mediumCount > 1) "CD$music.medium/" }
{ artist.length() < 30 ? artist : media.Composer } { if (music.medium && music.mediumCount > 1) music.medium } - {pi.pad(2)} - {t}


:arrow: Please post the MediaInfo table for the files for which the format above does not yet work the way you want, and make sure to tell us which MediaInfo property you would like to use for your file names instead of the one that is currently being used.
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

@Rednoah

It works now.
I use the latest format you posted and now it works as how i want it.

Image

Thank you very much for your help and patience.

I'm so happy
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

I'm sorry to bother you again but i ran into some problems using the above script.
  1. The script works very well but it is not that good for using it with a Various artist album. In the script after the CD1 or CD2 i start with the album name, then the track number, and at last the track. That gave problems when you want to sort things out to let the first track be the first and the last track be the last. It sorts the track based on the first character it found. As i said for Various Artists it is a problem.
  • If there is a CD section like CD1, CD2, CD3, the script makes for every CD a subdirectory after the Album. Therefore you will have a year and Album name and after that, you will have 3 CD subdirectories. However, that is not such a good idea when you want to make a playlist cause the playlist is based on the name of the folder. If you want to copy all the playlists to a centralized folder that would make it impossible since you will have a lot of CD1, or CD2 coming from different albums.
I adjust the script so that when it comes to the first point, the track subsections begin with the track number and then the artist (composer), and then the track name itself.
I also adjust the script for the second point but i am not satisfied with that cause my solution is that in cases where there is a CD the same of that directory becomes a composition of the album name and CD(n) with a dash between them. The only thing is that when there is no CD i'm stuck with the album name and a dash. I would like to see that if there is no CD you also have no album name with dash left over. here under i show what i mean

When there is no CD

Code: Select all

M:/TEST/Various Artists/[2023] - The Best Golden Oldies Album In The World...Ever!/The Best Golden Oldies Album In The World...Ever! -/58 - Cher - Dark Lady
M:/TEST/ABBA/[2010] - Gold: Greatest Hits/Gold: Greatest Hits -/01 - ABBA - Dancing Queen

When there is a CD

Code: Select all

M:/TEST/U2/[2014] - Songs of Innocence/Songs of Innocence - CD2/01 - U2 - Lucifer’s Hands
I hope you understand my point.
If i can manage to only make a combination of Album name and CD when there is a CD it would be fine. If there is no CD i would like to see it like this:

Code: Select all

M:/TEST/ABBA/[2010] - Gold: Greatest Hits/01 - ABBA - Dancing Queen

Here is the adjusted script

Format: Select all

M:/ TEST/
{ n.length() < 30 ? n : media.Composer }/
[{y}] - {album}/
{album} - { if (music.medium && music.mediumCount > 1) "CD$music.medium/" }/
{pi.pad(2)} - { artist.length() < 30 ? artist : media.Composer } - {t}
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

:?: Can you share MediaInfo properties for 1 sample file that covers your various artist album corner case? How would you want this 1 sample file named and organized?
viewtopic.php?t=13811



e.g. make the " - CD1" bit optional:

Format: Select all

{album}{ if (music.medium && music.mediumCount > 1) " - CD$music.medium" }/
e.g. make the entire "Album - CD1" folder optional:

Format: Select all

{ if (music.medium && music.mediumCount > 1) "$album - CD$music.medium/" }
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

I'm not sure if i understand your first question but here under is the Media info of a file from the Various Artist Album

Properties: Select all

# MediaInfoLib - v22.12

[General]
Count                      : 337
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
AudioCount                 : 1
Audio_Format_List          : FLAC
Audio_Format_WithHint_List : FLAC
Audio_Codec_List           : FLAC
CompleteName               : M:\TEST\Various Artists\[2023] - The Best Golden Oldies Album In The World...Ever!\Cat Stevens - 01 - Father And Son (Remastered 2020).flac
FolderName                 : M:\TEST\Various Artists\[2023] - The Best Golden Oldies Album In The World...Ever!
FileNameExtension          : Cat Stevens - 01 - Father And Son (Remastered 2020).flac
FileName                   : Cat Stevens - 01 - Father And Son (Remastered 2020)
FileExtension              : flac
Format                     : FLAC
Format/String              : FLAC
Format/Info                : Free Lossless Audio Codec
Format/Url                 : https://xiph.org/flac/
Format/Extensions          : fla flac
Format_Commercial          : FLAC
InternetMediaType          : audio/x-flac
FileSize                   : 22415628
FileSize/String            : 21.4 MiB
FileSize/String1           : 21 MiB
FileSize/String2           : 21 MiB
FileSize/String3           : 21.4 MiB
FileSize/String4           : 21.38 MiB
Duration                   : 221120
Duration/String            : 3 min 41 s
Duration/String1           : 3 min 41 s 120 ms
Duration/String2           : 3 min 41 s
Duration/String3           : 00:03:41.120
Duration/String5           : 00:03:41.120
OverallBitRate_Mode        : VBR
OverallBitRate_Mode/String : Variable
OverallBitRate             : 810985
OverallBitRate/String      : 811 kb/s
StreamSize                 : 0
StreamSize/String          : 0.00 Byte (0%)
StreamSize/String1         :  Byte0
StreamSize/String2         : 0.0 Byte
StreamSize/String3         : 0.00 Byte
StreamSize/String4         : 0.000 Byte
StreamSize/String5         : 0.00 Byte (0%)
StreamSize_Proportion      : 0.00000
Title                      : Father And Son (Remastered 2020)
Album                      : The Best Golden Oldies Album In The World...Ever!
Album/Performer            : Various Artists
Track                      : Father And Son (Remastered 2020)
Track/Position             : 1
Track/Position_Total       : 102
Performer                  : Cat Stevens
Composer                   : Cat Stevens
EncodedBy                  : PMEDIA
Label                      : PMEDIA
Genre                      : Pop, Rock
Recorded_Date              : 2023-06-09
File_Created_Date          : UTC 2023-07-22 20:46:48.576
File_Created_Date_Local    : 2023-07-22 22:46:48.576
File_Modified_Date         : UTC 2023-07-23 07:00:35.624
File_Modified_Date_Local   : 2023-07-23 09:00:35.624
ISRC                       : PMEDIA
Copyright                  : PMEDIA
Cover                      : Yes
Cover_Description          : PMEDIA
Cover_Type                 : Cover (front)
Cover_Mime                 : image/jpeg
Comment                    : PMEDIA
COMPILATION                : PMEDIA
CREDITS                    : PMEDIA
PROVIDER                   : PMEDIA
PUBLISHER                  : PMEDIA
RELEASECOUNTRY             : PMEDIA
WORK                       : PMEDIA

[Audio]
Count                    : 286
StreamCount              : 1
StreamKind               : Audio
StreamKind/String        : Audio
StreamKindID             : 0
Format                   : FLAC
Format/String            : FLAC
Format/Info              : Free Lossless Audio Codec
Format/Url               : https://xiph.org/flac/
Format_Commercial        : FLAC
InternetMediaType        : audio/x-flac
Duration                 : 221120
Duration/String          : 3 min 41 s
Duration/String1         : 3 min 41 s 120 ms
Duration/String2         : 3 min 41 s
Duration/String3         : 00:03:41.120
Duration/String5         : 00:03:41.120
BitRate_Mode             : VBR
BitRate_Mode/String      : Variable
BitRate                  : 806519
BitRate/String           : 807 kb/s
Channel(s)               : 2
Channel(s)/String        : 2 channels
ChannelPositions         : Front: L R
ChannelPositions/String2 : 2/0/0
ChannelLayout            : L R
SamplingRate             : 44100
SamplingRate/String      : 44.1 kHz
SamplingCount            : 9751392
BitDepth                 : 16
BitDepth/String          : 16 bits
Compression_Mode         : Lossless
Compression_Mode/String  : Lossless
StreamSize               : 22292191
StreamSize/String        : 21.3 MiB (99%)
StreamSize/String1       : 21 MiB
StreamSize/String2       : 21 MiB
StreamSize/String3       : 21.3 MiB
StreamSize/String4       : 21.26 MiB
StreamSize/String5       : 21.3 MiB (99%)
StreamSize_Proportion    : 0.99449
Encoded_Library          : Mutagen 1.45.1
Encoded_Library/String   : Mutagen 1.45.1
MD5_Unencoded            : 00000000000000000000000000000000

When it comes to your second and third question: I would like the combination of album name and CD(n) to be optional. That means that if there is no CD you just get the Album name followed by the tracknumber - trackartistname and trackname. like here under
M:/TEST/Various Artists/[2023] - The Best Golden Oldies Album In The World...Ever!/36 - Creedence Clearwater Revival - Have You Ever Seen The Rain
If there is a CD you will see a combination of album and CD like a mentioned in my earlier post

The result will always create a unique playlist for every root and subdirectory.


After the tracknumber i prefer the person that sang that song, and not the artist of the whole album, cause in the case of various artists you can see who sang a specific track. i think that is covered with artist : mediacomposer in the script but I'm not sure about that.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

This is the solution to your first question:
rednoah wrote: 23 Jul 2023, 02:07 e.g. make the entire "Album - CD1" folder optional:

Format: Select all

{ if (music.medium && music.mediumCount > 1) "$album - CD$music.medium/" }
You would integrate that line into your existing format like so:

Format: Select all

M:/ TEST/
{ n.length() < 30 ? n : media.Composer }/
[{y}] - {album}/
{ if (music.medium && music.mediumCount > 1) "$album - CD$music.medium/" }
{pi.pad(2)} - { artist.length() < 30 ? artist : media.Composer } - {t}


:idea: {artist} will probably give you the Performer value in this case, so the format above should already give you the value you want:

Properties: Select all

Performer                  : Cat Stevens
Composer                   : Cat Stevens
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

Thanks! i will try it and let you know what the results are.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

I tried the script in my Windows version of Filebot and it worked. Thanks for your help

However, i wanted to run the script on my Filebot package on my Synology NAS, but it produce a different result.
If i run the same script on the NAS it creates for every artist that participates on the album a separate folder.
I test it with some albums of Avicii.
You would think it would create the folder Avicii as the root folder followed by the subfolder year and album name. Instead, it creates several folders. for every artist a folder followed by year and album name.
Further, i wanted to exclude mp3 files since i only wanted to rename and move flac files but i didn't find an option for it.

Here are some links to my Synology configuration.
https://imgur.com/Zmymyae
https://imgur.com/dpASoA4

ScreenshotScreenshot


By the way, i don't know what Strict Mode does but i choose it.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Empty CD folder (When use format)

Post by rednoah »

:?: What does the console output say? (the text in the black box on the lower-right)

:?: Did you test with the same file in your client-side Windows Desktop test and your server-side FileBot Node test?

:?: What is the MediaInfo for your Avicii sample file at you are testing with now?
:idea: Please read the FAQ and How to Request Help.
yellowdaemon
Posts: 32
Joined: 07 Jan 2021, 16:09

Re: Empty CD folder (When use format)

Post by yellowdaemon »

I tested it again and i saw that i made a mistake. In both Windows and on my Synology NAS its creates for every artist a folder.

The script must work in that way that it always start with the name of the Album

I tested on Windows. Below you will see a screen image of the test

https://imgur.com/n6lotzH

Screenshot

M:/TEST/Arash Pournouri Tim Bergling Nile Rodgers Avicii/[2014] - True/07 - Arash Pournouri Tim Bergling Nile Rodgers Avicii - Shame On Me

This should be:

M:/TEST/Avicii/[2014] - True/07 - Arash Pournouri Tim Bergling Nile Rodgers Avicii - Shame On Me

Here are the results if i run the script in Windows for this particular artist. I didn't see it with other Albums.

https://imgur.com/qYNBzkZ

Screenshot

I test another artist but with that one i see the artist name 2 times
Like Billy Joel Billy Joel.
Take a look yourself
https://imgur.com/PhPklxm

Screenshot

Here under is the media info for the song <Shame On Me>

Properties: Select all

# MediaInfoLib - v22.12

[General]
Count                      : 379
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
AudioCount                 : 1
Audio_Format_List          : FLAC
Audio_Format_WithHint_List : FLAC
Audio_Codec_List           : FLAC
Audio_Language_List        : English
CompleteName               : M:\[0002] - MUSIC-FILES\Avicii\[2014] - True\Avicii - 07 - Shame On Me.flac
FolderName                 : M:\[0002] - MUSIC-FILES\Avicii\[2014] - True
FileNameExtension          : Avicii - 07 - Shame On Me.flac
FileName                   : Avicii - 07 - Shame On Me
FileExtension              : flac
Format                     : FLAC
Format/String              : FLAC
Format/Info                : Free Lossless Audio Codec
Format/Url                 : https://xiph.org/flac/
Format/Extensions          : fla flac
Format_Commercial          : FLAC
InternetMediaType          : audio/x-flac
FileSize                   : 31854266
FileSize/String            : 30.4 MiB
FileSize/String1           : 30 MiB
FileSize/String2           : 30 MiB
FileSize/String3           : 30.4 MiB
FileSize/String4           : 30.38 MiB
Duration                   : 251425
Duration/String            : 4 min 11 s
Duration/String1           : 4 min 11 s 425 ms
Duration/String2           : 4 min 11 s
Duration/String3           : 00:04:11.425
Duration/String5           : 00:04:11.425
OverallBitRate_Mode        : VBR
OverallBitRate_Mode/String : Variable
OverallBitRate             : 1013559
OverallBitRate/String      : 1 014 kb/s
StreamSize                 : 0
StreamSize/String          : 0.00 Byte (0%)
StreamSize/String1         :  Byte0
StreamSize/String2         : 0.0 Byte
StreamSize/String3         : 0.00 Byte
StreamSize/String4         : 0.000 Byte
StreamSize/String5         : 0.00 Byte (0%)
StreamSize_Proportion      : 0.00000
Title                      : Shame On Me
Album                      : True
Part                       : 1
Part/Position_Total        : 1
Track                      : Shame On Me
Track/Position             : 7
Track/Position_Total       : 15
Performer                  : Peter Dyer (keys, talkbox);Audra Mae (vocals);Sterling Fox (vocals)
Composer                   : Arash Pournouri / Tim Bergling / Nile Rodgers / Avicii
Producer                   : PRMD,Universal Music
Label                      : PRMD
Genre                      : House / Electronic / Avicii
Recorded_Date              : 2014-01-22
File_Created_Date          : UTC 2023-07-23 19:39:40.679
File_Created_Date_Local    : 2023-07-23 21:39:40.679
File_Modified_Date         : UTC 2023-07-24 15:25:49.492
File_Modified_Date_Local   : 2023-07-24 17:25:49.492
ISRC                       : CH3131340088
Cover                      : Yes
Cover_Type                 : Cover (front)
Cover_Mime                 : image/jpeg
Comment                    : {'Classical Extras': {'Artists options': {'run extra artists': True, 'orchestra strings': 'orchestra, philharmonic, philharmonica, philharmoniker, musicians, academy, symphony, orkester', 'choir strings': 'choir, choir vocals, chorus, singers, domchors, domspatzen, koor, kammerkoor', 'group strings': 'ensemble, band, group, trio, quartet, quintet, sextet, septet, octet, chamber, consort, players, les ,the , quartett', 'replace artist name with alias?': 'replace', 'alias vs credited-as': 'alias over-rides', 'use recording artist': False, 'recording artist name style': 'performer', 'disallow blank recording artist': False, 'recording artist effect on track artist': 'merge', 'Album prefix': True, 'include arrangers': True, 'exclude lyricists if no vocals': True, 'fix cyrillic': True, 'use release credited-as name': True, 'use release relationship credited-as name': True, 'use release-group credited-as name': True, 'use recording credited-as name': False, 'use recording relationship credited-as name': True, 'use track credited-as name': True, 'use credited-as name for performer': True, 'use credited-as name for composer': False, 'use credited instrument': True, 'exclude solo': True, 'chorusmaster': 'choirmaster', 'orchestrator': 'orch.', 'concertmaster': 'leader', 'lyricist': 'lyrics', 'librettist': 'libretto', 'writer': 'writer', 'arranger': 'arr.', 'reconstructed by': 'reconstructed', 'revised by': 'revised', 'translator': 'trans.', 'split lyrics': True, 'lyrics': 'lyrics', 'album lyrics': 'albumnotes', 'track lyrics': 'tracknotes', 'Tags to blank': 'artist, artistsort', 'Tags to blank 2': 'performer:orchestra, performer:choir, performer:choir vocals', 'File tags to keep': '', 'Clear previous tags': False, 'populate sort tags': True, 'standardize artists': False, 'translate artist names': False, 'line 1': {'source': 'album_soloists, album_ensembles, album_conductors', 'tag': 'artist, artists', 'conditional': False}, 'line 2': {'source': 'recording_artists', 'tag': 'artist, artists', 'conditional': True}, 'line 3': {'source': 'soloist_names, ensemble_names, conductors', 'tag': 'artist, artists', 'conditional': True}, 'line 4': {'source': 'soloists', 'tag': 'soloists, trackartist, involved people', 'conditional': False}, 'line 5': {'source': 'release', 'tag': 'release_name', 'conditional': False}, 'line 6': {'source': 'ensemble_names', 'tag': 'band', 'conditional': False}, 'line 7': {'source': 'composers', 'tag': 'artist', 'conditional': True}, 'line 8': {'source': 'MB_artists', 'tag': 'composer', 'conditional': True}, 'line 9': {'source': 'arranger', 'tag': 'composer', 'conditional': True}, 'line 10': {'source': '', 'tag': '', 'conditional': False}, 'line 11': {'source': '', 'tag': '', 'conditional': False}, 'line 12': {'source': '', 'tag': '', 'conditional': False}, 'line 13': {'source': '', 'tag': '', 'conditional': False}, 'line 14': {'source': '', 'tag': '', 'conditional': False}, 'line 15': {'source': '', 'tag': '', 'conditional': False}, 'line 16': {'source': '', 'tag': '', 'conditional': False}}}} (artists_options) / {'Classical Extras': {'Works options': {'run work parts': True, 'include collection relations': True, 'allow-empty-parts': True, 'min common words to eliminate': 2, 'in-string proximity trigger': 2, 'end-string proximity trigger': 1, 'hyphen-splitting': True, 'similarity threshold': 100, 'disallow empty part names': True, 'prepositions': "a, the, in, on, at, of, after, and, de, d'un, d'une, la, le, no, from, &, e, ed, et, un, une, al, ala, alla", 'ignore prefixes': ' part , act , scene, movement, movt, no. , no , n., n , nr., nr , book , the , a , la , le , un , une , el , il , tableau, from , KV ,Concerto in, Concerto', 'synonyms': '(1, one) / (2, two) / (3, three) / (&, and) / (Rezitativ, Recitativo, Recitative) / (Sinfonia, Sinfonie, Symphonie, Symphony) / (Arie, Aria) / (Minuetto, Menuetto, Minuetta, Menuet, Minuet) / (Bourée, Bouree , Bourrée)', 'replacements': '(words to be replaced, replacement words) / (please blank me, ) / (etc, etc)', 'Style': 'Extended', 'Work source': 'Hierarchy', 'Derive works from title': True, 'movement tag inc num': 'part, movement, subtitle', 'movement tag exc num': '', '1-level movement tag inc num': 'movement', '1-level movement tag exc num': '', 'movement num tag': 'movementnumber', 'movement tot tag': 'movementtotal', 'multi-level work tag': 'groupheading, work', 'single level work tag': '', 'top level work tag': 'top_work, style, grouping', 'multi-level work separator': ':', 'single level work separator': ':', 'movement number separator': '.', 'show partial recordings': True, 'partial text': '(part)', 'include arrangement of': True, 'arrangements text': 'Arrangement:', 'list medleys': True, 'medley text': 'Medley', 'main genre tag': 'genre', 'sub-genre tag': 'sub-genre', 'source genre from file': True, 'source genre from folksonomy tags': True, 'source genre from work-type(s)': True, 'infer genre from artist details(s)': False, 'apply filter to genres': True, 'classical main genres': 'Classical, Chamber music, Concerto, Symphony, Opera, Orchestral, Sonata, Choral, Aria, Ballet, Oratorio, Motet, Symphonic poem, Suite, Partita, Song-cycle, Overture, Mass, Cantata', 'classical sub-genres': 'Chant, Classical crossover, Minimalism, Avant-garde, Impressionist, Aria, Duet, Trio, Quartet', 'general main genres': 'Alternative music, Blues, Country, Dance, Easy listening, Electronic music, Folk, Folk / pop, Hip hop / rap, Indie,  Religious, Asian, Jazz, Latin, New age, Pop, R&B / Soul, Reggae, Rock, World music, Celtic folk, French Medieval', 'general sub-genres': 'Song, Vocal, Christmas, Instrumental', 'treat arranger as for composer for genre-setting': True, 'make tracks classical': 'selective', 'exclude "classical" from main genre tag': False, 'classical flag': '1', 'classical flag tag': 'is_classical', 'default genre': 'Other', 'instruments tag': 'instrument', 'use MB instrument names': True, 'use credited instrument names': True, 'key tag': 'key', 'contingent include key in workname': 'contingent', 'workdate tag': 'work_year', 'use composed for workdate': True, 'use published for workdate': True, 'use premiered for workdate': True, 'use all workdate sources': 'all', 'annotate dates': True, 'include workdate in workname': True, 'period tag': 'period', 'treat arranger as for composer for period-setting': False, 'period map': 'Early, -3000,800; Medieval, 800,1400; Renaissance, 1400, 1600; Baroque, 1600,1750; Classical, 1750,1820; Early Romantic, 1800,1850; Late Romantic, 1850,1910; 20th Century, 1910,1975; Contemporary, 1975,2525'}}} (workparts_options)
MUSICBRAINZ_ALBUMSTATUS    : official
MUSICBRAINZ_ALBUMTYPE      : album
INSTRUMENT                 : talkbox; keys; keyboard / vocals
RELEASECOUNTRY             : JP
COMPOSERSORT               : Arash Pournouri / Bergling, Tim / Rodgers, Nile
MOVEMENTNAME               : Shame on Me
INVOLVED PEOPLE            : Peter Dyer (keys, talkbox) / Audra Mae (vocals) / Sterling Fox (vocals)
INVOLVED PEOPLE_SORT       : Dyer, Peter / Mae, Audra / Sterling Fox
SUBTITLE                   : Shame on Me
ORIGINALDATE               : 2013-08-13
ORIGINALYEAR               : 2013
PRODUCER                   : Tim Bergling
ARTISTSORT                 : Avicii
Recorded/Location          : https://www.discogs.com/Avicii-True-Avicii-By-Avicii/release/11298326
ARTISTS                    : Avicii
RELEASETYPE                : album
TOP_WORK                   : Shame on Me
STYLE                      : Shame on Me
MUSICBRAINZ_RELEASEGROUPID : 61180839-f4a7-407f-b86f-24c48eef4066
SCRIPT                     : Latn
CATALOGNUMBER              : UICO-9066
AB:GENRE                   : Electronic / Trance / Dance / Jazz
BARCODE                    : 4988005804662
ASIN                       : B00GNJA6ME
PART                       : Shame on Me
MEDIATYPE                  : CD
SOLOISTS                   : Peter Dyer (keys, talkbox) / Audra Mae (vocals) / Sterling Fox (vocals)
PERFORMER_SORT             : Dyer, Peter / Mae, Audra / Sterling Fox
RELEASESTATUS              : official
ALBUMARTISTSORT            : Avicii
AB:MOOD                    : Not acoustic / Not aggressive / Electronic / Happy / Not party / Relaxed / Not sad
SOLOISTS_SORT              : Dyer, Peter / Mae, Audra / Sterling Fox
SUB-GENRE                  : Song
TRACKARTISTSORT            : Dyer, Peter / Mae, Audra / Sterling Fox
MEDIA                      : CD
ARTISTS_SORT               : Avicii
STAMP                      : Version 2.0.14 of Classical Extras
COUNTRY                    : Japan
003_INFORMATION:GENRES     : Candidate genres found but not matched: Eurodance
GROUPING                   : Shame on Me
MIXER                      : Tim Bergling
TRACKARTIST                : Peter Dyer (keys, talkbox) / Audra Mae (vocals) / Sterling Fox (vocals)
WRITER                     : Arash Pournouri / Tim Bergling / Peter Dyer / Audra Mae / Nile Rodgers / Sterling Fox
CONTENTGROUP               : Electronic/Pop
MUSICBRAINZ_RELEASETRACKID : 76f28cd0-b7ec-430a-a52d-4d561b36a8ac
MUSICBRAINZ_WORKID         : b061f873-bba9-4e62-95fa-3ee0c3292627
WORK                       : Shame on Me
Album/Composer             : Avicii

[Audio]
Count                    : 286
StreamCount              : 1
StreamKind               : Audio
StreamKind/String        : Audio
StreamKindID             : 0
Format                   : FLAC
Format/String            : FLAC
Format/Info              : Free Lossless Audio Codec
Format/Url               : https://xiph.org/flac/
Format_Commercial        : FLAC
InternetMediaType        : audio/x-flac
Duration                 : 251425
Duration/String          : 4 min 11 s
Duration/String1         : 4 min 11 s 425 ms
Duration/String2         : 4 min 11 s
Duration/String3         : 00:04:11.425
Duration/String5         : 00:04:11.425
BitRate_Mode             : VBR
BitRate_Mode/String      : Variable
BitRate                  : 1010497
BitRate/String           : 1 010 kb/s
Channel(s)               : 2
Channel(s)/String        : 2 channels
ChannelPositions         : Front: L R
ChannelPositions/String2 : 2/0/0
ChannelLayout            : L R
SamplingRate             : 44100
SamplingRate/String      : 44.1 kHz
SamplingCount            : 11087842
BitDepth                 : 16
BitDepth/String          : 16 bits
Compression_Mode         : Lossless
Compression_Mode/String  : Lossless
StreamSize               : 31758014
StreamSize/String        : 30.3 MiB (100%)
StreamSize/String1       : 30 MiB
StreamSize/String2       : 30 MiB
StreamSize/String3       : 30.3 MiB
StreamSize/String4       : 30.29 MiB
StreamSize/String5       : 30.3 MiB (100%)
StreamSize_Proportion    : 0.99698
Language                 : en
Language/String          : English
Language/String1         : English
Language/String2         : en
Language/String3         : eng
Language/String4         : en
MD5_Unencoded            : 00000000000000000000000000000000



Let me know if you need more info.
Maybe the scripts work fine and maybe some Albums have the wrong metadata or Media info.
Post Reply