sort to folder ignored

Any questions? Need some help?
Post Reply
Ztrust
Posts: 69
Joined: 21 Dec 2013, 17:04

sort to folder ignored

Post by Ztrust »

Hi
I posted back in juli that sort to folder was ignored but i posted a cut off code and i sort of accepted that as the answer to the problem but now I have updated to the latest version and with a working format from 3.? it now ignores sort to folder i have tried with some snippets from the forum and they are ignored to here is my code

Code: Select all

D:/!Movies/{genres.contains('Animation') ? 'Cartoons' :n.sortName()[0].match((~/(?i)[0-9]/):'0-9',(~/(?i)[a-d]/):'ABCD',(~/(?i)[e-h]/):'EFGH',(~/(?i)[i-l]/):'IJKL',(~/(?i)[m-p]/):'MNOP',(~/(?i)[q-t]/):'QRST') ?: 'UVWYXZ'}/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceAll(/Collection/).trim()+'/'}{primaryTitle.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceAll(/[:|?]/, "")} ({y}){' [' + file.path.matchAll(/extended|uncensored|remastered|ultimate.cut|unrated|uncut|Theatrical|Theatrical.Cut|Theatrical.edition|3d|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().unique().join(' - ').replaceAll(/[._´]/," ") + ']'}/{primaryTitle.replaceAll(/[:|?]/, "")} ({y}){' [' + file.path.matchAll(/extended|uncensored|remastered|ultimate.cut|unrated|uncut|Theatrical|Theatrical.Cut|Theatrical.edition|3d|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().unique().join(' - ').replaceAll(/[._´]/," ") + ']'}{' '+[c{source} ?: 'BDrip']}{"."+lang.name}
Im guessing its chages to the formats since the update I have tried to look over the forum but I cant not figure out where to start.
I worked a long time on my format and am very sad it no longer works so hope you can help

Ztrust
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: sort to folder ignored

Post by rednoah »

Yes, FileBot 3.x formats might be slightly incompatible with the newer releases.

Just figure out which part is not working as expected and fix it, or ask, and be specific, and don't just send me a big blob of format. :P
:idea: Please read the FAQ and How to Request Help.
Ztrust
Posts: 69
Joined: 21 Dec 2013, 17:04

Re: sort to folder ignored

Post by Ztrust »

Hi rednoah
well it´s the

Code: Select all

{genres.contains('Animation') ? 'Cartoons' :n.sortName()[0].match((~/(?i)[0-9]/):'0-9',(~/(?i)[a-d]/):'ABCD',(~/(?i)[e-h]/):'EFGH',(~/(?i)[i-l]/):'IJKL',(~/(?i)[m-p]/):'MNOP',(~/(?i)[q-t]/):'QRST') ?: 'UVWYXZ'}/
that gets ignored and I do not know how to fix it,

http://www.filebot.net/forums/viewtopic.php?f=5&t=910#
so have been looking around for updated snippets and code not much succes but this one work

Code: Select all

{n =~ /^(?i)[a-z]/ ? n[0] : '#'}/{n} ({y})/{n} ({y}){'CD'+pi}
but I can not figure out how to modify this one so it will work, and it dosent seem to me updated with new code
http://www.filebot.net/forums/viewtopic.php?f=5&t=2#

Code: Select all

{n[0].match((~/(?i)[0-9a-f]/):'X', (~/(?i)[g-t]/):'Y') ?: 'Z'}:/TV/{n}/{episode}
this is the one I based the priginal code on

as far as i can tell its match thats no longer viable ?
hope u can help with this again
ztrust
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: sort to folder ignored

Post by rednoah »

I suppose the match() function isn't implemented anymore. That was one of my extras that is probably better done with normal groovy code, switch, if-then-else, etc
:idea: Please read the FAQ and How to Request Help.
Ztrust
Posts: 69
Joined: 21 Dec 2013, 17:04

Re: sort to folder ignored

Post by Ztrust »

hi Rednoah
I am sorry to sound like such an idiot, but I have no idea how to fix it espacially if its the match I cant use I spent weeks copying and pasteng that format together
would u mind showing me how to get this to work

Code: Select all

{n[0].match((~/(?i)[0-9a-f]/):'X', (~/(?i)[g-t]/):'Y') ?: 'Z'}:/TV/{n}/{episode}
I guess I can adapt it to my needs I hope
ztrust
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: sort to folder ignored

Post by rednoah »

If you spend a few hours on learning very basic programming so that you understand what you're doing, then it'll take a lot less long:
http://groovy.codehaus.org/Logical+Branching

e.g.

Code: Select all

{n =~ /^(?i)[0-9a-f]/ ? 'X' : n =~ /^(?i)[g-t]/ ? 'Y' : 'Z'}
:idea: Please read the FAQ and How to Request Help.
Ztrust
Posts: 69
Joined: 21 Dec 2013, 17:04

Re: sort to folder ignored

Post by Ztrust »

thank u for this rednoah ;)
believe it or not I have tried to learn but I gues we are not all build for coding
Post Reply