please is there any way to use TheMovieDb for series?

Support for Windows users
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

please is there any way to use TheMovieDb for series?

Post by cafevincent »

I don't like how TheTVDb works. they currently have their voting feature disabled so many of their show ratings are 10.0, for example. the ratings are generally way off due to low vote counts. in fact they are so way off they are not listing ratings at their site at all ATM.

another thing is that even though they do list the imdb tag, they don't actually come through filebot. I like to include the imdb tag in the filename because that way I can open the imdb page with two clicks using my lookup script in the context menu.

so I am in dire need of getting my series data from somewhere else. is it in any way possible to fetch series data via TheMovieDb? I mean they do have series and better data accuracy so why not? or at least tell me why imdb tag via TheTVDb is not delivered, they are not answering my emails.
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

I am assuming imdb tags are not coming through for anybody. if it's just me then let me know and I'll post them logs and everything.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: please is there any way to use TheMovieDb for series?

Post by rednoah »

Yes, you can click the TheMovieDB button instead of the TheTVDB button (Episode Mode section) if you prefer to match files with TheMovieDB episode data.

If you're using TheTVDB, then you may be able to use the {omdb} (omdb info for given movie / series if available) binding in your format expression to get the ratings / ids you want.

e.g. series imdb id via omdb query:

Code: Select all

{omdb.imdbId}
e.g. series rating via omdb query:

Code: Select all

{omdb.rating}

:!: Note that {imdbid} only works for Movie Mode / Movie Objects and does not work for Episode Objects regardless of selected database.
:idea: Please read the FAQ and How to Request Help.
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

rednoah wrote: 14 Sep 2018, 14:51 Yes, you can click the TheMovieDB button instead of the TheTVDB button (Episode Mode section) if you prefer to match files with TheMovieDB episode data.
how about command line? how do I signal TheMovieDb that I want series results?

rednoah wrote: 14 Sep 2018, 14:51If you're using TheTVDB, then you may be able to use the {omdb} (omdb info for given movie / series if available) binding in your format expression to get the ratings / ids you want.

e.g. series imdb id via omdb query:

Code: Select all

{omdb.imdbId}
e.g. series rating via omdb query:

Code: Select all

{omdb.rating}

:!: Note that {imdbid} only works for Movie Mode / Movie Objects and does not work for Episode Objects regardless of selected database.
I can't get this to work. it said something about "." being unexpected while I was typing it in, and now returning to the screen it says "binding omdb: server returned http response code 401"

I actually thought the OMDb had been out of use for years now. it has not worked for me at least.

anyway this is how I wrote it

Code: Select all

{n} {s00e00} {t} {genres} {certification} r{omdb.rating} {vf} {vc} {ac}-{omdb.imdbId}
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: please is there any way to use TheMovieDb for series?

Post by kim »

how about command line? how do I signal TheMovieDb that I want series results?
you can if you use my custom AMC script:
viewtopic.php?f=4&t=5451&p=31192#p31191

Code: Select all

To get TV from themoviedb:
--def tmdbTV=y (default is use thetvdb)
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

kim wrote: 19 Sep 2018, 15:21 well it sounds like you don't want my script

so why not just use this

Code: Select all

filebot -rename -non-strict --db TheMovieDB PATH_HERE --format "{n} {s00e00} {t} {genres} {certification} r{omdb.rating} {vf} {vc} {ac}-{omdb.imdbId}"
btw: {t} will F up your movie files, better use 2 formats ;)
better continue here to stay on topic. i'm testing it now but I get this mishap. can I force tv mode in tmdb:

Code: Select all

Auto-detect movie from context: [E:\TEMP\Who Is America S01E04.mkv]
how about command line? how do I signal TheMovieDb that I want series results?
bringing me back to this earlier question.
Last edited by cafevincent on 19 Sep 2018, 15:47, edited 1 time in total.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: please is there any way to use TheMovieDb for series?

Post by kim »

I forgot that part

Code: Select all

--db TheMovieDB::TV
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

I'm not sure if that was supposed to be ::TV or :TV but either way is no good. with single : I get error

Code: Select all

Fetch failed: Try again in 5 seconds (2 more) => java.io.IOException: Server returned HTTP response code: 401 for URL: http://www.omdbapi.com/?i=tt8679236&tomatoes=false
with double :: I get no certification, no rating and no imdb tag for series. I checked themoviedb if my sample series has these in the listing and it does.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: please is there any way to use TheMovieDb for series?

Post by kim »

Code: Select all

--db TheMovieDB::TV
is correct

Why not working... ?... This is for rednoah ;)
Binding "omdb": net.filebot.web.SeriesInfo cannot be cast to net.filebot.web.TheTVDBSeriesInfo
but omdb have TV info so ?


viewtopic.php?t=5098#p28631
rednoah wrote: 08 Jun 2017, 05:57 1.
{imdbid} is only available for (most but not all) Movie objects, but not for Episode objects. I recommend using TheMovieDB ID for movies and TheTVDB ID for TV shows. Both of these can be accessed via the {id} binding.
Price atm for using TheMovieDB::TV
{certification} and omdb stuff is not supported aka ask rednoah ;)

workaround... use info from TheMovieDB
replace {omdb.rating}

Code: Select all

{rating}
replace {omdb.imdbId}

Code: Select all

{def eAddOns = ["append_to_response":"external_ids"]; net.filebot.WebServices.TheMovieDB.request("tv/${id}/season/${s}/episode/${e}", eAddOns, Locale.ENGLISH).external_ids.imdb_id}
All in new format

Code: Select all

{n} {s00e00} {t} {genres} r{rating} {vf} {vc} {ac}-{def eAddOns = ["append_to_response":"external_ids"]; net.filebot.WebServices.TheMovieDB.request("tv/${id}/season/${s}/episode/${e}", eAddOns, Locale.ENGLISH).external_ids.imdb_id}
Last edited by kim on 19 Sep 2018, 21:33, edited 2 times in total.
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

I'm not sure what I'm looking at in this workaround. am I to use that last code box as-is where the formatting goes?

btw, don't tell me this is a VPN issue? I can't be turning that off. I'll check.
Last edited by cafevincent on 20 Sep 2018, 12:24, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: please is there any way to use TheMovieDb for series?

Post by rednoah »

1.
Are you using the latest release? The OMDb API has changed and requires the latest release. FileBot 4.7.9 and older won't work.


2.
--db TheMovieDB::TV is indeed correct, since --mode forced BOTH database and series / movie mode, and internally there are two completely separate implementations for TheMovieDB that handle each mode separately.

e.g. retrieve episode list via TheMovieDB:

Code: Select all

filebot -list --q firefly --db TheMovieDB::TV

3.
TheTVDB is the primary database. Some bindings, especially the more intricate ones, might not be supported if you use TheMovieDB. In this case, the {omdb} only works for TheTVDB (but not AniDB / TheMovieDB) since IMDb ID is required for lookup and (at the time) only TheTVDB included that ID in the series record. I'll have a look if TheMovieDB API provides IMDb ID as well now, then maybe this can be supported in a future release.

Top-level bindings such as {genres} {certification} {rating} etc work for TheMovieDB::TV but with data supplied by TheMovieDB and not IMDb / OMDb:

Code: Select all

$ filebot -list --q firefly --db TheMovieDB::TV --format "{n} {s00e00} {genres} {certification} {rating}"
Firefly S01E01 [Western, Drama, Action & Adventure, Sci-Fi & Fantasy]  8.2
...
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: please is there any way to use TheMovieDb for series?

Post by kim »

It does not look like {certification} works atm ?
https://www.themoviedb.org/tv/1437-firefly
Certificering = TV-14
I think because "Certificering" is only on the series level and not on the episode level (API)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: please is there any way to use TheMovieDb for series?

Post by rednoah »

Yes, all of {genres} {certification} {rating} etc is series level and not episode level. {certification} indeed seems to be broken or unsupported for TheMovieDB::TV right now. I'll have a look.


EDIT:

Support for {certification} would require an additional HTTP request upfront that would be a waste unless {certification} is used in the format later on, and it isn't for most users most of the time, so {certification} will not be supported for TheMovieDB::TV for performances reasons and to not put unnecessary load on TheMovieDB services:
https://developers.themoviedb.org/3/tv/ ... nt-ratings
:idea: Please read the FAQ and How to Request Help.
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

there is no need for all the info to be episode level accurate (although ep specific rating would be super), can't I just jut get all the info (incl. cert, rating, imdbId) for the series level instead? and if there is any problems on how its delivered I'll make it work in the script and construct the name if I have to, even if I only get the name of the series (with this info) without episode or title I can make it work. if this can be achieved I'll have my reason for the expensive lifetime license. this all started from a missing imdbId and inaccurate rating for series.. it would be equally bad to have a missing certification.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: please is there any way to use TheMovieDb for series?

Post by rednoah »

1.
The series {rating} works out of the box.


2.
IMDB ID is not part of the series record, but there might be a way to somehow look up the IMDB ID via the TMDB Series ID via the API somehow:
https://developers.themoviedb.org/3/tv/get-tv-details


3.
For the certification, you could make your own TheMovieDB API request in your custom format. You can build the request URL by using your own API key and {id} and parse the result with Groovy JsonSlurper. It's a simple one liner. The same could be done for episode specific (you have episode.id too) ratings. The same could be done for IMDB lookup.


e.g

Code: Select all

{
	def url = new URL('https://www.filebot.net/reviews.json')
	def json = new groovy.json.JsonSlurper().parse(url)
	return json[0].text
}
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: please is there any way to use TheMovieDb for series?

Post by kim »

Here you go... all from my script ;)

Code: Select all

{def eAddOns = ["append_to_response":"external_ids"]; 
def sAddOns = ["append_to_response":"external_ids,content_ratings"];
def episodeInfo = net.filebot.WebServices.TheMovieDB.request("tv/${id}/season/${s}/episode/${e}", eAddOns, Locale.US);
def seriesInfo = net.filebot.WebServices.TheMovieDB.request("tv/${id}", sAddOns, Locale.US);
def epRating = episodeInfo.vote_average;
def epImdbId = episodeInfo.external_ids.imdb_id;
def mpaaCountryLIST = ['US']
def mpaaRating = seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{"$it.rating"}.join();
(allOf{n}{s00e00}{t}{genres}{mpaaRating}{'r'+epRating}{vf}{vc}{ac}{'-'+epImdbId}).join(' ')
}
EDIT:
change this if you want imdb id for the series not episode
def epImdbId = episodeInfo.external_ids.imdb_id; and {epImdbId}
to
def sImdbId = seriesInfo.external_ids.imdb_id; and {sImdbId}

like {omdb.imdbId} does
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

I'm still wondering how to use all this code from the command line, in the meanwhile I have been trying the latest version of filebot and the omdb rating, imdbId seems to work. except when the imdbId starts with a 0, then it gets left out, rendering the id invalid. I'm not sure who to ask for a fix.
Last edited by cafevincent on 06 Nov 2018, 12:32, edited 1 time in total.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: please is there any way to use TheMovieDb for series?

Post by kim »

like so (ALL in 1 line):

Code: Select all

filebot -list --q firefly --db TheMovieDB::TV --format "{def eAddOns = ['append_to_response':'external_ids']; def sAddOns = ['append_to_response':'external_ids,content_ratings']; def episodeInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}/season/${s}/episode/${e}\", eAddOns, Locale.US); def seriesInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}\", sAddOns, Locale.US); def epRating = episodeInfo.vote_average; def epImdbId = episodeInfo.external_ids.imdb_id; def mpaaCountryLIST = ['US']; def mpaaRating = seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{\"$it.rating\"}.join(); (allOf{n}{s00e00}{t}{genres}{mpaaRating}{'r'+epRating}{vf}{vc}{ac}{'-'+epImdbId}).join(' ')}"
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

kim wrote: 23 Sep 2018, 19:38 like so (ALL in 1 line):

Code: Select all

filebot -list --q firefly --db TheMovieDB::TV --format "{def eAddOns = ['append_to_response':'external_ids']; def sAddOns = ['append_to_response':'external_ids,content_ratings']; def episodeInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}/season/${s}/episode/${e}\", eAddOns, Locale.US); def seriesInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}\", sAddOns, Locale.US); def epRating = episodeInfo.vote_average; def epImdbId = episodeInfo.external_ids.imdb_id; def mpaaCountryLIST = ['US']; def mpaaRating = seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{\"$it.rating\"}.join(); (allOf{n}{s00e00}{t}{genres}{mpaaRating}{'r'+epRating}{vf}{vc}{ac}{'-'+epImdbId}).join(' ')}"
I tried a recent episode of tosh.0 and I get no certification, rating 0.0 and `null`instead of imdb tag. I tried an episode of GoT and got good results! I wanna build a script that puts in series level info when episode level info is not available. the only thing I would change is get the genres from somewhere else (I don't like the combined `action & adventure` and `scifi & fantasy` genres).
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: please is there any way to use TheMovieDb for series?

Post by kim »

"tosh.0 and I get no certification" = make themoviedb account and add the info

All else DONE (I think) ;)

Code: Select all

filebot -list --q firefly --db TheMovieDB::TV --def ut_label=TV --format "{def season = (any{special ? 0 : s} {s}); def episode = (any{special ? special : e} {e}); def eAddOns = ['append_to_response':'external_ids']; def sAddOns = ['append_to_response':'external_ids,content_ratings']; def episodeInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}/season/${season}/episode/${episode}\", eAddOns, Locale.US); def seriesInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}\", sAddOns, Locale.US); def epRating = episodeInfo.vote_average; def epImdbId = episodeInfo.external_ids.imdb_id; def sImdbId = seriesInfo.external_ids.imdb_id; def mpaaCountryLIST = ['CA', 'DE', 'GB', 'US']; def mpaaRating = seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{\"$it.rating\"}.last(); def newGenre = genres*.split(' & ').flatten().each{it}; (allOf{n}{s00e00}{t}{newGenre}{mpaaRating}{'r'+any{epRating.toString() != '0.0' ? epRating.round(1) : null}{rating}}{vf}{vc}{ac}{'-'+any{epImdbId}{sImdbId}}).join(' ')}" --action test
Output:
Firefly S01E01 The Train Job [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.4 -tt0579539
Firefly S01E02 Bushwhacked [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.5 -tt0579528
Firefly S01E03 Our Mrs. Reynolds [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.4 -tt0579532
Firefly S01E04 Jaynestown [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.4 -tt0579530
Firefly S01E05 Out of Gas [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r9.1 -tt0579533
Firefly S01E06 Shindig [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r7.9 -tt0579537
Firefly S01E07 Safe [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.0 -tt0579534
Firefly S01E08 Ariel [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.5 -tt0579527
Firefly S01E09 War Stories [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.1 -tt0579541
Firefly S01E10 Objects in Space [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r9.0 -tt0579531
Firefly S01E11 Serenity [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r7.8 -tt0579535
Firefly S01E12 Heart of Gold [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.1 -tt0579529
Firefly S01E13 Trash [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.2 -tt0579540
Firefly S01E14 The Message [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r7.9 -tt0579538
Firefly S00E01 Serenity [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r10.0 -tt0379786
Firefly S00E02 Here?s How It Was: The Making of ?Firefly? [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.2 -tt0303461
Firefly S00E03 Done the Impossible [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.2 -tt0303461
Firefly S00E04 Browncoats Unite [Western, Drama, Action, Adventure, Sci-Fi, Fantasy] TV-14 r8.2 -tt0303461
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

man it is so cool using this! renaming everything now.

but just to split action & adventure and Sci-Fi & Fantasy is silly. Firefly is not fantasy, Game of Thrones is not sci-fi etc. I don't know why they decided to merge those genres since they've now stopped serving their purpose. they don't use the combos for movies. I take it this means it's not possible (in a single fetch) to also get genres from like tvdb?

I'm starting to learn this language a little bit. is this java?

where are these episode specific ratings coming from? I don't see a per episode voter in themoviedb, and there doesn't seem to be a lot of votes either.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: please is there any way to use TheMovieDb for series?

Post by kim »

With TVDB genres (Warning: this is not so fast anymore AND it's possible to find wrong show/info):

Code: Select all

filebot -list --q firefly --db TheMovieDB::TV --def ut_label=TV --format "{def tvdbId = net.filebot.WebServices.TheTVDB.search(series.name, Locale.US).id.join().toInteger(); def tvdbInfo = net.filebot.WebServices.TheTVDB.getSeriesInfo(tvdbId, Locale.US); def season = (any{special ? 0 : s} {s}); def episode = (any{special ? special : e} {e}); def eAddOns = ['append_to_response':'external_ids']; def sAddOns = ['append_to_response':'external_ids,content_ratings']; def episodeInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}/season/${season}/episode/${episode}\", eAddOns, Locale.US); def seriesInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}\", sAddOns, Locale.US); def epRating = episodeInfo.vote_average; def epImdbId = episodeInfo.external_ids.imdb_id; def sImdbId = seriesInfo.external_ids.imdb_id; def mpaaCountryLIST = ['CA', 'DE', 'GB', 'US']; def mpaaRating = seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{\"$it.rating\"}.last(); def newGenre = genres*.split(' & ').flatten().each{it}; (allOf{n}{s00e00}{t}{any{tvdbInfo.genres}{newGenre}}{mpaaRating}{'r'+any{epRating.toString() != '0.0' ? epRating.round(1) : null}{rating}}{vf}{vc}{ac}{'-'+any{epImdbId}{sImdbId}}).join(' ')}" --action test
it's Groovy/Java

ratings.... you see it now (8.4) ?
https://www.themoviedb.org/tv/1437-fire ... /episode/1
cafevincent
Posts: 54
Joined: 22 Jun 2017, 10:08

Re: please is there any way to use TheMovieDb for series?

Post by cafevincent »

problem. can you see the error here?

Code: Select all

d:\SOURCE\Mom.S06E01.1080p.HDTV.x264-PLUTONiUM[TGx]>if "show" == "show" set "form={def tvdbId = net.filebot.WebServices.TheTVDB.search(series.name, Locale.US).id.join().toInteger(); def tvdbInfo = net.filebot.WebServices.TheTVDB.getSeriesInfo(tvdbId, Locale.US); def season = (any{special ? 0 : s} {s}); def episode = (any{special ? special : e} {e}); def eAddOns = ['append_to_response':'external_ids']; def sAddOns = ['append_to_response':'external_ids,content_ratings']; def episodeInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}/season/${season}/episode/${episode}\", eAddOns, Locale.US); def seriesInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}\", sAddOns, Locale.US); def epRating = episodeInfo.vote_average; def epImdbId = episodeInfo.external_ids.imdb_id; def sImdbId = seriesInfo.external_ids.imdb_id; def mpaaCountryLIST = ['CA', 'DE', 'GB', 'US']; def mpaaRating = seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{\"$it.rating\"}.last(); def newGenre = genres*.split(' & ').flatten().each{it}; (allOf{n}{s00e00}{t}{any{tvdbInfo.genres}{newGenre}}{mpaaRating}{'r'+any{epRating.toString() != '0.0' ? epRating.round(1) : null}{rating}}{vf}{vc}{ac}{any{epImdbId}{sImdbId}}).join(' ')}"

d:\SOURCE\Mom.S06E01.1080p.HDTV.x264-PLUTONiUM[TGx]>if "show" == "show" filebot -rename -non-strict --db TheMovieDB::TV "E:\TEMP\vren2809181415553\Mom S06E01 1080p HDTV x264-PLUTONiUM.mkv" --q "MOM " --format "{def tvdbId = net.filebot.WebServices.TheTVDB.search(series.name, Locale.US).id.join().toInteger(); def tvdbInfo = net.filebot.WebServices.TheTVDB.getSeriesInfo(tvdbId, Locale.US); def season = (any{special ? 0 : s} {s}); def episode = (any{special ? special : e} {e}); def eAddOns = ['append_to_response':'external_ids']; def sAddOns = ['append_to_response':'external_ids,content_ratings']; def episodeInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}/season/${season}/episode/${episode}\", eAddOns, Locale.US); def seriesInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}\", sAddOns, Locale.US); def epRating = episodeInfo.vote_average; def epImdbId = episodeInfo.external_ids.imdb_id; def sImdbId = seriesInfo.external_ids.imdb_id; def mpaaCountryLIST = ['CA', 'DE', 'GB', 'US']; def mpaaRating = seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{\"$it.rating\"}.last(); def newGenre = genres*.split(' & ').flatten().each{it}; (allOf{n}{s00e00}{t}{any{tvdbInfo.genres}{newGenre}}{mpaaRating}{'r'+any{epRating.toString() != '0.0' ? epRating.round(1) : null}{rating}}{vf}{vc}{ac}{any{epImdbId}{sImdbId}}).join(' ')}"  1>nul
Expression yields empty value: For input string: "266967767912643572998843474592763733213542745601485612973853349931248212738302962792931933458242950152211412718163216347536028535229541629421531923032503826993526357932461635219729114129906134862227219613393126787730453591931342728272850342726311211317414737213362373147472742217275815783128195032955880337341049328708336480"
net.filebot.format.SuppressedThrowables: Expression yields empty value: For input string: "266967767912643572998843474592763733213542745601485612973853349931248212738302962792931933458242950152211412718163216347536028535229541629421531923032503826993526357932461635219729114129906134862227219613393126787730453591931342728272850342726311211317414737213362373147472742217275815783128195032955880337341049328708336480"
        at net.filebot.format.ExpressionFormat.format(ExpressionFormat.java:163)
        at net.filebot.format.ExpressionFormat.format(ExpressionFormat.java:129)
        at net.filebot.cli.CmdlineOperations.formatMatches(CmdlineOperations.java:570)
        at net.filebot.cli.CmdlineOperations.renameSeries(CmdlineOperations.java:250)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:96)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:115)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:32)
        at net.filebot.Main.main(Main.java:131)
Caused by: java.lang.NumberFormatException: For input string: "266967767912643572998843474592763733213542745601485612973853349931248212738302962792931933458242950152211412718163216347536028535229541629421531923032503826993526357932461635219729114129906134862227219613393126787730453591931342728272850342726311211317414737213362373147472742217275815783128195032955880337341049328708336480"
        at Script1.run(Script1.groovy:1)
        at net.filebot.format.SecureCompiledScript$1.run(SecureCompiledScript.java:87)
        at net.filebot.format.SecureCompiledScript.eval(SecureCompiledScript.java:83)
        at net.filebot.format.ExpressionFormat.format(ExpressionFormat.java:147)
        ... 7 more
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: please is there any way to use TheMovieDb for series?

Post by kim »

What is this ?

Code: Select all

d:\SOURCE\Mom.S06E01.1080p.HDTV.x264-PLUTONiUM[TGx]>if "show" == "show" set "form={CUSTOM FORMAT}"

d:\SOURCE\Mom.S06E01.1080p.HDTV.x264-PLUTONiUM[TGx]>if "show" == "show" filebot -rename -non-strict --db TheMovieDB::TV "E:\TEMP\vren2809181415553\Mom S06E01 1080p HDTV x264-PLUTONiUM.mkv" --q "MOM " --format "{CUSTOM FORMAT}"  1>nul

Expression yields empty value: For input string: "266967767912643572998843474592763733213542745601485612973853349931248212738302962792931933458242950152211412718163216347536028535229541629421531923032503826993526357932461635219729114129906134862227219613393126787730453591931342728272850342726311211317414737213362373147472742217275815783128195032955880337341049328708336480"
net.filebot.format.SuppressedThrowables: Expression yields empty value: For input string: "266967767912643572998843474592763733213542745601485612973853349931248212738302962792931933458242950152211412718163216347536028535229541629421531923032503826993526357932461635219729114129906134862227219613393126787730453591931342728272850342726311211317414737213362373147472742217275815783128195032955880337341049328708336480"
        at net.filebot.format.ExpressionFormat.format(ExpressionFormat.java:163)
        at net.filebot.format.ExpressionFormat.format(ExpressionFormat.java:129)
        at net.filebot.cli.CmdlineOperations.formatMatches(CmdlineOperations.java:570)
        at net.filebot.cli.CmdlineOperations.renameSeries(CmdlineOperations.java:250)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:96)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:115)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:32)
        at net.filebot.Main.main(Main.java:131)
Caused by: java.lang.NumberFormatException: For input string: "266967767912643572998843474592763733213542745601485612973853349931248212738302962792931933458242950152211412718163216347536028535229541629421531923032503826993526357932461635219729114129906134862227219613393126787730453591931342728272850342726311211317414737213362373147472742217275815783128195032955880337341049328708336480"
        at Script1.run(Script1.groovy:1)
        at net.filebot.format.SecureCompiledScript$1.run(SecureCompiledScript.java:87)
        at net.filebot.format.SecureCompiledScript.eval(SecureCompiledScript.java:83)
        at net.filebot.format.ExpressionFormat.format(ExpressionFormat.java:147)
        ... 7 more
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: please is there any way to use TheMovieDb for series?

Post by rednoah »

This makes no sense:

Code: Select all

net.filebot.WebServices.TheTVDB.search(series.name, Locale.US).id.join().toInteger()
You're using the series name value to do another search, and then you take the id of ALL results, and concatenate them, yielding a really long string of numbers, and then creating a int value which overflows. It might work if you only get 1 result, but it probably never works if you get more than one.

Why not just use {id} then? The series id is already a given when you select TheTVDB to match files.
:idea: Please read the FAQ and How to Request Help.
Post Reply