Page 1 of 1
AMC, only move music to different folder
Posted: 10 Nov 2013, 18:01
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!

Re: AMC, only move music to different folder
Posted: 10 Nov 2013, 19:27
by rednoah
not really, you'd have to edit the script for that
Re: AMC, only move music to different folder
Posted: 12 Nov 2013, 06:48
by Clint
Ah, I suspected that. Oh well, I guess it's time to dig into that as well

.
Re: AMC, only move music to different folder
Posted: 12 Nov 2013, 13:00
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.
Re: AMC, only move music to different folder
Posted: 12 Nov 2013, 13:08
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.
Re: AMC, only move music to different folder
Posted: 12 Nov 2013, 13:10
by Clint
Great, will try! Thanks!

Re: AMC, only move music to different folder
Posted: 12 Nov 2013, 13:13
by rednoah
make that File.copyTo(Folder), moveTo is File->File
Re: AMC, only move music to different folder
Posted: 12 Nov 2013, 15:27
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.
Re: AMC, only move music to different folder
Posted: 12 Nov 2013, 15:38
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.
Re: AMC, only move music to different folder
Posted: 12 Nov 2013, 15:59
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..

Re: AMC, only move music to different folder
Posted: 12 Nov 2013, 16:10
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.
