コード例 #1
0
 public VideoThumbnailer()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Video thumbnail extractor", MetadataExtractorPriority.Extended, true,
       MEDIA_CATEGORIES, new[]
           {
             ThumbnailLargeAspect.Metadata
           });
 }
コード例 #2
0
 public BluRayMetadataExtractor()
 {
     _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "BluRay metadata extractor", true,
       SHARE_CATEGORIES, new[]
       {
         MediaAspect.Metadata,
         VideoAspect.Metadata
       });
 }
コード例 #3
0
 public BluRayMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "BluRay metadata extractor", MetadataExtractorPriority.Core, false,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             VideoAspect.Metadata
           });
 }
コード例 #4
0
 public SeriesMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Series metadata extractor", MetadataExtractorPriority.External, true,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             SeriesAspect.Metadata
           });
 }
コード例 #5
0
 public BassAudioMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Bass Audio metadata extractor", MetadataExtractorPriority.Core, false,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             AudioAspect.Metadata,
             ThumbnailLargeAspect.Metadata
           });
   _lib = BassLibraryManager.Get();
 }
コード例 #6
0
 public MovieMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Movies metadata extractor", MetadataExtractorPriority.External, true,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             VideoAspect.Metadata,
             MovieAspect.Metadata
           });
   _onlyFanArt = ServiceRegistration.Get<ISettingsManager>().Load<MovieMetadataExtractorSettings>().OnlyFanArt;
 }
コード例 #7
0
    /// <summary>
    /// Instantiates a new <see cref="NfoMovieMetadataExtractor"/> object
    /// </summary>
    public NfoMovieMetadataExtractor()
    {
      // The metadataExtractorPriority is intentionally set wrong to "Extended" although, depending on the
      // content of the nfo-file, it may download thumbs from the internet (and should therefore be
      // "External"). This is a temporary workaround for performance purposes. It ensures that this 
      // MetadataExtractor is applied before the VideoThumbnailer (which is intentionally set to "External"
      // although it only uses local files). Creating thumbs with the VideoThumbnailer takes much longer
      // than downloading them from the internet.
      // ToDo: Correct this once we have a better priority system
      _metadata = new MetadataExtractorMetadata(
        metadataExtractorId: METADATAEXTRACTOR_ID,
        name: "Nfo movie metadata extractor",
        metadataExtractorPriority: MetadataExtractorPriority.Extended,
        processesNonFiles: true,
        shareCategories: MEDIA_CATEGORIES,
        extractedAspectTypes: new[]
        {
          MediaAspect.Metadata,
          VideoAspect.Metadata,
          MovieAspect.Metadata,
          ThumbnailLargeAspect.Metadata
        });

      _settings = ServiceRegistration.Get<ISettingsManager>().Load<NfoMovieMetadataExtractorSettings>();

      // The following save operation makes sure that in any case an xml-file is written for the NfoMovieMetadataExtractorSettings
      // ToDo: Remove this once the SettingsManager does this automatically
      ServiceRegistration.Get<ISettingsManager>().Save(_settings);

      if (_settings.EnableDebugLogging)
      {
        _debugLogger = FileLogger.CreateFileLogger(ServiceRegistration.Get<IPathManager>().GetPath(@"<LOG>\NfoMovieMetadataExtractorDebug.log"), LogLevel.Debug, false, true);
        LogSettings();
      }
      else
        _debugLogger = new NoLogger();

      var handler = new HttpClientHandler();
      if (handler.SupportsAutomaticDecompression)
        // This enables the automatic decompression of the content. It does not automatically send an "Accept-Encoding" header!
        // We therefore have to add the Accept-Encoding header(s) manually below.
        // Additionally, due to the automatic decompression, HttpResponseMessage.Content.Headers DOES NOT contain
        // a "Content-Encoding" header anymore when we try to access it. It is automatically removed when decompressing.
        handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
      else
        _debugLogger.Warn("HttpClient does not support compression");
      _httpClient = new HttpClient(handler);
      _httpClient.DefaultRequestHeaders.AcceptEncoding.Add(new System.Net.Http.Headers.StringWithQualityHeaderValue("gzip"));
      _httpClient.DefaultRequestHeaders.AcceptEncoding.Add(new System.Net.Http.Headers.StringWithQualityHeaderValue("deflate"));
    }
コード例 #8
0
 public Tve3RecordingMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "TVEngine3 recordings metadata extractor", MetadataExtractorPriority.Extended, false,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             VideoAspect.Metadata,
             RecordingAspect.Metadata,
             SeriesAspect.Metadata
           });
 }
コード例 #9
0
 public ImageMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Image metadata extractor", MetadataExtractorPriority.Core, true,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             ImageAspect.Metadata
           });
 }
コード例 #10
0
 public VideoMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Video metadata extractor", MetadataExtractorPriority.Core, true,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             VideoAspect.Metadata,
             ThumbnailLargeAspect.Metadata
           });
 }
コード例 #11
0
 public AudioMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Audio metadata extractor", MetadataExtractorPriority.Core, false,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             AudioAspect.Metadata
           });
 }
コード例 #12
0
 public VideoThumbnailer()
 {
   // The metadataExtractorPriority is intentionally set wrong to "External" although
   // this MetadataExtractor does not download anything from the internet (and should therefore be
   // "Extended"). This is a temporary workaround for performance purposes. It ensures that this 
   // MetadataExtractor is applied after in particular the NfoMetadataExtractors (which are
   // intentionally set to "Extended" although they may download images from the internet).
   // Creating thumbs with this MetadataExtractor takes much longer than downloading them from the internet.
   // This MetadataExtractor only creates thumbs if the ThumbnailLargeAspect has not been filled before.
   // ToDo: Correct this once we have a better priority system
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Video thumbnail extractor", MetadataExtractorPriority.External, true,
       MEDIA_CATEGORIES, new[]
           {
             ThumbnailLargeAspect.Metadata
           });
 }
コード例 #13
0
 public ArgusRecordingSeriesMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Argus recordings series metadata extractor", MetadataExtractorPriority.Extended, false,
     SERIES_MEDIA_CATEGORIES, new[] { SeriesAspect.Metadata });
 }
コード例 #14
0
 public ArgusRecordingMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Argus recordings metadata extractor", MetadataExtractorPriority.Extended, false,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             VideoAspect.Metadata,
             RecordingAspect.Metadata,
           });
 }
コード例 #15
0
 public MovieMetadataExtractor()
 {
   _metadata = new MetadataExtractorMetadata(METADATAEXTRACTOR_ID, "Movies metadata extractor", MetadataExtractorPriority.External, true,
       MEDIA_CATEGORIES, new[]
           {
             MediaAspect.Metadata,
             VideoAspect.Metadata,
             MovieAspect.Metadata
           });
 }