GNOME Bugzilla – Bug 660885
Cannot upload anything if there is no shared media
Last modified: 2013-04-08 14:37:11 UTC
Precondition: Rygel up and running. Rygel is sharing some media files. Steps to reproduce: 1. Remove all shared media. 2. Try to upload something. Actual results: After removing media all containers will be deleted also. Client displays error id 500 on upload action. In rygel debug log i.e. following message can be found "Failed to create item under 'DLNA.ORG_AnyContainer':object.item.audioItem.musicTrack' UPnP class unsupported" After restarting rygel, it cannot be found in network anymore which also breaks upload. Expected: Upload should be successful. After starting rygel without shared content it should be possible to preform successful upload.
Created attachment 201123 [details] [review] Extend containers for add item in empty container patch
Created attachment 201124 [details] [review] Fix bug with add media item to empty container patch
Review of attachment 201123 [details] [review]: First, I don't think that there should be a special handling for empty children in the MediaContainer class. That is a speciality of SimpleContainer. Second, please stick to https://live.gnome.org/Rygel/CodingStyle Third: It doesn't work in the following scenario: - Sharing of all media is enabled - Only one Picture is available - Try to upload music to the server → 'object.item.audioItem.musicTrack' UPnP class unsupported ::: src/rygel/rygel-media-container.vala @@ +49,2 @@ public int child_count; + public int empty_child_count; And why do you declare that here if you exclusively use it in SimpleContainer? @@ +141,3 @@ + * return the found media object. + */ + public async abstract MediaObject? find_object_in_all_container (string id, Despite the fact that I'm not convinced that this should go in here, it should not have been abstract but provided a default implementation with another one in SearchableContainer doing an actual search.
Created attachment 203070 [details] [review] Extend containers for add item in empty container. Fixed version
Created attachment 203071 [details] [review] Fix bug with add media item to empty container patch. Fixed version I can't reproduce bug, that you have noticed. Can you check this again?
(In reply to comment #5) > Created an attachment (id=203071) [details] [review] > Fix bug with add media item to empty container patch. Fixed version > > I can't reproduce bug, that you have noticed. Can you check this again? I think the issue is that my upload tool uses ImportResource instead of HTTP POST. What I get now is: (rygel:1662): Rygel-WARNING **: Failed to get original URI for 'http://192.168.34.146:1234/Tracker/i/QWxsUGljdHVyZXMsdXJuOnV1aWQ6ZWI0ZWQwNDEtMzM4Zi05ZThjLTY0ZTItYzgwYWFhMDY3NmE4': URI 'http://192.168.34.146:1234/Tracker/i/QWxsUGljdHVyZXMsdXJuOnV1aWQ6ZWI0ZWQwNDEtMzM4Zi05ZThjLTY0ZTItYzgwYWFhMDY3NmE4' invalid for importing contents to It seems that the patch is missing the modification for the ImportResource case. Also, can you please move the default implementation into the SimpleContainer interface instead of copying it in every subclass. You can have implementations in GObject interfaces.
(In reply to comment #6) > Also, can you please move the default implementation into the SimpleContainer > interface instead of copying it in every subclass. You can have implementations > in GObject interfaces. Er SimpleContainer is of course an object, not an interface. but the comment still holds ;)
Created attachment 208554 [details] [review] Updated version from Marcin
Created attachment 240933 [details] [review] media-export: Don't hide empty folders Unbreak synchronisation and fix MediaExport's part of 660885