Hi All,
I want to announce the availability of a new python test application for
media-service-upnp, located in its test sub-directory.
The application implements a Download Synchronization Controller as
described in the DLNA guidelines. For now, only the off-line mode is
managed and the LastChange notifications are not yet supported.
Basically, the application obtains a list of changes that occurred on
one or more media servers since the last synchronization and transfers
the relevant content from the server(s) to a local storage.
To start and use the Download Sync Controller do the following:
/$ ./dsc.sh//
//Running servers: //
//Regis's media Tracked(False)
uuid:fd4204a1-fdef-4eba-bc31-a96eccf089d1
/com/intel/MediaServiceUPnP/server/0 //
////
//"controller" instance is ready for use. //
//Type "help(DscController)" for more details and usage samples. //
//>>> /
The first thing to do is to add some servers to the tracked list:
/>>> controller.track('/com/intel/MediaServiceUPnP/server/0')//
//>>> controller.servers() //
//Running servers: //
//Regis's media Tracked(True)
uuid:fd4204a1-fdef-4eba-bc31-a96eccf089d1
/com/intel/MediaServiceUPnP/server/0 /
The list is persisted across sessions so that you don't have to add the
same servers each time the controller is launched.
Then perform your first synchronization:
/>>> controller.sync() //
//Syncing... //
////
//Server uuid:fd4204a1-fdef-4eba-bc31-a96eccf089d1 needs *full* sync: //
//Resetting local contents for server
uuid:fd4204a1-fdef-4eba-bc31-a96eccf089d1 //
//Syncing container Pictures... //
//Syncing container Videos... //
//Syncing container All... //
// New media "blob.png" tracked //
// Downloading contents from
"http://127.0.0.1:49321/Tracker/i/QWxsUGljdHVyZXMsdXJuOnV1aWQ6NDI3NzZjYWEtM2M1YS0zZjdlLThjMTgtODBhZDhlYjA1OGRm.png"
//
// into
"/home/rmerlino/download-sync-controller/uuid:fd4204a1-fdef-4eba-bc31-a96eccf089d1/0-blob.png"...
//
// New media "icon.png" tracked //
// Downloading contents from
"http://127.0.0.1:49321/Tracker/i/QWxsUGljdHVyZXMsdXJuOnV1aWQ6NDRjYjlmN2MtNDI5MS1hZmNmLWJkYjAtY2NkNjI2NDg0OTIx.png"
//
// into
"/home/rmerlino/download-sync-controller/uuid:fd4204a1-fdef-4eba-bc31-a96eccf089d1/1-icon.png"...
//
// New media "product_logo.png" tracked //
// Downloading contents from
"http://127.0.0.1:49321/Tracker/i/QWxsUGljdHVyZXMsdXJuOnV1aWQ6NGNiOTMzZTItNTI5ZS0yNmY2LWE5ZTAtNmJmOTVmNGYyNmE1.png"
//
// into
"/home/rmerlino/download-sync-controller/uuid:fd4204a1-fdef-4eba-bc31-a96eccf089d1/2-product_logo.png"...
//
// New media "product_logo_48a.png" tracked //
// Downloading contents from
"http://127.0.0.1:49321/Tracker/i/QWxsUGljdHVyZXMsdXJuOnV1aWQ6YjQ3YWU4MzQtMDU2Yi01YzdjLTA1MWMtY2UxYmExZmRlZjRi.png"
//
// into
"/home/rmerlino/download-sync-controller/uuid:fd4204a1-fdef-4eba-bc31-a96eccf089d1/3-product_logo_48a.png"...
//
//Syncing container Titles... //
//Syncing container Year... //
//Syncing container B... //
// New media "blob.png" tracked //
//Syncing container I... //
// New media "icon.png" tracked //
//Syncing container P... //
// New media "product_logo.png" tracked //
// New media "product_logo_48a.png" tracked //
//Syncing container 2012... //
// New media "blob.png" tracked //
// New media "icon.png" tracked //
// New media "product_logo.png" tracked //
// New media "product_logo_48a.png" tracked //
//Syncing container All... //
// New media "VIDEO0006.mp4" tracked //
// Downloading contents from
"http://127.0.0.1:49321/Tracker/i/QWxsVmlkZW9zLHVybjp1dWlkOjkzYjMwMmExLWVmODQtNGJmZi05YjM5LTQzZDBmMGFiMmI0Yg%3D%3D.mp4"
//
// into
"/home/rmerlino/download-sync-controller/uuid:fd4204a1-fdef-4eba-bc31-a96eccf089d1/4-VIDEO0006.mp4"...
//
//Syncing container Titles... //
//Syncing container Year... //
//Syncing container V... //
// New media "VIDEO0006.mp4" tracked //
//Syncing container 2012... //
// New media "VIDEO0006.mp4" tracked //
////
//Done. /
The controller discovers what changed on the servers (new files, deleted
files) and synchronizes the contents locally. The first synchronization
for a particular server is always a full synchronization.
To get more details on available commands, do the following:
/>>> help(controller)//
/
Enjoy!
Regis
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
Show replies by date