Subtitle Subdirectory, AMC

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
gumsh
Posts: 1
Joined: 18 Dec 2013, 13:58

Subtitle Subdirectory, AMC

Post by gumsh »

Hey, I#m using AMC.groovy script on Ubuntu, to sort my media LOVE IT!

Code: Select all

filebot -script fn:amc "$dl_dir" --output "$media_dir" --log-file $logfile --log info --log-lock no --action move --conflict override -non-strict --def "exts=mov|avi|wmv|mp4|mkv|mpg" music=n subtitles="en"  "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S" xbmc="openelec.local,localhost"
It works perfectly fine, the only thing which kinda frustrates me is that the subtitles are moved into the same folder as the video file, which is not so bad for Movies, but bad for TV-Shows, i would want to create a "subs" subfolder which is working fine with XBMC, thought after hours of googling i could not find an option that changes ONLY the subtitle path to "/subs/NAMEOFSUBTITEL".

I have another Issue though, which i compensated through renaming of my shares in fstab on my ubuntu server.

I am using my Downloads directory on my nas as source for renaming and move them to my Media directory.

Thought my NAS shares are named "More" and "Stuff" the full path would be /media/More(or Stuff)/Downloads/*FILES*.

Filebot keeps finding the movies "Stuff (1999)" and "More (200x)", whenever having trouble recognizing a file due to bad naming.

I endet up one time (Star Trek Movie Collection) having "Stuff (1999)" with "8 CDs" each being a different Part of the Franchise.
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitle Subdirectory, AMC

Post by rednoah »

1.

Code: Select all

{if (ext == 'srt') 'subs/'}
2.
Blacklisted More and Stuff. Let me know if you still have issues a week later.
:idea: Please read the FAQ and How to Request Help.
redbull666
Donor
Posts: 58
Joined: 08 Jan 2014, 20:45

Re: Subtitle Subdirectory, AMC

Post by redbull666 »

rednoah wrote:1.

Code: Select all

{if (ext == 'srt') 'subs/'}
I've been fiddling with Filebot/Deluge all day, and finally got it almost working perfectly, apart from this ^

I also find subtitles messy, and like to stash them in a separate folder for XBMC, but I can't figure out how to do this, and I am not smart enough to understand your code :P

I tried just adding that line in amc.groovy, but nothing happens, I presume it has to go in some special spot?
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitle Subdirectory, AMC

Post by rednoah »

Just build that into your format expression. Play with the GUI format editor to work out your format before you make it work with amc.
:idea: Please read the FAQ and How to Request Help.
redbull666
Donor
Posts: 58
Joined: 08 Jan 2014, 20:45

Re: Subtitle Subdirectory, AMC

Post by redbull666 »

rednoah wrote:Just build that into your format expression. Play with the GUI format editor to work out your format before you make it work with amc.
Thanks for your quick reply! But that's even more confusing, am running FreeBSD, CLI only, so don't really have a GUI either...

Format expression, so like:

"movieFormat=movies/{n} ({y})/{fn} {if (ext == 'srt') 'subs/'}" ?

Seems so strange, and there's no line like that for subtitles right?
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitle Subdirectory, AMC

Post by rednoah »

Well, you can test with the CLI as well it'll just take longer. :D

Your format doesn't make sense cause the if the file is a subtitles the final name would be "......subs/" (and not end with an actual filename). Once you understand how the format works you'll see that it's not strange at all and makes perfect sense. You just define the output structure.

Wouldn't this make more sense?

Code: Select all

{n} ({y})/{if (ext == 'srt') 'subs/'}{fn}
Folder 1: {n} ({y})
Folder 2: 'subs/' (optional: only if file is a subtitle)
File: original filename

Exactly what the format says, just less verbose.
:idea: Please read the FAQ and How to Request Help.
traxxus
Posts: 8
Joined: 27 Aug 2015, 08:50

Re: Subtitle Subdirectory, AMC

Post by traxxus »

Hi

I have a question about the AMC script.
After dl & extract my movies & tv shows they got already an "subs" folder with srt files. I want to keep this folder IN the movie folder itself.

the CLI line for "movieFormat" looks like this actually:

Code: Select all

"\\NAS/Filme/{n} ({y})/{n} ({y}){' CD'+pi}{'.'+lang}"
i can't figure out where i has to place this:

Code: Select all

{if (ext == 'srt') 'subs/'}{fn}

can anbody help me?


And thank you so much for this excellent program!
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitle Subdirectory, AMC

Post by rednoah »

IF the amc script picks up these subtitles, then this should work:

Code: Select all

\\NAS/Filme/{n} ({y})/{if (ext == 'srt') 'subs/'}{n} ({y}){' CD'+pi}{'.'+lang}
This was dead obvious, right? You're expected to consider making a donation now. :P
:idea: Please read the FAQ and How to Request Help.
traxxus
Posts: 8
Joined: 27 Aug 2015, 08:50

Re: Subtitle Subdirectory, AMC

Post by traxxus »

Thank you! No worries, i support good free software 8-)
Post Reply