]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/commitdiff
Fix filenames for Pornhd videos.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 19 Nov 2013 15:48:02 +0000 (10:48 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 19 Nov 2013 15:48:02 +0000 (10:48 -0500)
lib/whatever-dl/websites/pornhd.rb

index b6f985ac1340662330d5a28d7caf71725cdf4743..b841f5ad7607b51ad0fd7737793ce10f535cb15c 100644 (file)
@@ -34,6 +34,11 @@ class Pornhd < Website
     return CGI::unescape(video_url)
   end
 
+  def get_video_filename()
+    # Use whatever comes after the final frontslash in the main URL,
+    # not the video URL. Assume it's an FLV.
+    filename = @url.split('/').pop() + '.flv'
+  end
 
   protected;
 
@@ -51,5 +56,4 @@ class Pornhd < Website
     return matches[1]
   end
 
-
 end