After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689517 - (Playlist_URI) Item's placeholder status not unset after uploading
(Playlist_URI)
Item's placeholder status not unset after uploading
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: MediaExport plugin
git master
Other Linux
: Normal normal
: ---
Assigned To: Jens Georg
rygel-maint
: Playlist (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-12-03 09:45 UTC by Ludovic Ferrandis
Modified: 2012-12-11 10:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
DIDL of the Playlist Item (875 bytes, text/xml)
2012-12-03 15:37 UTC, Ludovic Ferrandis
  Details
DIDL_S (1.43 KB, text/xml)
2012-12-03 15:37 UTC, Ludovic Ferrandis
  Details
media-export: Handle text/plain (2.32 KB, patch)
2012-12-03 19:32 UTC, Jens Georg
none Details | Review
Set items to 'restricted' in MediaCollection (3.87 KB, patch)
2012-12-05 10:05 UTC, Jens Georg
none Details | Review

Description Ludovic Ferrandis 2012-12-03 09:45:49 UTC
After creating a Playlist and uploading the DIDL_S file, there is not URI property in the object that allow to download the DIDL_S.

More over, the ImportURI property is still present.
Comment 1 Mark Ryan 2012-12-03 09:54:01 UTC
Just a quick comment.

The fact that the ImportURI property is still present after the upload isn't in itself a problem.  DMSs are allowed to reatin this property after the file has been uploaded to allow clients to update the file at a future date.  However, the URI should be present after a successful upload as you mention.
Comment 2 Jens Georg 2012-12-03 10:01:54 UTC
which version are you testing, this should be fixed with 6cf1e9
Comment 3 Ludovic Ferrandis 2012-12-03 11:29:55 UTC
I found the bug with last Friday version.
I also test it this morning, same issue.
I will recompile Rygel and tell you the result.
Comment 4 Jens Georg 2012-12-03 11:58:41 UTC
Hrm, Friday should have that commit. What are you using for upload, ImportResource or POST?
Comment 5 Jens Georg 2012-12-03 12:36:41 UTC
*** Bug 689511 has been marked as a duplicate of this bug. ***
Comment 6 Ludovic Ferrandis 2012-12-03 13:07:05 UTC
(In reply to comment #4)
> Hrm, Friday should have that commit. What are you using for upload,
> ImportResource or POST?

I use POST
Comment 7 Jens Georg 2012-12-03 15:21:45 UTC
Hm. Works here. Is it possible to attach the playlist here?
Comment 8 Ludovic Ferrandis 2012-12-03 15:37:20 UTC
Created attachment 230537 [details]
DIDL of the Playlist Item
Comment 9 Ludovic Ferrandis 2012-12-03 15:37:45 UTC
Created attachment 230538 [details]
DIDL_S
Comment 10 Jens Georg 2012-12-03 16:16:57 UTC
Found the problem. If the file is created without ".xml" extension, GIO reports its content-type as text/plain and media-export does not harvest it.
Comment 11 Ludovic Ferrandis 2012-12-03 16:33:04 UTC
(In reply to comment #10)
> Found the problem. If the file is created without ".xml" extension, GIO reports
> its content-type as text/plain and media-export does not harvest it.

I've created a playlist using .xml extension

->MediaExport-Message: 'file:///home/lferrandis/Music/fa4ee574-e3e0-42fc-b1d9-da7a0da780ac-Test3.xml' harvested

The URI still not exist and delete still not delete the file.
Comment 12 Jens Georg 2012-12-03 16:49:32 UTC
ok, so we have a two-part problem, investigating.
Comment 13 Jens Georg 2012-12-03 17:53:45 UTC
Second part is that the parsing of the playlist fails since the items don't have a "restricted" attribute.

The question is: should gupnp_media_collection_add_item already set that (and to what, TRUE or FALSE) or is this the task of the application?

DLNA mandates the presence of restricted.
Comment 14 Jens Georg 2012-12-03 19:32:18 UTC
Created attachment 230568 [details] [review]
media-export: Handle text/plain

DIDL_S playlists don't need to start with <?xml, so if a client does not
upload a playlist file with a .xml extenstion, shared-mime-info maps this to
text/plain, so we try those as well.
Comment 15 Ludovic Ferrandis 2012-12-04 08:59:59 UTC
(In reply to comment #13)
> Second part is that the parsing of the playlist fails since the items don't
> have a "restricted" attribute.
> 
> The question is: should gupnp_media_collection_add_item already set that (and
> to what, TRUE or FALSE) or is this the task of the application?
> 
> DLNA mandates the presence of restricted.

I set it on the playlist item, not on each item of the playlist.
I take example on test-media-collection.c, where protected was not set for each item.

I don't think gupnp_media_collection_add_item already add this property.
If it's mandatory, maybe it will be safer if this API set this property instead of the application.
Comment 16 Jens Georg 2012-12-05 10:05:46 UTC
Created attachment 230744 [details] [review]
Set items to 'restricted' in MediaCollection
Comment 17 Jens Georg 2012-12-11 10:29:04 UTC
Forgot to bz push. This is on master now in both projects.