George S. Baugh 5 년 전
부모
커밋
da6f67faba
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      lib/Trog/DataModule.pm

+ 10 - 0
lib/Trog/DataModule.pm

@@ -92,6 +92,16 @@ sub _fixup ($self, @filtered) {
     @filtered = _add_media_type(@filtered);
     # Finally, add visibility
     @filtered = _add_visibility(@filtered);
+
+    #urlencode spaces in filenames
+    @filtered = map {
+        foreach my $param (qw{href preview video_href audio_href local_href wallpaper}) {
+            next unless exists $_->{$param};
+            $_->{$param} =~ s/ /%20/g;
+        }
+        $_
+    } @filtered;
+
     return @filtered;
 }