AMC on demand?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
namewithhe1d
Posts: 7
Joined: 23 May 2013, 14:41

AMC on demand?

Post by namewithhe1d »

Two questions.

First, it turns out that for the last couple of weeks, my downloads have not been properly run through Filebot/AMC. When I was playing with the Transmission config files (Ubuntu 12.04), I was changing some directories around, and when AMC was called, it was referencing the directory and file that no longer existed. At least, that's what I understood..

Code: Select all

Fetching episode data for [Shark Tank]
[KEEPLINK] Rename [/home/matt/Downloads/shark.tank.s05e05.720p.hdtv.x264-2hd.mkv] to [/storage/TV Shows/Shark Tank/Season 05/Shark Tank - S05E05 - October 18, 2013.mkv]
[KEEPLINK] Failed to rename [/home/matt/Downloads/shark.tank.s05e05.720p.hdtv.x264-2hd.mkv]
NoSuchFileException: /home/matt/Downloads/shark.tank.s05e05.720p.hdtv.x264-2hd.mkv
It's looking for my files in the wrong folder, which I assume has been passed along by Transmission. Unless I'm missing anything here, I think I have fixed this by editing the Transmission config file appropriately, and restarting the service.

Now, I want to be able to go back and run the script for the files for the last couple of weeks. How can I do this without having to type it out in the terminal for every file?

On an unrelated (I think) note, what are all the java errors at the end of this log? I've been getting them often.

Code: Select all

Parameter: music = y
Parameter: artwork = n
Parameter: xbmc = localhost
Parameter: plex = localhost
Parameter: pushover = uTzJNKmmajWzx5dVg6d1kRhRNmPj1k
Parameter: clean = y
Parameter: ut_dir = /storage/Downloads/hello.ladies.s01e05.720p.hdtv.x264-2hd.mkv
Parameter: ut_kind = multi
Parameter: ut_title = hello.ladies.s01e05.720p.hdtv.x264-2hd.mkv
Input: /storage/Downloads/hello.ladies.s01e05.720p.hdtv.x264-2hd.mkv
Group: [tvs:hello ladies] => [hello.ladies.s01e05.720p.hdtv.x264-2hd.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [hello ladies]
Fetching episode data for [Hello Ladies]
[KEEPLINK] Rename [/storage/Downloads/hello.ladies.s01e05.720p.hdtv.x264-2hd.mkv] to [/storage/TV Shows/Hello Ladies/Season 01/Hello Ladies - S01E05 - Pool Party.mkv]
Processed 1 files
Notify XBMC: localhost
ConnectException: Connection refused
ConnectException: Connection refused
Notify Plex: localhost
Sending Pushover notification
Done ヾ(@⌒ー⌒@)ノ
java.io.IOException: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 274; columnNumber: 18; XML document structures must start and end within the same entity.]
	at net.sourceforge.filebot.History.importHistory(Unknown Source)
	at net.sourceforge.filebot.HistorySpooler.commit(Unknown Source)
	at net.sourceforge.filebot.Main$1.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:744)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 274; columnNumber: 18; XML document structures must start and end within the same entity.]
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:512)
	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:209)
	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:175)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:204)
	... 4 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 274; columnNumber: 18; XML document structures must start and end within the same entity.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1436)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(XMLDocumentFragmentScannerImpl.java:911)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:563)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1384)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1774)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(XMLEntityScanner.java:1502)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:415)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:254)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2778)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:203)
	... 7 more
User avatar
rednoah
The Source
Posts: 23939
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC on demand?

Post by rednoah »

1.
First log looks like you've moved files between starting the amc script and the point where it gets to the renaming. So we can ignore that.

2.
Second logs tells you filebots history.xml file is corrupt. Invalid xml. Fix it or delete the file.



As for running amc on certain files? What would be the issue? Just put them into a folder and run amc on that. Or use bash to call it on files that fit your criteria.
:idea: Please read the FAQ and How to Request Help.
namewithhe1d
Posts: 7
Joined: 23 May 2013, 14:41

Re: AMC on demand?

Post by namewithhe1d »

rednoah.. You're always on top of it here. I sincerely appreciate it. I've still got a lot to learn in the unix/linux world, and this has been one of my forays. Many thanks as always, I'll check back in to share if all is fixed.
namewithhe1d
Posts: 7
Joined: 23 May 2013, 14:41

Re: AMC on demand?

Post by namewithhe1d »

How do I run amc on a folder? Here is my transmission-postprocess:

Code: Select all

#!/bin/bash

filebot -script fn:amc --output "/storage" --log-file amc.log --action keeplink --conflict override -non-strict --def music=y artwork=n xbmc=localhost plex=localhost clean=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
I'm still new in the scripting world. I know that I would do it in the terminal, but I'm not sure of the syntax. What do I replace dir and title with?
Thanks again
User avatar
rednoah
The Source
Posts: 23939
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC on demand?

Post by rednoah »

Hit the docs where it says Standalone Usage
:idea: Please read the FAQ and How to Request Help.
namewithhe1d
Posts: 7
Joined: 23 May 2013, 14:41

Re: AMC on demand?

Post by namewithhe1d »

I didn't circle back before, sorry. All has been fixed, standalone usage is working great. Thanks again
Post Reply