TVArtwork Still not working

Any questions? Need some help?
Post Reply
Solonor
Posts: 10
Joined: 23 May 2016, 17:13

TVArtwork Still not working

Post by Solonor »

First i just want to say I'm nearing my wits end with this application. I'm trying desperately to be patient as I LOVE this app, but it's wearing thin.

A few weeks ago i started receiving 0kb folder.jpg files like many others have. First i went to the windows store and purchased filebot assuming it would give me the latest version. I come to find it doesn't install on server 2012R2... the first of the issues.. fine.. i run ESXi so i spun up a win10 box and was just going to bite the bullet on moving my scripts over and repointing them from the new box. Once .13 was installed i ran my script to test with...

Code: Select all

filebot -script fn:artwork.tvdb "X:\Dirk Gently's Holistic Detective Agency" -non-strict --conflict override

Code: Select all

filebot -script fn:artwork.tvdb "X:\Dirk Gently's Holistic Detective Agency" -non-strict --conflict override
X:\Dirk Gently's Holistic Detective Agency => Search by Dirk Gently's Holistic Detective Agency
X:\Dirk Gently's Holistic Detective Agency => Dirk Gently's Holistic Detective Agency
Generate Series NFO: Dirk Gently's Holistic Detective Agency [312505]
Fetching X:\Dirk Gently's Holistic Detective Agency\poster.jpg => [poster/680x1000, en, 10.0, http://thetvdb.com/banners/posters/312505-4.jpg]
Fetching X:\Dirk Gently's Holistic Detective Agency\banner.jpg => [series/graphical, en, 10.0, http://thetvdb.com/banners/graphical/312505-g3.jpg]
Fetching X:\Dirk Gently's Holistic Detective Agency\fanart.jpg => [fanart/graphical/1920x1080, en, 10.0, http://thetvdb.com/banners/fanart/original/312505-15.jpg]
Fanart not found: X:\Dirk Gently's Holistic Detective Agency\clearart.png / hdclearart
Fanart not found: X:\Dirk Gently's Holistic Detective Agency\clearart.png / clearart
Fetching X:\Dirk Gently's Holistic Detective Agency\logo.png => [hdtvlogo, en, 1.0, https://assets.fanart.tv/fanart/tv/312505/hdtvlogo/dirk-gentlys-holistic-detective-agency-58138636f26d4.png]
Fetching X:\Dirk Gently's Holistic Detective Agency\landscape.jpg => [tvthumb, en, 1.0, https://assets.fanart.tv/fanart/tv/312505/tvthumb/dirk-gentlys-holistic-detective-agency-583f2c66e7889.JPG]
Done ?(?????)?
As far as i can tell it worked ok, but i still received 0kb files. I did clear out the folder before i ran the test as well. It did make new files but a few are still zero KB. In-particular the folder.jpg i need.

So i went to download the latest JAR file, for a program that's main support is windows and mac i spent about an hour figuring out and downloading Linux based encryption and compression aps. I did finally get the jar file extracted and it runs fine. As a bonus it runs on my 2012R2 box as well... great i thought! but wait its a portable version that didn't update the installed version or seem to install at all. So, back to the forums where there is mention of an updatescript.sh... but wait, it's for Linux, at that point I'm throwing in the towel.

So long story short Ive tried to run the latest version, tried to find the places people mentioned to update the script from other threads and nothing works.

I paid 21 dollars for an app and all i need is an installer or way to install and for the TV artwork to work.
Please Help I'm desperate.
Solonor
Posts: 10
Joined: 23 May 2016, 17:13

Re: TVArtwork Still not working

Post by Solonor »

So i found this code i can change from another thread but it just says to make a temp.groovy file. where do i put that file so filebot sees it?

Code: Select all

def override = _args.conflict == 'override'
import static groovy.json.StringEscapeUtils.*


/**
 * XBMC helper functions
 */
def scanVideoLibrary(host, port) {
	tryLogCatch {
		telnet(host, port) { writer, reader ->
			writer.println("""{"jsonrpc":"2.0","method":"VideoLibrary.Scan","id":1}""")
		}
	}
}

def showNotification(host, port, title, message, image) {
	tryLogCatch {
		telnet(host, port) { writer, reader ->
			writer.println("""{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"${escapeJavaScript(title)}","message":"${escapeJavaScript(message)}", "image":"${escapeJavaScript(image)}"},"id":1}""")
		}
	}
}



/**
 * Plex helpers
 */


/**
 * TheTVDB artwork/nfo helpers
 */
def fetchSeriesBanner(outputFile, seriesId, bannerType, bannerType2, season, override, locale) {
	if (outputFile.exists() && !override) {
		log.finest "Banner already exists: $outputFile"
		return outputFile
	}

	// select and fetch banner
	def artwork = TheTVDB.getArtwork(seriesId, bannerType, locale)
	def banner = [locale.language, null].findResult { lang -> artwork.find{ it.matches(bannerType2, season, lang) } }
	if (banner == null) {
		log.finest "Banner not found: $outputFile / $bannerType:$bannerType2"
		return null
	}
	log.finest "Fetching $outputFile => $banner"
	log.fine "fetchSeriesBanner - banner.url: [$banner.url]"
	def URL tmp = new URL(banner.url.toString().replaceAll(/http/, 'https'))
	log.fine "fetchSeriesBanner - banner.url NEW: [$tmp]"
	return tmp.saveAs(outputFile)
}

def fetchSeriesFanart(outputFile, seriesId, type, season, override, locale) {
	if (outputFile.exists() && !override) {
		log.finest "Fanart already exists: $outputFile"
		return outputFile
	}

	def artwork = FanartTV.getArtwork(seriesId, "tv", locale)
	def fanart = [locale.language, null].findResult{ lang -> artwork.find{ it.matches(type, season, lang) } }
	if (fanart == null) {
		log.finest "Fanart not found: $outputFile / $type"
		return null
	}
	log.finest "Fetching $outputFile => $fanart"
	log.fine "fetchSeriesFanart - fanart.url OLD: [$banner.url]"
	def URL tmp = new URL(fanart.url.toString().replaceAll(/http/, 'https'))
	log.fine "fetchSeriesFanart - fanart.url NEW: [$tmp]"
	return tmp.saveAs(outputFile)
}

def fetchSeriesNfo(outputFile, i, locale) {
	log.fine "Generate Series NFO: $i.name [$i.id]"
	def xml = XML {
		tvshow {
			title(i.name)
			sorttitle([i.name, i.startDate as String].findAll{ it?.length() > 0 }.findResults{ it.sortName('$2') }.join(' :: '))
			year(i.startDate?.year)
			rating(i.rating)
			votes(i.ratingCount)
			plot(i.overview)
			runtime(i.runtime)
			mpaa(i.certification)
			id(i.id)
			i.genres.each{
				genre(it)
			}
			thumb(i.bannerUrl)
			premiered(i.startDate)
			status(i.status)
			studio(i.network)
			tvdb(id:i.id, "https://www.thetvdb.com/?tab=series&id=${i.id}")

			/** Kodi requires an <episodeguide> element with a TheTVDB API (v1) Series Record XML URL **/
			episodeguide {
				url(cache:"${i.id}.xml", "https://www.thetvdb.com/api/1D62F2F90030C444/series/${i.id}/all/${locale.language}.zip")
			}
		}
	}
	xml.saveAs(outputFile)
}
 

def fetchSeriesArtworkAndNfo(seriesDir, seasonDir, seriesId, season, override = false, locale = Locale.ENGLISH) {
	tryLogCatch {
		// fetch nfo
		def seriesInfo = TheTVDB.getSeriesInfo(seriesId, locale)
		fetchSeriesNfo(seriesDir.resolve('tvshow.nfo'), seriesInfo, locale)

		// fetch series banner, fanart, posters, etc
		['680x1000', null].findResult{ fetchSeriesBanner(seriesDir.resolve('poster.jpg'), seriesId, 'poster', it, null, override, locale) }
		['graphical', null].findResult{ fetchSeriesBanner(seriesDir.resolve('banner.jpg'), seriesId, 'series', it, null, override, locale) }

		// fetch highest resolution fanart
		['1920x1080', '1280x720', null].findResult{ fetchSeriesBanner(seriesDir.resolve('fanart.jpg'), seriesId, 'fanart', it, null, override, locale) }

		// fetch season banners
		if (seasonDir != seriesDir) {
			fetchSeriesBanner(seasonDir.resolve('poster.jpg'), seriesId, 'season', 'season', season, override, locale)
			fetchSeriesBanner(seasonDir.resolve('banner.jpg'), seriesId, 'seasonwide', 'seasonwide', season, override, locale)

			// folder image (resuse series poster if possible)
			copyIfPossible(seasonDir.resolve('poster.jpg'), seasonDir.resolve('folder.jpg'))
		}

		// fetch fanart
		// ['hdclearart', 'clearart'].findResult{ type -> fetchSeriesFanart(seriesDir.resolve('clearart.png'), seriesId, type, null, override, locale) }
		// ['hdtvlogo', 'clearlogo'].findResult{ type -> fetchSeriesFanart(seriesDir.resolve('logo.png'), seriesId, type, null, override, locale) }
		// fetchSeriesFanart(seriesDir.resolve('landscape.jpg'), seriesId, 'tvthumb', null, override, locale)

		// fetch season fanart
		// if (seasonDir != seriesDir) {
			// fetchSeriesFanart(seasonDir.resolve('landscape.jpg'), seriesId, 'seasonthumb', season, override, locale)
		// }

		// folder image (resuse series poster if possible)
		copyIfPossible(seriesDir.resolve('poster.jpg'), seriesDir.resolve('folder.jpg'))
	}
}


/**
 * TheMovieDB artwork/nfo helpers
 */






def copyIfPossible(File src, File dst) {
	if (src.exists() && !dst.exists()) {
		src.copyAs(dst)
	}
}

args.eachMediaFolder{ dir ->
	// fetch only missing artwork by default
	if (dir.hasFile{it.name == 'banner.jpg'}) {
		log.finest "Skipping $dir"
		return
	}

	def videos = dir.listFiles{ it.isVideo() }
	def query = _args.query ?: detectSeriesName(videos)
	def sxe = videos.findResult{ parseEpisodeNumber(it) }
	def locale = any{ _args.language.locale }{ Locale.ENGLISH }

	if (query == null) {
		query = dir.dir.hasFile{ it.name =~ /Season/ && it.isDirectory() } ? dir.dir.name : dir.name
	}

	log.finest "$dir => Search by $query"
	def options = TheTVDB.search(query, locale)
	if (options.isEmpty()) {
		log.warning "TV Series not found: $query"
		return
	}

	// sort by relevance
	options = options.sortBySimilarity(query, { it.name })

	// auto-select series
	def series = options[0]

	// maybe require user input
	if (options.size() > 1 && _args.strict) {
		series = showInputDialog(options, query, 'Select TV Show:')
	}

	if (series == null) {
		return null
	}

	// auto-detect structure
	def seriesDir = [dir.dir, dir].sortBySimilarity(series.name, { it.name })[0]
	def season = sxe && sxe.season > 0 ? sxe.season : 1

	log.fine "$dir => $series"
	tryLogCatch {
		fetchSeriesArtworkAndNfo(seriesDir, dir, series.id, season, false, locale)
	}
}
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVArtwork Still not working

Post by kim »

run like so, "temp.groovy" can be anywhere, just put in full path like any other file in cmd

Code: Select all

filebot -script temp.groovy
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVArtwork Still not working

Post by kim »

maybe we can get rednoah to make a Windows version of "update-filebot.sh" ???

to get started I made this:

Code: Select all

@echo OFF
set logfile="%~dp0\filebot_automatic_updater.txt"

curl -I https://get.filebot.net/filebot/latest/FileBot.jar.xz.gpg
pause

curl -O https://get.filebot.net/filebot/latest/FileBot.jar.xz.gpg
pause

"%~dp0gpg2.exe" --import "%~dp0maintainer.pub"
"%~dp0gpg2.exe" --list-keys
"%~dp0gpg2.exe" --trusted-key 4E402EBF7C3C6A71 --output "%~dp0FileBot.jar.xz" --decrypt "%~dp0FileBot.jar.xz.gpg"
"%~dp0xz.exe" --decompress "%~dp0FileBot.jar.xz"
java -jar "%~dp0FileBot.jar" -version >> %logfile%
pause
1st. pause = check if there is a new file ? (look for e.g. last-modified: Sun, 01 Oct 2017 06:09:05 GMT)

for this to work you need (Windows):
curl https://curl.haxx.se/download.html
gpg https://gnupg.org/download/index.html
maintainer.pub from e.g https://github.com/filebot/filebot/tree ... ebsite/gpg
xz https://tukaani.org/xz/

btw: "%~dp0" = path to where you run "this" e.g batch from
Solonor
Posts: 10
Joined: 23 May 2016, 17:13

Re: TVArtwork Still not working

Post by Solonor »

I just got it working.. it's a Christmas Miracle lol. I just had to specify the full path like you said above. Seems 4.7.9 is back working with this call script.
Spent 5 hours troubleshooting this and would still like to be able to update to latest version on server 2012. but 4.7.9 is fine for now if its working.

If others have this issue; Save yourself the time of trying to update, buying off the windows store, and/or downloading the new jar and going though all that rigamarole that doesn't fix this.

create a blank file somewhere and paste in the above code.
rename it to something.groovy, make note of the file extension so its not something.groovy.txt should be something.groovy
I copied mine to the C:\Program Files\FileBot\ dir but as mentioned above just place it where you can point to it in the script
update your script to call it like so;
filebot -script "C:\Program Files\FileBot\tmp.groovy" "E:\TV Shows\" -non-strict --conflict override

This seems to be working so far on 4.7.9 hope this will save some folks that aren't versed in app development some time. There was conflicting info in some threads that it was fixed in the latest revision, then it said no not on the windows one, then the whole beta jar extraction thing was just a mess. Way more difficult that it should be.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVArtwork Still not working

Post by kim »

What version/Build-Revision is the Windows store on now ?

you can use e.g. 7-zip to look in
FileBot.jar\META-INF\MANIFEST.MF

"Manifest-Version: 1.0
Ant-Version: Apache Ant 1.10.1
Created-By: 1.8.0_144-b01 (Oracle Corporation)
Build-Date: 2017-10-01
Build-Revision: 5218
Main-Class: net.filebot.Main"
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: TVArtwork Still not working

Post by rednoah »

1.
:!: The Windows Store does not allow access to binaries. You cannot access or modify the jar.

Calling filebot -version will tell you what version or revision of FileBot you have.


2.
I have not tested anything on Windows Server 2012/2016 so I can't tell you how to install or run Windows Store apps. Maybe it's possible. Maybe not. Normally I'd recommend using the WSL (e.g. Windows Subsystem for Linux) but AFAIK Windows Server 2012 doesn't support that yet either.

The only thing you can do is running the old 4.7.9 legacy release, and patch it to a newer revision manually if you want to fix the artwork issue. Unfortunately, this will require some tinkering. There is no out of the box solution right now.

:idea: The latest version on the Windows Store is 4.7.13 (r5200) which was released before TheTVDB changes things and caused the 0 bytes artwork issue. The next public release will fix this issue, but has not yet been released. There's lots of unrelated work that needs to be done and tested carefully before a new release can be published.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: TVArtwork Still not working

Post by rednoah »

kim wrote: 20 Oct 2017, 18:16 maybe we can get rednoah to make a Windows version of "update-filebot.sh" ???
portable.sh and update-filebot.sh are known to work with WSL out of the box (tested on Windows 10).
:idea: Please read the FAQ and How to Request Help.
Post Reply