1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

Added {id} binding to get the movie/series id as Integer

This commit is contained in:
Reinhard Pointner 2016-06-04 12:46:17 +08:00
parent 9d84ef7663
commit 476e387ca4

View File

@ -259,6 +259,16 @@ public class MediaBindingBean {
return null;
}
@Define("id")
public Integer getId() throws Exception {
if (infoObject instanceof Episode)
return getEpisode().getSeriesInfo().getId();
if (infoObject instanceof Movie)
return getMovie().getId();
return null;
}
@Define("tmdbid")
public String getTmdbId() throws Exception {
int tmdbid = getMovie().getTmdbId();
@ -272,7 +282,7 @@ public class MediaBindingBean {
try {
tmdbid = WebServices.TheMovieDB.getMovieInfo(getMovie(), Locale.ENGLISH, false).getId();
} catch (FileNotFoundException e) {
return null;
debug.warning(e::toString);
}
}