Index: /main/trunk/greenstone2/perllib/plugins/MediainfoOGVPlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/MediainfoOGVPlugin.pm	(revision 22363)
+++ /main/trunk/greenstone2/perllib/plugins/MediainfoOGVPlugin.pm	(revision 22364)
@@ -139,40 +139,35 @@
 
     # Retrieve the file metadata
-
-    my $command = "mediainfo --inform=\"General;%Duration/String2%|%Duration%|%FileSize/String2%|%Performer%|%Title%|%Recorded_Date%|%Recorded/Location%|%Producer%|%Copyright%|%Publisher%\" \"$filename_full_path\"";
+    my $command = "mediainfo --inform=\"General;%Duration/String2%|%Duration%|%FileSize/String2%|%Performer%|%Title%|%Recorded_Date%|%Recorded/Location%|%Producer%|%Copyright%|%LICENSE%|%Publisher%\" \"$filename_full_path\"";
     print $outhandle "$command\n" if ($verbosity > 2);
 
     # execute the mediainfo command and store the output of execution in $videodata
     # my $video_metadata = `$command`; # backticks operator way
-    # Another way to execute the command: better experience with this than
-with backticks operator above:
-    # use open() to read the output of executing the command (which is
-piped through to a handle using the | operator)
+    # Another way to execute the command: better experience with this than with backticks operator above:
+    # use open() to read the output of executing the command (which is piped through to a handle using the | operator)
     my $video_metadata;
     if (open(VMIN,"$command|")) {
         my $line;
 
-    # we read a line of output at a time
+	# we read a line of output at a time
         while (defined ($line=<VMIN>)) {
-            #print STDERR "***** line = $line\n";
-
-            $video_metadata .= $line;
+        	#print STDERR "***** line = $line\n";
+
+	        $video_metadata .= $line;
         }
 
         close(VMIN);
-    } 
+    }
 
     print $outhandle "$video_metadata\n" if ($verbosity > 2);
 
     # There are 10 fields separated by |, split these into ordered, individual-named variables
-    my ($formattedduration,$duration,$mfilesize,$artist,$title,$date,$location,$organization,$copyright,$contact) = split(/\|/,$video_metadata);
-    $duration = int($duration/1000);
-    $artist =~ s/\\047/\'/g; # Perl's way of doing: $artist = `echo $artist | sed \"s/\\047/'/g\"`;
-    $title =~ s/\\047/\'/g; # $title = `echo $title | sed \"s/\\047/'/g\"`;
-
-    #print STDERR "**** RESULT = $formattedduration\n$duration\n$mfilesize\n$artist\n$title\n$date\n$location\n$organization\n$copyright\n$contact\n";
-    print $outhandle "RESULT = $formattedduration\n$duration\n$mfilesize\n$artist\n$title\n$date\n$location\n$organization\n$copyright\n$contact\n" if ($verbosity > 2);
+    my ($FormattedDuration,$Duration,$Filesize,$Artist,$Title,$Date,$Location,$Organization,$Copyright,$License,$Contact) = split(/\|/,$video_metadata);
+    $Duration = int($Duration/1000);
+    $Artist =~ s/\\047/\'/g; # Perl's way of doing: $artist = `echo $artist | sed \"s/\\047/'/g\"`;
+    $Title =~ s/\\047/\'/g; # $title = `echo $title | sed \"s/\\047/'/g\"`;
+
+    print $outhandle "RESULT = $FormattedDuration\n$Duration\n$Filesize\n$Artist\n$Title\n$Date\n$Location\n$Organization\n$Copyright\n$License\n$Contact\n" if ($verbosity > 2);
     
-
     # Add the file as an associated file ...
     my $section = $doc_obj->get_top_section();
@@ -190,6 +185,6 @@
     $doc_obj->add_utf8_metadata ($section, $assoc_field, $doc_obj->get_source()); # Source metadata is already in utf8
  
-    $doc_obj->add_metadata ($section, "FormattedDuration", $formattedduration);
-    $doc_obj->add_metadata ($section, "Duration", $duration);
+    $doc_obj->add_metadata ($section, "FormattedDuration", $FormattedDuration);
+    $doc_obj->add_metadata ($section, "Duration", $Duration);
  
     $doc_obj->add_metadata ($section, "srclink",
@@ -198,16 +193,21 @@
     $doc_obj->add_metadata ($section, "/srclink", "</a>");
 
-    $doc_obj->add_metadata($section,"mFileSize",$mfilesize);
-    $doc_obj->add_utf8_metadata($section,"dc.Creator",$artist);
-    $doc_obj->add_utf8_metadata($section,"Artist",$artist);
-    $doc_obj->add_utf8_metadata($section,"dc.Title",$title);
-    $doc_obj->add_utf8_metadata($section,"Title",$title);
-    $doc_obj->add_utf8_metadata($section,"dc.Date",$date);
-    $doc_obj->add_utf8_metadata($section,"Date",$date);
-    $doc_obj->add_utf8_metadata($section,"Location",$location);
-    $doc_obj->add_utf8_metadata($section,"dc.Publisher",$organization);
-    $doc_obj->add_utf8_metadata($section,"Organization",$organization);
-    $doc_obj->add_utf8_metadata($section,"Copyright",$copyright);
-    $doc_obj->add_utf8_metadata($section,"Contact",$contact);
+    $doc_obj->add_metadata($section,"FileSize",$Filesize);
+    $doc_obj->add_utf8_metadata($section,"dc.Creator",$Artist);
+    $doc_obj->add_utf8_metadata($section,"Artist",$Artist);
+    $doc_obj->add_utf8_metadata($section,"dc.Title",$Title);
+    $doc_obj->add_utf8_metadata($section,"Title",$Title);
+    $doc_obj->add_utf8_metadata($section,"dc.Date",$Date);
+    $doc_obj->add_utf8_metadata($section,"Date",$Date);
+    $doc_obj->add_utf8_metadata($section,"dc.Coverage",$Location);
+    $doc_obj->add_utf8_metadata($section,"Location",$Location);
+    $doc_obj->add_utf8_metadata($section,"dc.Publisher",$Organization);
+    $doc_obj->add_utf8_metadata($section,"Organization",$Organization);
+    $doc_obj->add_utf8_metadata($section,"dc.Rights",$Copyright);
+    $doc_obj->add_utf8_metadata($section,"Copyright",$Copyright);
+    $doc_obj->add_utf8_metadata($section,"dc.accessRights",$License);
+    $doc_obj->add_utf8_metadata($section,"License",$License);
+    $doc_obj->add_utf8_metadata($section,"dc.Contributor",$Contact);
+    $doc_obj->add_utf8_metadata($section,"Contact",$Contact);
  
     # we have no text - add dummy text and NoText metadata
