Bläddra i källkod

Better MP4 handling (though I still need to deal with tagging)

Zachary Kotlarek 9 år sedan
förälder
incheckning
e33893ceb9
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5 1
      rss.pl

+ 5 - 1
rss.pl

@@ -107,7 +107,7 @@ for my $entry ($feed->entries()) {
         if ($enc && ref($enc) eq 'HASH' && exists($enc->{'url'})) {
             $url = $enc->{'url'};
             if (exists($enc->{'type'})) {
-                if ($enc->{'type'} =~ /audio\/mp4/i) {
+                if ($enc->{'type'} =~ /audio\/mp4/i || $enc->{'type'} =~ /audio\/x-m4a/i) {
                     $ext = 'm4a';
                 } elsif ($enc->{'type'} =~ /audio\/mpeg/i) {
                     $ext = 'mp3';
@@ -360,6 +360,10 @@ foreach my $time (sort(@need)) {
             goto OUT;
         }
         $mp3->close();
+    } elsif ($ep->{'ext'} eq 'm4a') {
+        if ($DEBUG) {
+            print STDERR "MP4 munging not complete\n";
+        }
     } else {
         print STDERR 'Tag munging not available for ' . $ep->{'ext'} . ' files: ' . $file . "\n";
     }