Extend local webserver to provide files from internal/external storage via directory structure#70
Extend local webserver to provide files from internal/external storage via directory structure#70stephanritscher wants to merge 6 commits intotrishika:masterfrom
Conversation
…e via directory structure
- Persist/restore last selected renderer device in ServiceController - Persist/restore last selected content directory device in ServiceController - Persist/restore last path per content directory device in ContentDirectoryFragment - Handle ACTION_SEND intents and play URI on last selected device in Main - Implement playOnNextSelectedRendererUri in UPnPServiceController - Implement launchUri in RendererCommand - Sort files alphabetically before servicing in DirectoryContainer
|
I just added another feature. DroidUPnP now stores the selected renderer and content directory (device and path) in the shared preferences so it can restore them after restarting the whole application. This was actually a preparation for the "Play with DroidUPnP" intent I added. It is meant to be a method to share a video URI to be played on the currently selected renderer. I implemented and tested this intent in combination with Firefox for Android. Whenever you have a native HTML5 player in Firefox, you can long click the player widget and use the share button from there. Select "Play with DroidUPnP" and DroidUPnP will start. Internally, theUPnP service is started and as soon as a renderer is selected (which by default will be the latest selected renderer), the playback of the renderer will be set to the shared video URI. Notes:
|
Hi there,
I extended the local webserver included in DroidUPnP to show a new folder "Directories" which includes all storage volumes (internal and external) and their directory trees recursively. The feature may be disabled in the settings.
Only media files and folders will be shown. File type detection will be based on content (default) or file extension (faster) which can be configured in the settings.
Another speed optimization would be to not count the number of directory entries (not implemented).
Currently only reduced meta data is provided (no length of audio/videos, resolution of pictures/videos).
Unfortunately I had to increase the API level to 24 which works for my devices, but might not be suitable for others. This was mostly due to recent extensions of the StorageManager API. I'm also not happy to use an inofficial API here (getPath). Alternatives could be
I tested with Kodi media center only.
Is anyone interested in merging this feature into the main branch?
Best regards,
Stephan Ritscher