@Override protected MediaMetadata getMetadata(MediaScrapeOptions options) throws Exception { switch (options.getType()) { case TV_SHOW: return getTvShowMetadata(options); case TV_EPISODE: return getEpisodeMetadata(options); default: break; } return new MediaMetadata(providerInfo.getId()); }
/** * Gets the metadata. * * @return the metadata */ public MediaMetadata getMetadata() { MediaMetadata md = new MediaMetadata(""); for (Entry<String, Object> entry : ids.entrySet()) { md.setId(entry.getKey(), entry.getValue()); } md.setTitle(title); md.setOriginalTitle(originalTitle); md.setTagline(tagline); md.setPlot(plot); try { md.setYear(Integer.parseInt(year)); } catch (Exception ignored) { } md.setRating(rating); md.setVoteCount(votes); md.setRuntime(runtime); md.addCertification(certification); return md; }
LOGGER.debug("scrape()" + query.toString()); MediaMetadata metadata = new MediaMetadata(OmdbMetadataProvider.providerInfo.getId());
private MediaMetadata getTvShowMetadata(MediaScrapeOptions options) throws Exception { MediaMetadata md = new MediaMetadata(providerInfo.getId()); String id = ""; String langu = options.getLanguage().getLanguage();
public MediaMetadata getEpisodeMetadata(MediaScrapeOptions options) throws Exception { MediaMetadata md = new MediaMetadata(providerInfo.getId());
MediaMetadata md = new MediaMetadata(providerInfo.getId()); int tmdbId = 0;
options.setCountry(TvShowModuleManager.SETTINGS.getCertificationCountry()); MediaMetadata md = new MediaMetadata(mediaScraper.getMediaProvider().getProviderInfo().getId()); md.setReleaseDate(episode.getFirstAired()); options.setMetadata(md);
LOGGER.debug("getMetadata() " + options.toString()); MediaMetadata md = new MediaMetadata(TmdbMetadataProvider.providerInfo.getId()); MediaMetadata mdSubItem = new MediaMetadata(TmdbMetadataProvider.providerInfo.getId()); mdSubItem.setId(TmdbMetadataProvider.providerInfo.getId(), part.id); mdSubItem.setTitle(part.title);
private MediaMetadata getTvShowMetadata(MediaScrapeOptions options) throws Exception { MediaMetadata md = new MediaMetadata(providerInfo.getId()); Integer id = 0;
private MediaMetadata getEpisodeMetadata(MediaScrapeOptions options) throws Exception { LOGGER.debug("getEpisodeMetadata() " + options.toString()); MediaMetadata md = new MediaMetadata(TraktMetadataProvider.providerInfo.getId());
MediaMetadata md = new MediaMetadata(providerInfo.getId());
protected MediaMetadata _getMetadata(MediaScrapeOptions options) throws Exception { MediaMetadata md = new MediaMetadata(scraper.getProviderInfo().getId()); MediaSearchResult result = options.getResult(); if (result.getIMDBId() != null && result.getIMDBId().contains("tt")) { md.setId(MediaMetadata.IMDB, result.getIMDBId()); } String xmlDetails = processor.getDetails(new KodiUrl(result.getUrl()), result.getId()); // save scraper ID if (!StringUtils.isEmpty(result.getId())) { md.setId(scraper.getProviderInfo().getId(), result.getId()); } // workaround: replace problematic sequences xmlDetails = xmlDetails.replace(" ", " "); processXmlContent(xmlDetails, md, result); // try to parse an imdb id from the url if (!StringUtils.isEmpty(result.getUrl()) && md.getId(MediaMetadata.IMDB) != null) { md.setId(MediaMetadata.IMDB, parseIMDBID(result.getUrl())); } return md; }
Element epXmlEl = epDetailXml.getDocumentElement(); MediaMetadata md = new MediaMetadata(scraper.getProviderInfo().getId()); addMetadata(md, epXmlEl); md.setEpisodeNumber(ep);
Locale fallbackLanguage = new Locale(MediaLanguages.get(providerInfo.getConfig().getValue("titleFallbackLanguage")).getLanguage()); MediaMetadata md = new MediaMetadata(TmdbMetadataProvider.providerInfo.getId());
MediaMetadata md = new MediaMetadata(providerInfo.getId());
MediaMetadata getMovieMetadata(MediaScrapeOptions options) throws Exception { MediaMetadata md = new MediaMetadata(providerInfo.getId());
MediaMetadata md = new MediaMetadata(providerInfo.getId());
MediaMetadata md = new MediaMetadata(providerInfo.getId());
MediaMetadata scrape(MediaScrapeOptions options) throws Exception { LOGGER.debug("getMetadata() " + options.toString()); MediaMetadata md = new MediaMetadata(TraktMetadataProvider.providerInfo.getId());
private MediaMetadata getTvShowMetadata(MediaScrapeOptions options) throws Exception { LOGGER.debug("getTvShowMetadata() " + options.toString()); MediaMetadata md = new MediaMetadata(TraktMetadataProvider.providerInfo.getId());