Using GET /ZidooFileControl/openFile endpoint to open SMB file?

Discussion in 'General Development' started by RasterEyes, Dec 8, 2023.

  1. RasterEyes

    RasterEyes Member

    In the API documentation the only examples I see of using this endpoint:

    GET /ZidooFileControl/openFile?path=' + path + &videoplaymode=' +[0,1]

    ...are with the path "/storage/emulated/0".

    I can't figure out what the path would look like to play a file in mounted SMB share. I've tried to explore the directory structure using GET /ZidooFileControl/getFileList, but I don't see anything obvious under /mnt/smb or /tmp/ramfs/mnt or the like.

    I've also tried using "smb://ip-address/share..." as the path, but that doesn't work.

    Can this endpoint be used to play a file from an SMB share, and, if so, what's should the path to an SMB file look like?
     
  2. McBluna

    McBluna Well-Known Member

    I've checked with Postman on Z9X and Z9X Pro
    http://{{host}}/FileControl/openFile?path=%2Fmnt%2Fnfs%2F192.168.178.200%23Pool%2FFilme%2FMad+Max+Filmreihe%2FMad.Max.2.The.Road.Warrior.1981.COMPLETE.UHD.BLURAY-**********.iso&videoplaymode=0

    http://{{host}}/VideoPlay/getPlayStatus
    {"status":200,"video":{"status":0,"title":"Mad.Max.2.The.Road.Warrior.1981.COMPLETE.UHD.BLURAY-***********","path":"\/mnt\/nfs\/192.168.178.200#Pool\/Filme\/Mad Max Filmreihe\/Mad.Max.2.The.Road.Warrior.1981.COMPLETE.UHD.BLURAY-************.iso","currentPosition":10927,"duration":5728000,"width":3840,"height":2160,"fps":23.97599983215332,"formt":"H.265","filesize":"56.97 GiB","bitrate":"90.0 Mb\/s","output":"720x480I @ 60Hz ","subtitleInfo":"English PGS (1\/24)","audioInfo":"English Dolby Digital 5.1 channel 48.0KHz (1\/16)"},"subtitle":{"index":1,"information":"English PGS (1\/24)"},"audio":{"index":0,"information":"English Dolby Digital 5.1 channel 48.0KHz (1\/16)"},"playMode":{"index":0,"information":"Off"},"zoom":{"index":1,"information":"Fit"},"3D":{"index":0,"information":"2D","isMvc3D":false}}

    http://{{host}}/FileControl/openFile?path=%2Fdata%2Fsystem%2Fsmb%2F192.168.178.200%23RAMDISK%2FSource3%2FMovies%2FJohn%20Wick%20-%20Chapter%204%20(2023).mkv&videoplaymode=0

    http://{{host}}/VideoPlay/getPlayStatus
    {"status":200,"video":{"status":0,"title":"John Wick: Chapter 4","path":"\/data\/system\/smb\/192.168.178.200#RAMDISK\/Source3\/Movies\/John Wick - Chapter 4 (2023).mkv","currentPosition":4375,"duration":30000,"width":480,"height":270,"fps":30.0100040435791,"formt":"H264","filesize":"1.50 MiB","bitrate":"419.8 kb\/s","output":"1920x1080P @ 60Hz ","subtitleInfo":"Off (0\/0)","audioInfo":" AAC 2.0 channel 48.0KHz (1\/1)"},"subtitle":{"index":0,"information":"Off (0\/0)"},"audio":{"index":0,"information":" AAC 2.0 channel 48.0KHz (1\/1)"},"playMode":{"index":0,"information":"Off"},"zoom":{"index":1,"information":"Fit"},"3D":{"index":0,"information":"2D","isMvc3D":false}}

    Copy the path from getPlayStatus to Notepad++, remove all backslashes and use MIME Tools -> URL Encode
    {"status":200,"video":{"status":0,"title":"Guardians of the Galaxy Vol. 3","path":"\/storage\/C2808A33808A2DCB\/Source5\/Movies\/Guardians of the Galaxy Vol. 3 (2023).mkv","currentPosition":0,"duration":30000,"width":480,"height":270,"fps":30.0100040435791,"formt":"H264","filesize":"1.50 MiB","bitrate":"419.8 kb\/s","output":"1920x1080P @ 60Hz ","subtitleInfo":"Off (0\/0)","audioInfo":" AAC 2.0 channel 48.0KHz (1\/1)"},"subtitle":{"index":0,"information":"Off (0\/0)"},"audio":{"index":0,"information":" AAC 2.0 channel 48.0KHz (1\/1)"},"playMode":{"index":0,"information":"Off"},"zoom":{"index":1,"information":"Fit"},"3D":{"index":0,"information":"2D","isMvc3D":false}}

    -> %2Fstorage%2FC2808A33808A2DCB%2FSource5%2FMovies%2FGuardians%20of%20the%20Galaxy%20Vol.%203%20(2023).mkv
     
    Last edited: Dec 8, 2023
  3. RasterEyes

    RasterEyes Member

    Thanks! Using getPlayStatus with an already-playing video really helps make it clear. I certainly wouldn't have guessed the # between the IP address and the share name.

    One more less important question: What the difference supposed to be between videoplaymode=0 and videoplaymode=1? I didn't notice any difference when I tried both values.
     
  4. McBluna

    McBluna Well-Known Member

  5. RasterEyes

    RasterEyes Member

    Oh, wow! Much more complete API documentation than I'd been looking at before.
     
  6. McBluna

    McBluna Well-Known Member

    I've it in postman if you want me to share.
     
  7. RasterEyes

    RasterEyes Member

    I'm good now, thanks.

    I've been working on my own app to access my video library online. I've leveraged the Zidoo API to get metadata about my videos, like poster images, backgrounds, show descriptions, etc. The UI and backend are all my own, however, although I'm mimicking parts of the Zidoo look-and-feel in my UI – more the on-screen look-and-feel than that of the Zidoo web interface.

    The main purpose of this app is to give me streaming access to my video collection, but I decided it would also be useful (if logged in as "admin", and on my home network) to be able to start a movie playing on either of my Zidoos. Playback by aggregationId works fine for one Zidoo, but just in case the two Zidoos aren't synced in such a way that the same video has the same aggregationId, it's useful to be able to use a path to a video for playback – hence the question in the OP. My own UI is much faster to navigate than either the onscreen UI or the Zidoo web UI (WAY less lazy-loading lag).

    upload_2023-12-9_20-43-11.png
     
    Markswift2003 and McBluna like this.

Share This Page