Youtube: Add video format info to metadata
authorRalf Ertzinger <ralf@skytale.net>
Wed, 7 Dec 2011 19:42:20 +0000 (20:42 +0100)
committerRalf Ertzinger <ralf@skytale.net>
Wed, 7 Dec 2011 19:42:20 +0000 (20:42 +0100)
videosite/YouTubeGrabber.pm

index 8079f9f..d0455f9 100644 (file)
@@ -517,6 +517,11 @@ sub __pick_url {
         if (exists($urls->{$_})) {
             $self->debug("Selected URL with quality level %s", $_);
             $metadata->{'DLURL'} = $urls->{$_};
+            if (exists($videoformats{$_})) {
+                $metadata->{'FORMAT'} = $videoformats{$_};
+            } else {
+                $metadata->{'FORMAT'} = 'unknown';
+            }
             last;
         }
     }