Script not sorting into "Artist" folder properly

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
criscodisco
Posts: 2
Joined: 08 Oct 2015, 03:45

Script not sorting into "Artist" folder properly

Post by criscodisco »

Hey all,

I had a lot of trouble configuring the filebot script to properly sort my music files, and ended up having to fork the amc script from git in order to switch the music db from acoustid to id3 tags. the tags are working a lot better, and i ALMOST have everything set up the way I'd like, but for some reason certain albums I'm downloading aren't properly being sorted into their artist file. I suspect it may have something to do with certain cases when the artist folder has already been created. Here's how I'd like to sort:

~/Artist/(year) albumname/01 songname.mp3

Here's what I end up getting some of the time:
~/(year) albumname/01 songname.mp3

AMC Script I have transmission call:
filebot -script /home/patrick/Filebot/scripts-devel/amc.groovy --output "/home" --log-file amc.log --action copy --conflict override -non-strict --def music=y artwork=y "musicFormat=/home/patrick/Music/{n}/{'('+y+') '}{album}/{pi.pad(2)} {t}" "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME" excludeList=amc-input.txt

Filebot output:
Run script [/home/patrick/Filebot/scripts-devel/amc.groovy] at [Wed Oct 07 23:43:43 EDT 2015]
Parameter: music = y
Parameter: artwork = y
Parameter: musicFormat = /home/patrick/Music/{n}/{'('+y+') '}{album}/{pi.pad(2)} {t}
Parameter: ut_dir = /home/seeding/Deerhunter - [2007] Cryptograms
Parameter: ut_kind = multi
Parameter: ut_title = Deerhunter - [2007] Cryptograms
Parameter: excludeList = amc-input.txt
Using excludes: /home/amc-input.txt (248)
Input: /home/seeding/Deerhunter - [2007] Cryptograms/01 - Intro.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/02 - Cryptograms.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/03 - White Ink.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/04 - Lake Somerset.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/05 - Providence.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/06 - Octet.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/07 - Red Ink.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/08 - Spring Hall Convert.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/09 - Strange Lights.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/10 - Hazel St..mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/11 - Tape Hiss Orchid.mp3
Input: /home/seeding/Deerhunter - [2007] Cryptograms/12 - Heatherwood.mp3
Exclude: /home/seeding/Deerhunter - [2007] Cryptograms/cover.jpg
Exclude: /home/seeding/Deerhunter - [2007] Cryptograms/Cryptograms.CUE
Exclude: /home/seeding/Deerhunter - [2007] Cryptograms/Log.LOG
Group: [music:deerhunter 2007 cryptograms] => [01 - Intro.mp3, 02 - Cryptograms.mp3, 03 - White Ink.mp3, 04 - Lake Somerset.mp3, 05 - Providence.mp3, 06 - Octet.mp3, 07 - Red Ink.mp3, 08 - Spring Hall Convert.mp3, 09 - Strange Lights.mp3, 10 - Hazel St..mp3, 11 - Tape Hiss Orchid.mp3, 12 - Heatherwood.mp3]
Rename music using [ID3 Tags]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/01 - Intro.mp3] to [/home/patrick/Music/(2007) Cryptograms/01 Intro.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/02 - Cryptograms.mp3] to [/home/patrick/Music/(2007) Cryptograms/02 Cryptograms.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/03 - White Ink.mp3] to [/home/patrick/Music/(2007) Cryptograms/03 White Ink.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/04 - Lake Somerset.mp3] to [/home/patrick/Music/(2007) Cryptograms/04 Lake Somerset.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/05 - Providence.mp3] to [/home/patrick/Music/(2007) Cryptograms/05 Providence.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/06 - Octet.mp3] to [/home/patrick/Music/(2007) Cryptograms/06 Octet.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/07 - Red Ink.mp3] to [/home/patrick/Music/(2007) Cryptograms/07 Red Ink.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/08 - Spring Hall Convert.mp3] to [/home/patrick/Music/(2007) Cryptograms/08 Spring Hall Convert.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/09 - Strange Lights.mp3] to [/home/patrick/Music/(2007) Cryptograms/09 Strange Lights.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/10 - Hazel St..mp3] to [/home/patrick/Music/(2007) Cryptograms/10 Hazel St..mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/11 - Tape Hiss Orchid.mp3] to [/home/patrick/Music/(2007) Cryptograms/11 Tape Hiss Orchid.mp3]
[COPY] Rename [/home/seeding/Deerhunter - [2007] Cryptograms/12 - Heatherwood.mp3] to [/home/patrick/Music/(2007) Cryptograms/12 Heatherwood.mp3]
Processed 12 files
Done ヾ(@⌒ー⌒@)ノ


Anyone have any insight as to what's going on here/how I could fix it?
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script not sorting into "Artist" folder properly

Post by rednoah »

Use the GUI to prototype your format. Use the FileBot MediaInfo viewer in the Bindings Dialog to see the "tags" that FileBot sees.

{n} will map to these MediaInfo keys:
1. general -> Album/Performer
2. general -> Performer
:idea: Please read the FAQ and How to Request Help.
criscodisco
Posts: 2
Joined: 08 Oct 2015, 03:45

Re: Script not sorting into "Artist" folder properly

Post by criscodisco »

Hi rednoah, the GUI was actually how I made my format - I probably should have mentioned that in the OP. I looked in the bindings dialog and it's showing filebot as seeing the artist (n) tag and year tag just fine, so that still hasn't helped me find a solution.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script not sorting into "Artist" folder properly

Post by rednoah »

Since {n} is just missing from the output, I can only assume that getting the value {n} failed at the time. If you can give me one of these mp3 files for testing then I could have a look and see why it's not working.
:idea: Please read the FAQ and How to Request Help.
lepis0
Posts: 4
Joined: 05 Nov 2015, 21:05

Re: Script not sorting into "Artist" folder properly

Post by lepis0 »

Hi,
I have the same problem. It happens with mp3's and with flacs.

Log:

Code: Select all

Rename music using [ID3 Tags]
[TEST] Rename [/volume1/share/downloads/music2/Trollheim's Grott (2003) - Bloodsoaked And Ill-Fated [FLAC]/01. Dehumanize.flac] to [/volume1/share/music/lossless/[2003] - Bloodsoaked And Ill-Fated/01. Dehumanize.flac]
[TEST] Rename [/volume1/share/downloads/music2/Trollheim's Grott (2003) - Bloodsoaked And Ill-Fated [FLAC]/02. Exact Answers And Syndicate Solutions.flac] to [/volume1/share/music/lossless/[2003] - Bloodsoaked And Ill-Fated/02. Exact Answers And Syndicate Solutions.flac]
[TEST] Rename [/volume1/share/downloads/music2/Trollheim's Grott (2003) - Bloodsoaked And Ill-Fated [FLAC]/03. SyndicateWormCampaign.flac] to [/volume1/share/music/lossless/Trollheims Grott/[2003] Trollheims Grott - Bloodsoaked And Ill-Fated/03. SyndicateWormCampaign.flac]
[TEST] Rename [/volume1/share/downloads/music2/Trollheim's Grott (2003) - Bloodsoaked And Ill-Fated [FLAC]/04. Operation- Lick The Fungus.flac] to [/volume1/share/music/lossless/[2003] - Bloodsoaked And Ill-Fated/04. Operation- Lick The Fungus.flac]
[TEST] Rename [/volume1/share/downloads/music2/Trollheim's Grott (2003) - Bloodsoaked And Ill-Fated [FLAC]/05. Little Shop Of Scalpels.flac] to [/volume1/share/music/lossless/[2003] - Bloodsoaked And Ill-Fated/05. Little Shop Of Scalpels.flac]
[TEST] Rename [/volume1/share/downloads/music2/Trollheim's Grott (2003) - Bloodsoaked And Ill-Fated [FLAC]/06. Syndicate Haunts You Down.flac] to [/volume1/share/music/lossless/[2003] - Bloodsoaked And Ill-Fated/06. Syndicate Haunts You Down.flac]
[TEST] Rename [/volume1/share/downloads/music2/Trollheim's Grott (2003) - Bloodsoaked And Ill-Fated [FLAC]/07. Experimentation.flac] to [/volume1/share/music/lossless/[2003] - Bloodsoaked And Ill-Fated/07. Experimentation.flac]
[TEST] Rename [/volume1/share/downloads/music2/Trollheim's Grott (2003) - Bloodsoaked And Ill-Fated [FLAC]/08. Addicted To Lethal Injections.flac] to [/volume1/share/music/lossless/[2003] - Bloodsoaked And Ill-Fated/08. Addicted To Lethal Injections.flac]
Processed 8 files

Rename music using [ID3 Tags]
[TEST] Rename [/volume1/share/downloads/music2/Turmion_Katilot-Vastanaineet-CDS-FI-2015-KALEVALA/01-turmion_katilot-vastanaineet-kalevala.mp3] to [/volume1/share/music/lossy/[2015] - Vastanaineet CDS/01-turmion_katilot-vastanaineet-kalevala.mp3]
Processed 1 files

Rename music using [ID3 Tags]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/01. Aeon Of Cold.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/01. Aeon Of Cold.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/02. Zero Gravity.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/02. Zero Gravity.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/03. Storm Centre.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/03. Storm Centre.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/04. Last Of All Winters.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/04. Last Of All Winters.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/05. Nemesis.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/05. Nemesis.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/06. Abyss.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/06. Abyss.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/07. Resistance.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/07. Resistance.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/08. Veri.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/08. Veri.mp3]
Processed 8 files
I checked couple files with mediainfo and there is correct data in info:

Code: Select all

MP3-file
General
Complete name                            : downloads/music2/Wolfheart - Shadow World (2015)/03. Storm Centre.mp3
Format                                   : MPEG Audio
File size                                : 12.4 MiB
Duration                                 : 5mn 23s
Overall bit rate mode                    : Constant
Overall bit rate                         : 320 Kbps
Album                                    : Shadow World
Track name                               : Storm Centre
Track name/Position                      : 3
Track name/Total                         : 8
Performer                  HERE ---->    : Wolfheart
Publisher                                : Spinefarm (Universal Music)
Recorded date                            : 2015
Writing library                          : LAME3.99r
Cover                                    : Yes
Cover type                               : Cover (front)
Cover MIME                               : image/jpeg
General

FLAC-file
Complete name                            : downloads/music2/Red Moon Architect - Fall (FLAC) (2015)/06. For My....flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 22.7 MiB
Duration                                 : 4mn 25s
Overall bit rate mode                    : Variable
Overall bit rate                         : 718 Kbps
Album                                    : Fall
Track name                               : For My...
Track name/Position                      : 6
Track name/Total                         : 9
Performer                  HERE ---->    : Red Moon Architect
Genre                                    : Melodic Doom/Death Metal
Recorded date                            : 2015
Cover                                    : Yes
Cover type                               : Cover (front)
Cover MIME                               : image/jpeg
Comment                                  : ExactAudioCopy v1.0b3
CTDBDISCCONFIDENCE                       : 1/1
CTDBTRACKCONFIDENCE                      : 1/1
CDTOC                                    : 9+96+8511+1098D+1912F+1EFBA+2473E+29500+2FBF9+345D2+3C3C6

edit.

here is FileBot version info:

Code: Select all

FileBot 4.6.1 (r3275)
JNA Native: 4.0.1
MediaInfo: MediaInfoLib - v0.7.73
p7zip: Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
chromaprint-tools: fpcalc version 1.2.0 (/usr/local/chromaprint/bin/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.5
JRE: Java(TM) SE Runtime Environment 1.8.0_66 (headless)
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 443 MB Max Memory / 41 MB Used Memory
OS: Linux (amd64)
uname: Linux Storage 3.10.35 #5644 SMP Wed Oct 28 12:36:28 CST 2015 x86_64 GNU/Linux synology_avoton_415+
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script not sorting into "Artist" folder properly

Post by rednoah »

So what exactly isn't working? What do you expect? What do you get instead?


What format are you using?


Have you made sure that MediaInfoLib - v0.7.73 gives FileBot the same values as your mediainfo command-line tool?

Code: Select all

filebot -mediainfo /path/to/file --format "{n} | {artist} | {albumArtist} | {media.Performer}"
:idea: Please read the FAQ and How to Request Help.
lepis0
Posts: 4
Joined: 05 Nov 2015, 21:05

Re: Script not sorting into "Artist" folder properly

Post by lepis0 »

Hi rednoah,
Artist properly {n} not working.

my srcipt is following:

Code: Select all

filebot -script fn:amc "/volume1/share/downloads/music2" --output "/volume1/share/music" --log-file /volume1/share/logs/filebot.log --db "ID3 Tags" --action copy --conflict override -non-strict --def music=y --def artwork=y --def musicFormat="{ext =~ /flac/ ? 'lossless' : 'lossy'}/{n}/[{y}] {n} - {album+'/'}{fn}" --def excludeList="/volume1/share/downloads/music2/filebot-amc-exclude.txt"
And result of filebot -mediainfo /path/to/file --format "{n} | {artist} | {albumArtist} | {media.Performer}" is:

Code: Select all

filebot -mediainfo /volume1/share/downloads/music2/Wolfheart\ -\ Shadow\ World\ \(2015\)/  --format "{n} | {artist} | {albumArtist} | {media.Performer}"
| | |
| | |
| | | Wolfheart
| | | Wolfheart
| | |
| | | Wolfheart
| | | Wolfheart
| | | Wolfheart
| | | Wolfheart
| | | Wolfheart
| | | Wolfheart
Here is the filelist also:

Code: Select all

ls -l /volume1/share/downloads/music2/Wolfheart\ -\ Shadow\ World\ \(2015\)/
     459 Aug 21 19:02 00. Wolfheart - Shadow World.m3u
    1597 Aug 21 19:02 00. Wolfheart - Shadow World.nfo
     517 Aug 21 19:02 00.Wolfheart - Shadow World.md5
15828392 Aug 21 19:03 01. Aeon Of Cold.mp3
13857715 Aug 21 19:03 02. Zero Gravity.mp3
13007168 Aug 21 19:03 03. Storm Centre.mp3
11522382 Aug 21 19:03 04. Last Of All Winters.mp3
16784464 Aug 21 19:03 05. Nemesis.mp3
 9995758 Aug 21 19:03 06. Abyss.mp3
10882886 Aug 21 19:03 07. Resistance.mp3
20200229 Aug 21 19:03 08. Veri.mp3
Script output is here again:

Code: Select all

Rename music using [ID3 Tags]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/01. Aeon Of Cold.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/01. Aeon Of Cold.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/02. Zero Gravity.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/02. Zero Gravity.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/03. Storm Centre.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/03. Storm Centre.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/04. Last Of All Winters.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/04. Last Of All Winters.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/05. Nemesis.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/05. Nemesis.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/06. Abyss.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/06. Abyss.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/07. Resistance.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/07. Resistance.mp3]
[TEST] Rename [/volume1/share/downloads/music2/Wolfheart - Shadow World (2015)/08. Veri.mp3] to [/volume1/share/music/lossy/[2015] - Shadow World/08. Veri.mp3]
Processed 8 files
Problem is that the "to" folder is meant to be /volume1/share/music/lossy/Wolfheart/[2015] Wolfheart - Shadow World/ and now it's missing artist folder and artist name in albums folder and is /volume1/share/music/lossy/[2015] - Shadow World/.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script not sorting into "Artist" folder properly

Post by rednoah »

I see. Fixed with r3282.
:idea: Please read the FAQ and How to Request Help.
lepis0
Posts: 4
Joined: 05 Nov 2015, 21:05

Re: Script not sorting into "Artist" folder properly

Post by lepis0 »

rednoah wrote:I see. Fixed with r3282.
Thank you.
Now it works.

Do you know how I can create script that checks if {n} is empty and if it is it replaces it with {media.Composer}?
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script not sorting into "Artist" folder properly

Post by rednoah »

What's the difference between {media.Performer} and {media.Composer}?

{n} cannot be empty. FileBot will not process files that don't have Performer and Title values. {n} can be either Album/Performer or Performer, and at least Performer cannot not be set.
:idea: Please read the FAQ and How to Request Help.
lepis0
Posts: 4
Joined: 05 Nov 2015, 21:05

Re: Script not sorting into "Artist" folder properly

Post by lepis0 »

I had at least couple albums where artist is only set under {media.Composer} and {n}, {artist}, {albumArtist} and {media.Performer} is empty.

But normally if {media.Composer} is used, there are list of people how had created the song.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script not sorting into "Artist" folder properly

Post by rednoah »

r3285 will use {media.Composer} as fallback if {media.Performer} is not set.
:idea: Please read the FAQ and How to Request Help.
Post Reply