POL_PCGamingWiki_Download

Informatie

Creator Bericht
med_freeman

Information

This installer has been approved by the team.

Informatie

Platforms:
Downloads: 7092
Wine: System

Feedbacks

Omschrijving

Download a file from http://pcgamingwiki.com in current folder
Parameters:
- 1: file relative url (i.e : 303-no-one-lives-forever-2-a-spy-in-harms-way-english-patch)

       since all files are under http://community.pcgamingwiki.com/files/download/     
- 2: result file name
- 3: download title

- 4: file md5 sum

Broncode

local URL="$1"
local FILE="$2"
local NAME="$3"
local SERVER_MD5="$4"
POL_System_wget "http://community.pcgamingwiki.com/files/download/$URL" "$NAME" -O "$FILE"
local LOCAL_MD5="$(POL_MD5_file "$FILE")"
if [ "$LOCAL_MD5" = "$SERVER_MD5" ]
    then
        POL_Debug_Message "Download MD5 matches"
    else
        POL_SetupWindow_question "$URL\n\n$(eval_gettext 'Error ! Files mismatch\n\nLocal : $LOCAL_MD5\nServer : $SERVER_MD5')\n\n$(eval_gettext 'Do you want to retry?')"
        if [ "$APP_ANSWER" = "TRUE" ]; then
                POL_PCGamingWiki_Download "$URL" "$FILE" "$NAME" "$SERVER_MD5"
        else
                POL_Debug_Error "MD5 sum mismatch !"
        fi
    fi

Contributions

Filters:

Contribute
Member Bericht
med_freeman Vrijdag 29 Mei 2015 om 17:56
med_freeman

Information

This update has been approved by the team.

Differences

@@ -0,0 +1,17 @@
+local URL="$1"
+local FILE="$2"
+local NAME="$3"
+local SERVER_MD5="$4"
+POL_System_wget "http://community.pcgamingwiki.com/files/download/$URL" "$NAME" -O "$FILE"
+local LOCAL_MD5="$(POL_MD5_file "$FILE")"
+if [ "$LOCAL_MD5" = "$SERVER_MD5" ]
+    then
+        POL_Debug_Message "Download MD5 matches"
+    else
+        POL_SetupWindow_question "$URL\n\n$(eval_gettext 'Error ! Files mismatch\n\nLocal : $LOCAL_MD5\nServer : $SERVER_MD5')\n\n$(eval_gettext 'Do you want to retry?')"
+        if [ "$APP_ANSWER" = "TRUE" ]; then
+                POL_PCGamingWiki_Download "$URL" "$FILE" "$NAME" "$SERVER_MD5"
+        else
+                POL_Debug_Error "MD5 sum mismatch !"
+        fi
+    fi
\ No newline at end of file

New source code

local URL="$1"
local FILE="$2"
local NAME="$3"
local SERVER_MD5="$4"
POL_System_wget "http://community.pcgamingwiki.com/files/download/$URL" "$NAME" -O "$FILE"
local LOCAL_MD5="$(POL_MD5_file "$FILE")"
if [ "$LOCAL_MD5" = "$SERVER_MD5" ]
    then
        POL_Debug_Message "Download MD5 matches"
    else
        POL_SetupWindow_question "$URL\n\n$(eval_gettext 'Error ! Files mismatch\n\nLocal : $LOCAL_MD5\nServer : $SERVER_MD5')\n\n$(eval_gettext 'Do you want to retry?')"
        if [ "$APP_ANSWER" = "TRUE" ]; then
                POL_PCGamingWiki_Download "$URL" "$FILE" "$NAME" "$SERVER_MD5"
        else
                POL_Debug_Error "MD5 sum mismatch !"
        fi
    fi

Antwoorden

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com