Page 1 of 1

Request: AMC/artwork.tvdb.groovy to support TV from TheMovieDB

Posted: 13 Aug 2017, 21:22
by kim
TheMovieDB now has better artwork then TheTVDB and most TV shows, but we can't use it because no support for "--db TheMovieDB" on AMC/artwork.tvdb.groovy
(TheTVDB is hard-coded and changing it to "TheMovieDB::TV" dont work proper)

Re: Request: AMC/artwork.tvdb.groovy to support TV from TheMovieDB

Posted: 14 Aug 2017, 02:55
by rednoah
Sorry, for the sake of simplicity, the AMC script and then artwork scripts only support the predefined well-tested standard default configuration.

Re: Request: AMC/artwork.tvdb.groovy to support TV from TheMovieDB

Posted: 14 Aug 2017, 14:11
by kim
can you make the "behind the scenes" stuff work then ?

Then I can make my own local amc/artwork/htpc work...
cant be that hard... most of the functions is already here...
get info = TheMovieDB::TV
get artwork = it works with movies so most be ok

what I need done:
make new artwork.tmdbTV.groovy based on artwork.tmdb or artwork.tvdb what is easiest ?
modify fetchMovieArtworkAndNfo
copy and modify from htpc fetchSeriesNfo and fetchSeriesBanner to new fetchSeriesNfoTMdb and fetchSeriesBannerTMdb maybe more ?

Re: Request: AMC/artwork.tvdb.groovy to support TV from TheMovieDB

Posted: 14 Aug 2017, 14:20
by rednoah
No, because the "behind the scenes" stuff is by far to most effort as this point, and I don't have time for that right now. Maybe in the future.

Making your own scripts would be a lot of extra effort if the "behind the scenes" isn't just there for you to use. You'd have to talk to the TheMovieDB artwork API yourself.

Re: Request: AMC/artwork.tvdb.groovy to support TV from TheMovieDB

Posted: 14 Aug 2017, 15:15
by kim
rednoah wrote: 14 Aug 2017, 14:20 You'd have to talk to the TheMovieDB artwork API yourself.
Can you help me get started then ?
(new artwork.tmdbTV.groovy and modify htpc)

https://developers.themoviedb.org/3/sea ... h-tv-shows = not needed ?
https://developers.themoviedb.org/3/tv/get-tv-details = TheMovieDB::TV ?
https://developers.themoviedb.org/3/tv/get-tv-images = don't work now ?
https://developers.themoviedb.org/3/tv-seasons
https://developers.themoviedb.org/3/tv- ... son-images = don't work now ?

=
1. get img url info from TheMovieDB::TV
2. download show img's
3. get tv-seasons info
4. download season img's

PS: I also want to get and use the info not just the artwork

EDIT: to get "get images" working remove the part "&language=en-US"

Re: Request: AMC/artwork.tvdb.groovy to support TV from TheMovieDB

Posted: 14 Aug 2017, 15:33
by kim
looks like TheMovieDB::TV aka "get/tv/{tv_id}" has all needed artwork:
"backdrop_path" = fanart.jpg
"poster_path" = folder.jpg or poster.jpg
"seasons" -> "poster_path" = Season xx / folder.jpg or poster.jpg

missing banner.jpg. but don't think TheMovieDB has this ?

I also need the
https://developers.themoviedb.org/3/tv-episodes
but that's properly a "me" problem ;)

Re: Request: AMC/artwork.tvdb.groovy to support TV from TheMovieDB

Posted: 14 Aug 2017, 19:43
by kim
rednoah wrote: 14 Aug 2017, 14:20 You'd have to talk to the TheMovieDB artwork API yourself.
if you just tell me how, I will do the rest ?

Re: Request: AMC/artwork.tvdb.groovy to support TV from TheMovieDB

Posted: 22 Sep 2017, 02:24
by kim
I finally made it work on TMDB with TV+artwork, but how do I make it use the build in Cache ?
(requestJson / Cache.ONE_WEEK)

I'm using this:

Code: Select all

	def slurper = new groovy.json.JsonSlurper()
	def baseURL = "https://api.themoviedb.org/3/tv/"
	def apiKey = "?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
	def imgPath = "https://image.tmdb.org/t/p/original"
	def addOns = "&append_to_response=videos,external_ids,credits"
	def langUS = "&language=en-US"
	def seriesInfoUrl = "${baseURL}${i.id}${apiKey}${langUS}${addOns}"
	def seriesInfo = slurper.parseText( new URL( seriesInfoUrl ).text )
also, can I make it better ?