Difference between revisions of "ISDBDownloader::GetURLContentLength"

From MediaMonkey Wiki
Jump to: navigation, search
 
 
Line 1: Line 1:
{{MethodDeclaration|SDBDownloader|ISDBDownloader|Function GetURLContentLength( URL As String) As String}}
+
{{MethodDeclaration|SDBDownloader|ISDBDownloader|Function GetURLContentLength( URL As String) As Long}}
  
 
===Parameters===
 
===Parameters===
Line 9: Line 9:
 
===Method description===
 
===Method description===
  
Returns content length of the given URL.  
+
Returns content length of the given URL in bytes.  
  
 
Added in MediaMonkey 4.0
 
Added in MediaMonkey 4.0

Latest revision as of 09:21, 8 June 2010

CoClass SDBDownloader, Interface ISDBDownloader

Function GetURLContentLength( URL As String) As Long


Parameters

Name Type Description
URL String URL to find the content length for


Method description

Returns content length of the given URL in bytes.

Added in MediaMonkey 4.0

Example code

Option Explicit

Dim UI  : Set UI = SDB.UI

Sub OnStartUp()
    Dim mnuTest

    Set mnuTest = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    mnuTest.Caption = SDB.Localize("Get Content Length")
    mnuTest.OnClickFunc = "SDBOnClick"
    mnuTest.UseScript = Script.ScriptPath   
End Sub

Sub SDBOnClick(Item)   
  Dim ContentLength
  ContentLength = SDB.Downloader.GetURLContentLength("http://www.spiker.wz.cz/SecretStream.mp3")
  MsgBox( ContentLength)
End Sub