AMC, only move music to different folder

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

AMC, only move music to different folder

Post by Clint »

I'm trying to configure so that movies and TV gets treated per AMC standard with renaming, fanart and all but with music files only move them (and delete clutterfiles) to a different folder for processing by another function. Is it possible to make this happen with AMC script? Example:

Movie and TV gets the full treatment and goes to /share/MEDIA
Music goes untouched but clutter removed to /local/tempMusic

Again, great stuff! :D
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC, only move music to different folder

Post by rednoah »

not really, you'd have to edit the script for that
:idea: Please read the FAQ and How to Request Help.
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: AMC, only move music to different folder

Post by Clint »

Ah, I suspected that. Oh well, I guess it's time to dig into that as well :) .
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: AMC, only move music to different folder

Post by Clint »

Oh man, it's just to weird for me this groovy stuff.. Could you please give a hint on what/where I should this in the script? Once I got that sorted I could do a grep or something on a daily downloaded script and store it locally.
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC, only move music to different folder

Post by rednoah »

You can probably add this somewhere:

Code: Select all

input.findAll{ it.isAudio() }*.copyTo('/move/to/folder')
Afterwards make sure you remove non-existing paths from input.
:idea: Please read the FAQ and How to Request Help.
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: AMC, only move music to different folder

Post by Clint »

Great, will try! Thanks! :)
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC, only move music to different folder

Post by rednoah »

make that File.copyTo(Folder), moveTo is File->File
:idea: Please read the FAQ and How to Request Help.
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: AMC, only move music to different folder

Post by Clint »

Hmm, it is acting up really strange (with not yet edited script). The script seems to search for the helper scripts htpc and cleaner relatively from the location of amc.groovy.. The renaming goes through but I get errors and remaning clutter.

amc.groovy is located at:
/usr/share/filebot/bin

I call it with:
/usr/share/filebot/bin/filebot.sh -script /usr/share/filebot/bin/amc.groovy "/share/downloads/Finished" --output "/share/MEDIA" --action move -non-strict --log-file amc.log --log-lock --def subtitles=se,en artwork=y music=y clean=y

I get this:
FileNotFoundException: /usr/share/filebot/bin/lib/htpc.groovy (No such file or directory)

...renaming & moving...

FileNotFoundException: /usr/share/filebot/bin/cleaner.groovy (No such file or directory)
java.io.FileNotFoundException: /usr/share/filebot/bin/cleaner.groovy (No such file or directory)
at net.sourceforge.filebot.cli.ArgumentProcessor$DefaultScriptProvider.fetchScript(ArgumentProcessor.java:206)
at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:94)
at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:89)
at Script2.executeScript(Script2.groovy:268)
at Script3.run(Script3.groovy:361)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(ScriptShell.java:102)
at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:95)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:125)
at net.sourceforge.filebot.Main.main(Main.java:183)


I have not edited the amc.groovy script yet, simply doing dry runs.
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC, only move music to different folder

Post by rednoah »

Yes, and the amc script depends on the htpc/cleaner scripts which are expected to exist relative to where the amc script is.
:idea: Please read the FAQ and How to Request Help.
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: AMC, only move music to different folder

Post by Clint »

Ok, no biggie, just wanted to be sure I haven't found a bug. ;) I'm struggling with the naming of my music files as well, the logic is a bit hard for me.

I'm trying to make it structured like "MUSIC/Artist/Artist - Year - AlbumTitel/01. Artist - First song.mp3

When running amc on default I get pretty much that except the Year and Titel for the album. I have tried "MUSIC/{n} - [{y}] - {t}/{n} - {fn}" but the file name ends up like "Artist 01 First song.mp3" and I get no parent/artist directory so the album ends up direclty under MUSIC. If I do "MUSIC/{n}/{n} - [{y}] - {t}/{n} - {fn}" I get all songs in individual directories named after the album convention. This is not easy.. :lol:
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC, only move music to different folder

Post by rednoah »

How would you do this? I thought you don't have this information?


Replace AcoustID lookup:

Code: Select all

def dest = rename(file:files, format:format.music, db:'AcoustID')
With ID3 tag info:

Code: Select all

def dest = rename(file:files, format:format.music, db:'ID3')

But if you use ID3 info your format probably has to get smarter about missing tags. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply