WebDAV support (1 Viewer)

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,972
    Nuenen
    Home Country
    Netherlands Netherlands
    I have added support for WebDAV in onlinevideos.
    To use it, make sure you have one of the sites from me in your list of sites (so you will get my newest dll).

    To add your (friends) server, simply go to the MediaPortal Configuration tool, select OnlineVideos and click Config.
    Then go to the "Sites" tab, and click the green + (Add a new site).
    Give the site a name (at "Site Name"), and below that at "Site Util" select "WebDAV"
    Click "Save", select the site in the list, and fill in the credentials (basePath, userName and password).
    Go back to "General", click "Save" and your done!
     

    mduller

    Portal Member
    July 19, 2023
    5
    1
    Home Country
    United States of America United States of America
    I am trying to use the WebDAV feature with my Nextcloud. However, there is an issue in how OnlineVideos assembles the request for subfolders:

    Code:
    # base path configured: https://mynextcloudhost.com/remote.php/dav/files/media
    
    # initial request to list top level folder         --> OK
    xxx.xxx.xxx.xxx - - [18/Jul/2023:16:23:17 -0700] "PROPFIND /remote.php/dav/files/media HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [18/Jul/2023:16:23:17 -0700] "PROPFIND /remote.php/dav/files/media HTTP/1.0" 207 242
    
    # request to list contents of subfolder "Media"    --> fails
    xxx.xxx.xxx.xxx - - [18/Jul/2023:16:23:20 -0700] "PROPFIND /remote.php/dav/files/media/remote.php/dav/files/media/Media/ HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [18/Jul/2023:16:23:20 -0700] "PROPFIND /remote.php/dav/files/media/remote.php/dav/files/media/Media/ HTTP/1.0" 404 240

    It appears that the whole path after the hostname is appended again to the basename, even the part that is already in the basename.
    I have tried with and without trailing slashes, different accounts, omitting the path (does not work - /remote.php/dav/files/USERNAME is the mandatory base path for Nextcloud's WebDAV support).

    Is there an option or setting that I am missing?
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,972
    Nuenen
    Home Country
    Netherlands Netherlands
    Fixed it.
    Not really sure if it's going to be picked up automatically by onlinevideos though.
    Let me know if it works out!
     

    mduller

    Portal Member
    July 19, 2023
    5
    1
    Home Country
    United States of America United States of America
    Thanks @doskabouter.
    What is the best way for me to get your changes? I assume replacing the DDL should be sufficient for a test?
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,972
    Nuenen
    Home Country
    Netherlands Netherlands
    not quite sure tbh. it could be that onlinevideos automatically picks up the changes.
    Can you check Manage sites in onlinevideos and see if your webdav site is at the top (with a date of today)?
     

    mduller

    Portal Member
    July 19, 2023
    5
    1
    Home Country
    United States of America United States of America
    @doskabouter, refreshing the sites pulled in your updated OnlineVideos.Sites.doskabouter.dll, which now is able to browse the folders. Also folders with spaces in them are no problem for browsing but playing a file does not work as the spaces in the path are not handled correctly. This applies to spaces in folders and files:

    Folder with spaces:

    Code:
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:27 -0700] "PROPFIND /remote.php/dav/files/doskabouter HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:28 -0700] "PROPFIND /remote.php/dav/files/doskabouter HTTP/1.0" 207 336
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:34 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/ HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:34 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/ HTTP/1.0" 207 283
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:36 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/I%20am%20a%20subfolder%20with%20spaces%20in%20its%20name/ HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:36 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/I%20am%20a%20subfolder%20with%20spaces%20in%20its%20name/ HTTP/1.0" 207 319
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:36 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/I%20am%20a%20subfolder%20with%20spaces%20in%20its%20name/ HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:36 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/I%20am%20a%20subfolder%20with%20spaces%20in%20its%20name/ HTTP/1.0" 207 319
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:49 -0700] "GET /remote.php/dav/files/doskabouter/Videos/I am" 400 226
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:49 -0700] "GET /remote.php/dav/files/doskabouter/Videos/I am" 400 226
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:49 -0700] "GET /remote.php/dav/files/doskabouter/Videos/I am" 400 226
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:50 -0700] "GET /remote.php/dav/files/doskabouter/Videos/I am" 400 226
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:31:50 -0700] "GET /remote.php/dav/files/doskabouter/Videos/I am" 400 226
    [... line above is repeated until playback is stopped ...]

    File with spaces:

    Code:
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:25 -0700] "PROPFIND /remote.php/dav/files/doskabouter HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:25 -0700] "PROPFIND /remote.php/dav/files/doskabouter HTTP/1.0" 207 336
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:33 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/ HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:33 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/ HTTP/1.0" 207 283
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:36 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/Subfolder/ HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:36 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/Subfolder/ HTTP/1.0" 207 291
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:37 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/Subfolder/ HTTP/1.0" 401 557
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:37 -0700] "PROPFIND /remote.php/dav/files/doskabouter/Videos/Subfolder/ HTTP/1.0" 207 291
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:45 -0700] "GET /remote.php/dav/files/doskabouter/Videos/Subfolder/Parmesannudeln werden" 400 226
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:45 -0700] "GET /remote.php/dav/files/doskabouter/Videos/Subfolder/Parmesannudeln werden" 400 226
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:45 -0700] "GET /remote.php/dav/files/doskabouter/Videos/Subfolder/Parmesannudeln werden" 400 226
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:45 -0700] "GET /remote.php/dav/files/doskabouter/Videos/Subfolder/Parmesannudeln werden" 400 226
    xxx.xxx.xxx.xxx - - [20/Jul/2023:18:36:45 -0700] "GET /remote.php/dav/files/doskabouter/Videos/Subfolder/Parmesannudeln werden" 400 226
    [... line above is repeated until playback is stopped ...]

    Without spaces in the path, playback is successful!
     
    Last edited:

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,972
    Nuenen
    Home Country
    Netherlands Netherlands
    Strange... here it works correctly
    I see this in onlinevideos:
    Code:
    [07-21 13:53:34,651] [MPMain      ] [INFO ] OnlineVideosPlayer: Play '...remote.php/dav/files/doskabouter/Videos/I%20am%20a%20subfolder%20with%20spaces%20in%20its%20name/Parmesannudeln%20werden%20im%20Parmesanlaib%20verfeinert%201.mp4'
    [07-21 13:53:52,012] [MPMain      ] [INFO ] OnlineVideosPlayer: Play '...remote.php/dav/files/doskabouter/Videos/Subfolder/Testclip.mp4'

    and for reference, this in MPUrlSourceSplitter.log:
    Code:
    21-07-2023 13:53:50.306 [1d28] [{C25B8CD0-BFF4-4576-A4BA-72587963104E}] [Verbose] MPUrlSourceSplitter_Protocol_Http: instance 'Main': CurlDebugCallback(): sent HTTP header: 'GET /remote.php/dav/files/doskabouter/Videos/Subfolder/Testclip.mp4 HTTP/1.1
    21-07-2023 13:53:33.502 [1ed4] [{C80D24E9-824F-4A1B-A6A9-598A4D778732}] [Verbose] MPUrlSourceSplitter_Protocol_Http: instance 'Main': CurlDebugCallback(): sent HTTP header: 'GET /remote.php/dav/files/doskabouter/Videos/I%20am%20a%20subfolder%20with%20spaces%20in%20its%20name/Parmesannudeln%20werden%20im%20Parmesanlaib%20verfeinert%201.mp4 HTTP/1.1
    so all urls seem to be correctly encoded
    Can you dm (because of sensitive info) me an onlinevideos.log and a mpurlsourcesplitter.log from a failed attempt?
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,972
    Nuenen
    Home Country
    Netherlands Netherlands
    Found the cause: it was this commit.
    Unfortunately there hasn't been a new release in quite a while so this isn't in the current release.
    New release is being worked on but really slow and no sight on a timeframe at the moment. I think the best I can do at the moment is give you the latest dll's to play with...
    locations are "C:\Program Files (x86)\Team MediaPortal\MediaPortal\plugins\Windows\OnlineVideos.MediaPortal1.dll" and "C:\Program Files (x86)\Team MediaPortal\MediaPortal\plugins\Windows\OnlineVideos\OnlineVideos.dll", make a backup first and overwrite those dlls with the contents of attached files.

    Note that if you simply rename it to f.e. "oldOnlineVideos.MediaPortal1.dll", 2 onlinevideos will appear and everything breaks, so either change the extension or move it to a different folder.
     

    Attachments

    • OnlineVideos.MediaPortal1.dll.7z
      336.7 KB
    • OnlineVideos.7z
      535.3 KB

    Users who are viewing this thread

    Top Bottom