Help using AMC

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
cemmec
Posts: 7
Joined: 18 Apr 2015, 03:54

Help using AMC

Post by cemmec »

Hi,

I have a few doubts using AMC:

1) If I already have other files on the same folder of the movie file (*.jpg, *.png, *.nfo), is it possible to move all of them, not only the movie file and the subtitle file?

2) When I user artwork=y the nfo file is generated as movie.nfo, is it possible that the file is named with the same name of the movie and subtitle files? And is it possible to choose the language that will be used on the nfo file? In my case I would like it to be in Brazilian Portugues.

3) Sometimes the subtitle file is not on the same folder when in the torrent. Something like:

X:/Donwloaded/MovieName.mkv
X:/Downloaded/Legenda/MovieName.srt

In this case, the srt file will be processed?

THanks.
User avatar
rednoah
The Source
Posts: 23449
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help using AMC

Post by rednoah »

1.
The amc script will only process media files (video, subtitle, nfo, etc) and other files like images will only be processed if the image filename matches exactly a media file.

YES:

Code: Select all

Avatar.mp4
Avatar.xml
Avatar.png
NO:

Code: Select all

Avatar.mp4
folder.png
meta.xml

2.
You cannot change the artwork behaviour without modifying the code. The Artwork/NFO logic does respect to your --lang preference though. Have you tried setting --lang yet?


3.
Possibly. Have you tried?
:idea: Please read the FAQ and How to Request Help.
cemmec
Posts: 7
Joined: 18 Apr 2015, 03:54

Re: Help using AMC

Post by cemmec »

rednoah thanks for the help. Doubts 2 and 3 worked fine but let me explain what I meant with doubt 1, maybe you can help me.

I already have all artwork and NFO files from all my movies (a lot of movies), but now that I found Filebot I would like to rename all movies without having to download all artwork and NFO files again. I think that maybe if I rename the files with artwork=n and action move, all files will keep in the same folder, but NFO file will remain with the old name, and I don't know how to solve this.

Do you think this is a good solution? How to rename NFO file? Do you have any other idea?

One more question, do you think I might get banned renaming all of this files? I read something about being banned here in the forum.

Thanks one more time!
User avatar
rednoah
The Source
Posts: 23449
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help using AMC

Post by rednoah »

1.
What have you tried? What happened? What did you expect?

Works fine as far as I can tell:

Code: Select all

$ filebot -rename avatar.nfo
Filename pattern: [NaN] SxE, [NaN] CWS
Rename movies using [TheMovieDB]
[MOVE] Rename [avatar.nfo] to [Avatar (2009).nfo]
Processed 1 files

2.
Renaming every file once. OK!
Renaming every file every hour for weeks over and over. NOT OK! (you'll be banned by datasources filebot uses, not filebot itself)
:idea: Please read the FAQ and How to Request Help.
cemmec
Posts: 7
Joined: 18 Apr 2015, 03:54

Re: Help using AMC

Post by cemmec »

What I tried:

Code: Select all

filebot -script fn:amc --output "c:/temp" --action copy --conflict skip -non-strict --log-file amc.log --def unsorted=y --def "movieFormat=
{collection+'/'}{(primaryTitle).replace(':',' -').replace('?','')} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'}[{fn.match(/3D/)+'.'}{vf}.{sdhd}]{(audios.size()) > 1 ? (text.toString() != /"[]/") ? /"[Dual+Sub]/" : /"[Dual]/" : /"/"}/{(primaryTitle).replace(':',' -').replace('?','')} ({y}) [{def map=['3d':'3D','hsbs':'Half.SBS','halfsbs':'Half.SBS','fsbs':'Full.SBS','fullsbs':'Full.SBS','sbs':'SBS','halfou':'Half.OU','fullou':'Full.OU','overunder':'OU','anaglyth':'Anaglyth']; /"./"+ ((file.path.lower().contains(/3d/)) ? '' : '3D ')+ file.path.lower().replaceAll(/(?i)(?<=^|[^a-z])hou(?=$|[^a-z])/,'halfou').replaceAll(/(?i)(?<=^|[^a-z])fou(?=$|[^a-z])/,'fullou').replaceAll(/(?i)(?<=^|[^a-z])ou(?=$|[^a-z])/,'overunder').replaceAll(/[\W]/, /"/").matchAll(/3d(?!.*?3d)|hsbs(?!.*?hsbs)|halfsbs(?!.*?halfsbs)|fsbs(?!.*?fsbs)|fullsbs(?!.*?fullsbs)|sbs(?!.*?sbs)|halfou(?!.*?halfou)|fullou(?!.*?fullou)|overunder(?!.*?overunder)|anaglyth(?!.*?anaglyth)/).findResults{ map[it]}.sort().join('.')+'.'}{/"$source./"}{/"$resolution/"}{/"p]/"} {[vc]}{[af]}{/"[/"}{def a= [];/"[$media.Audio_Codec_List]/".contains(/"DTS/") ? a.add(/"DTS/") : /"/";/"[$media.Audio_Codec_List]/".contains(/"AC3/") ? a.add(/"AC3/") : /"/";/"[$media.Audio_Codec_List]/".contains(/"MPEG-1 Audio layer 3/") ? a.add(/"MP3/") : /"/";a.join(/"+/")}{/"]/"}{(audios.size()) > 1 ? (text.toString() != /"[]/") ? /"[Dual+Sub]/" : /"[Dual]/" : /"/"}{' '+lang}{/"-cd$pi/"}"
What happened: Only mkv and srt files were copied to the new folder. NFO, JPG and PNG files remain at the same folder

What I expected: all files copied.

What I will try: replace "--action copy" by "--action move". But based on my first attempt I think that nothing will happen with NFO, JPG and PNG files.

I did't undertand this code

Code: Select all

$ filebot -rename avatar.nfo
Filename pattern: [NaN] SxE, [NaN] CWS
Rename movies using [TheMovieDB]
[MOVE] Rename [avatar.nfo] to [Avatar (2009).nfo]
Processed 1 files
Where do I pass the movieformat argument? With --def movieformat?
User avatar
rednoah
The Source
Posts: 23449
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help using AMC

Post by rednoah »

1.
If you're gonna use a horribly long format, at least be smart about passing it in...
viewtopic.php?f=3&t=3244


2.
The amc script has a file size option. It may ignore NFO/JPG files because of that. Maybe not. The amc script is not supposed to "import" existing metadata.
--def minFileSize=0 Only process video files larger than the given number (in bytes). Defaults to 50 MB.
3.
The output shows that FileBot itself perfectly capable of processing nfo files. The amc script may or may not allow you to process nfo files. Since it's generating artwork/nfo itself, it might explicitly exclude these files from processing.
:idea: Please read the FAQ and How to Request Help.
PlanetDyna
Posts: 3
Joined: 02 Mar 2024, 15:49

Re: Help using AMC

Post by PlanetDyna »

This thread is already old. I hope it's okay to bring it up.

I also use AMC with the following command:

Format: Select all

Films/{n} ({y}){' CD'+pi}/
I would like the .nfo file to be moved as well.

Can someone please help me how to adjust this?
User avatar
rednoah
The Source
Posts: 23449
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help using AMC

Post by rednoah »

:?: What does the console output say? Please post the console output so that we can see what the console output says when it's not processing *.nfo files.


:idea: In general, the amc script does not process *.nfo files, because it'll generate *.nfo files from scratch instead via the --def artwork=y option. In any case, note that your custom format is entirely unrelated to the processing or not processing of *.nfo files.


:idea: You can however use --apply import to copy along all Companion Files including *.nfo files. Alternatively, custom post-processing scripts are always an option if necessary.
:idea: Please read the FAQ and How to Request Help.
PlanetDyna
Posts: 3
Joined: 02 Mar 2024, 15:49

Re: Help using AMC

Post by PlanetDyna »

Thank you rednoah!
You can however use --apply import to copy along all Companion Files including *.nfo files. Alternatively, custom post-processing scripts are always an option if necessary.
-- Good option! would like to use the supplied .nfo files. I think these may contain more information, right?

But can I also do this with AMC?
User avatar
rednoah
The Source
Posts: 23449
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help using AMC

Post by rednoah »

PlanetDyna wrote: 06 Mar 2024, 14:44 I think these may contain more information, right?
The *.nfo files included by the release group are completely different from the *.nfo files generated by FileBot / Kodi / Plex / etc. You can open the files in a text editor and compare the contents.

PlanetDyna wrote: 06 Mar 2024, 14:44 But can I also do this with AMC?
Yes. Why not?
:idea: Please read the FAQ and How to Request Help.
PlanetDyna
Posts: 3
Joined: 02 Mar 2024, 15:49

Re: Help using AMC

Post by PlanetDyna »

Unfortunately I don't know how/where to place the code?

https://imgur.com/a/ewPaMVj
User avatar
rednoah
The Source
Posts: 23449
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help using AMC

Post by rednoah »

rednoah wrote: 24 Dec 2021, 03:35 The jlesage/filebot container is popular among unRAID users and packed with features. Please read the manual or contact the maintainer via [SUPPORT] DJOSS - FILEBOT if you need help with setup and usage.
You are using the jlesage/filebot container (not one of ours) so if you need help with that you'll have to ask the maintainer / community that is using that particular container:
https://www.filebot.net/linux/unraid.html

Screenshot





:idea: As far as filebot and the amc script is concerned, you just need to add --apply import to the command-line arguments. The jlesage/filebot container manual lists a AMC_CUSTOM_OPTIONS environment variable for "Custom arguments to pass to the Automated Media Center (AMC) script." which sounds about right:

Shell: Select all

--apply import
:idea: Please read the FAQ and How to Request Help.
Post Reply