intel / dleyna-renderer

dleyna-renderer is a library for implementing services that allow clients to discover and manipulate Digital Media Renderers. An implementation of such a service for linux is also included
https://01.org/dleyna/
GNU Lesser General Public License v2.1
16 stars 19 forks source link

A file uploaded is restricted #60

Closed cprigent closed 11 years ago

cprigent commented 11 years ago

Setup:

::: SYSTEM Description: Ubuntu 12.10 Codename: quantal Distributor ID: Ubuntu Release: 12.10 Mozilla Firefox 18.0.2

::: PACKAGES LIST gssdp-1.0 v0.14.2 gupnp-1.0 v0.20.2 gupnp-av-1.0 v0.12.1 gupnp-dlna-2.0 v0.10.0 dleyna-core-1.0 v0.0.2 dleyna-renderer-1.0 v0.0.2 dleyna-server-1.0 v0.0.2 dleyna-server-service-1.0 v0.0.2 dleyna-renderer-service-1.0 v0.0.2 Cloudeebus version 0.3.1

::: REPOSITORIES

1 Use cloud-dleyna to upload "Kelibia.jpg" to Golden DMS as "KelibiaUploaded" 2 From media console execute command: root.search('Type derivedfrom "image"', 0, 90, ["DisplayName","Path", "URLs","Restricted"], "-DisplayName") 3 Check the restricted property of the file uploaded

Actual result:

3 In fact I see 3 "KelibiaUploaded" with restricted set to 0 or 1

Expected result

3 Restricted should be set to 0

Info

The problem is you can't remove the file. Cloud-dleyna displays: "Destroy Object operation failed: Restricted object (DestroyObject)"

cprigent commented 11 years ago

Log from media console:

root.search('Type derivedfrom "image"', 0, 90, ["DisplayName","Path", "URLs","Restricted"], "-DisplayName")
....
....
{
    "DisplayName": "KelibiaUploaded", 
    "Path": "/com/intel/MediaServiceUPnP/server/22/6d616c2f492f414d322f323635", 
    "Restricted": 1, 
    "URLs": [
        "http://192.168.2.105:53346/fitj/no/mal/I/AM2/265.jpg"
    ]
}

{
    "DisplayName": "KelibiaUploaded", 
    "Path": "/com/intel/MediaServiceUPnP/server/22/6d616c2f492f414c31332f323635", 
    "Restricted": 1, 
    "URLs": [
        "http://192.168.2.105:53346/fitj/no/mal/I/AL13/265.jpg"
    ]
}

{
    "DisplayName": "KelibiaUploaded", 
    "Path": "/com/intel/MediaServiceUPnP/server/22/6d616c2f492f4d5931342f323635", 
    "Restricted": 0, 
    "URLs": [
        "http://192.168.2.105:53346/fitj/no/mal/I/MY14/265.jpg"
    ]
}
markdryan commented 11 years ago

Hi Christophe,

I think this should be a bug for dLeyna-server shouldn't it? Also I'm not sure it's a bug. Golden DMS seems to maintain multiple references to the files it publishes so that the file is duplicated in multiple folders. My guess is that you can delete the original file but not the references, hence the different values for restricted.

So what you want to do is to search for the original file and to exlude the references. You can do this by modifying the search string.

'Type derivedfrom "image" and RefPath exists false'

I think this is correct. I haven't got my development machine with me so I can't test. If it doesn't work check with Ludo.

Hopefully you will only see one file with restricted set to 0.

markdryan commented 11 years ago

You might need brackets

'(Type derivedfrom "image") and (RefPath exists false)'

Try both. One should work.