AMC script creating invalid movie trailer link

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
jp4500
Posts: 33
Joined: 23 Aug 2015, 01:55

AMC script creating invalid movie trailer link

Post by jp4500 »

I noticed that Kodi (latest stable version) wasn't playing back trailers on my movies that were processed with the AMC script.

I was able to track it down the the <trailer> XML tag that AMC script creates.. Here's what's in the .nfo file::

<trailer>ABCDEFGHIJK</trailer>

I removed this file, refreshed movie info in Kodi and exported it back to a .nfo file. Here's the working version:

<trailer>plugin://plugin.video.youtube/?action=play_video&videoid=ABCDEFGHIJK</trailer>

---

Is this a problem with the AMC script? I don't know if other programs besides Kodi use this <trailer> field or not.. any way to fix this? Should I download the amc script and modify locally?

thanks for the help!
jp4500
Posts: 33
Joined: 23 Aug 2015, 01:55

Re: AMC script creating invalid movie trailer link

Post by jp4500 »

quick update.. here's additional info I found on the <trailer> syntax for Kodi:

http://forum.kodi.tv/showthread.php?tid=100665
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC script creating invalid movie trailer link

Post by rednoah »

Is there some sort of common ground for the <trailer> element that works for both Kodi and Plex? Otherwise I would be inclined to just not generate <trailer> elements at all.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: AMC script creating invalid movie trailer link

Post by kim »

Well the way i fixed it was to edit the htpc.groovy file

Code: Select all

			//i.trailers?.each{ t ->
			i.trailers.each{ t ->
				t.sources.each { s, v ->
				XBMC_Trailer = ("plugin://plugin.video.youtube/?action=play_video&videoid=")
					//trailer(type:t.type, name:t.name, size:s, v)
					trailer(XBMC_Trailer+v)
				}
			}
<trailer>plugin://plugin.video.youtube/?action=play_video&videoid=ID_HERE</trailer>

i cant find any info on plex format... dont even think plex uses the trailer tag, so no effect to plex ?
but XBMC / Kodi only works if you change it like i did


more info:
https://github.com/bromix/plugin.video.youtube
http://forum.kodi.tv/showthread.php?tid=100665
http://forums.plex.tv/discussion/117461 ... xmbc-agent
https://github.com/gboudreau/XBMCnfoMov ... ter.bundle
jp4500
Posts: 33
Joined: 23 Aug 2015, 01:55

Re: AMC script creating invalid movie trailer link

Post by jp4500 »

very cool - thanks! I take it this is a local change, right? i tried once to use a local copy of the amc script but that failed due to missing dependencies and I never tried again. But, seems like it's worth another shot to get this to work.

(also, might good to update the official version as well if Plex doesn't even use this tag. I think that's more a question for @rednoah though)
Post Reply