PUMP ADVANCED DOWNLOAD PROTOCOL

1. Overview of the download process

This protocol is operated to provide a direct way to send and manage download requests to Pump.

The download process is initiated on the web portal and then managed by the software. The communication between the web portal and the software is the following:

  • When the user clicks on a download button (or link) on the portal, it initiates the download of the video in the software. This hyperlink uses the VIPeers URL protocol (i.e. hyperlinks are “vipeers://data” ).
  • This VIPeers URL navigation opens the software and passes the required parameters including the video HTTP URL.
  • The software adds the video to the library and starts the download of the video file

2. Parameters

The metadata to be transmitted to the software are:

Field Name Type Comments
mode string Must be equal to “download” for video and audio content download. Used by the software to differentiate which VIPeers protocol link is.
sessionId string Session ID to be able to retrieve data from user’s session

All parameters contained in the VIPeers URL have to be escaped as described in RFC 1738 part 2.2. http://www.ietf.org/rfc/rfc1738.txt

3. VIPeers link Sample

vipeers://www.service.com/?mode=download&sessionId=123456

4. Request Software -> Server (step 2)

a) Overview

The request is done by invoking a static URL (see >appendix).

sessionId is retrieved from Step 1.

b) Sample

from :

vipeers://service.com/index.php?mode=download&sessionId=123456

The software will execute the following request:

http://service.com/requestTrackslist.php?sessionId=123456

5. Response Server -> Software

The response is an XML file which has the following structure:

<downloadresponse version=”2.0”>
<product id=”123” content=”audio”>
product>
<product id=”456” content=”video”>
product>
<product id=”46” content=”podcast”>
product>
product id=”45” content=”torrent”>
product>
downloadresponse>

The “version” attribute of the downloadResponse tag will be used to manage future evolutions of this specification.

The “content” attribute describes the way metadata are structured.

Contents enumeration:

  • audio
  • video
  • torrent
  • podmail

a) Metadata list for a standard video

Field Name Type Comments
mode String Equal to ‘download’ or ‘streaming’
title String Title of the movie
author String Director’s name
duration Integer In seconds
posterurl HTTP URL The http location of the file that contains the movie artwork (e.g. http://software.vodoo.cvf.fr/app/michel_vaillant.jpg)
mediaurl HTTP URL The http or mms location of the file that contains the movie itself (e.g. http://software.vodoo.cvf.fr/app/michel_vaillant.wmv)

b) Metadata list for a standard audio

Field Name Type Comments
mode String Equal to ‘download’ or ‘streaming’
title String Title of the music
author String Artist’s name
duration Integer In seconds
posterurl HTTP URL The http location of the file that contains the cover artwork
mediaurl HTTP URL The http or mms location of the file that contains the track itself

c) Metadata list for a standard podcast

Field Name Type Comments
mode String Equal to ‘download
title String Title of the podcast
mediaurl HTTP URL The http or mms location of the file that contains the podcast itself

d) Metadata list for a standard torrent

Field Name Type Comments
mode String Equal to ‘download
title String Title of the torrent
mediaurl HTTP URL The http or mms location of the file that contains the torrent itself

e) Metadata list for a standard podmail

Field Name Type Comments
mode String Equal to ‘download
title String Title of the podmail
mediaurl HTTP URL The http or mms location of the file that contains the podmail itself

f) Success Response Sample

<downloadresponse version=”2.0”>
<product id=”123” content=”audio”>
<mode>downloadmode>
<returncode>OKreturncode>
<comment>successcomment>
<title>So High Cooltitle>
<author>David Lynchauthor>
<duration>456duration>
<mediaurl>http://vod.com/sohighcool.wmvmediaurl>
<posterurl>http://vod.com/posterSHC.jpegposterurl>
product>
<product id=”124” content=”video”>
<mode>downloadmode>
<returncode>OKreturncode>
<comment>successcomment>
<title>So Low Cooltitle>
<author>Steven Spielbergauthor>
<duration>546duration>
<mediaurl>http://vod.com/solowcool.wmvmediaurl>
<posterurl>http://vod.com/posterSLC.jpegposterurl>
product>
downloadresponse>

g) Failure response

The software will choose the correct sentence to display depending on the Software UI language.

Global error (wrong ordered for instance ): HTTP 400 or 503 response codes

<downloadresponse version=”2.0”>
<errorMessage id=”653”>
Error: service not available
errorMessage>
downloadresponse>

Local productId error (one movie is not anymore in the database for instance): HTTP 200 response code

<downloadresponse version=”2.0”>
<product id=”123” content=”audio”>
<mode>downloadmode>
<returncode>OKreturncode>
<comment>successcomment>
...
product>
<product id=”124” content=”video”>
<mode>downloadmode>
<returncode>KOreturncode>
<errorMessage id=”721”>
Error: The Eye of the Tiger no longer exists
errorMessage>
product>
downloadresponse>

Error codes list

The error codes list need to be defined.

Discover PUMP

PUMP = the software for all your videos with search, download, play, share, convert, sync on mobile...

VIPeers blog categories