chef 3746 Posted January 12, 2020 Author Share Posted January 12, 2020 thank you for the list. I'm not sure why emby returns these mounts for linux in the IFileSystem interface GetDrives function, but none the less I have added the following code to 'filter-out' some of these directories. if (dir.Name.Split('\\').Length > 2) continue; //Windows - too many subfolders to be what we are looking for if (dir.Name.Split('/').Length > 2) continue; //Linux - too many subfolders to be what we are looking for switch (dir.Name.Split('/')[1]) //Linux - if these sneak past our filter ignore them { case "etc": case "dev": case "run": case "snap": case "sys": continue; } DOWNLOAD: DiskSpace.zip Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 12, 2020 Share Posted January 12, 2020 ok with this version we have / displayed correctly but mount drive are not there anymore. Best world manual mount + local drive should be there. 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 12, 2020 Author Share Posted January 12, 2020 (edited) ok with this version we have / displayed correctly but mount drive are not there anymore. Best world manual mount + local drive should be there. I'm not sure if the IFileSystem api interface returns the local mount drive. Technically we are requesting "Environment/Drives" from the api. Would it be okay to ask you to open the swagger, and see if your local mount drive returns under "Environment/Drives". just in case: swagger is found at the bottom on the dashboard page - 'API' Also, in case I have forgotten to say thank you for taking the time to help me. Edited January 12, 2020 by chef Link to comment Share on other sites More sharing options...
tdiguy 96 Posted January 12, 2020 Share Posted January 12, 2020 I'm not sure if the IFileSystem api interface returns the local mount drive. Technically we are requesting "Environment/Drives" from the api. Would it be okay to ask you to open the swagger, and see if your mount + drive returns under "Environment/Drives". just in case: swagger is found at the bottom on the dashboard page - 'API' Also, in case I have forgotten to say thank you for taking the time to help me. It might be some of the filtering, i dont know much about it so what does (dir.Name.Split('/').Length > 2) mean? As an example my emby drive has a mount point of /media/emby but someone could make it 20 folders or more deep if they desired. 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 12, 2020 Author Share Posted January 12, 2020 (edited) It might be some of the filtering, i dont know much about it so what does (dir.Name.Split('/').Length > 2) mean? As an example my emby drive has a mount point of /media/emby but someone could make it 20 folders or more deep if they desired. Okay, I can see how that filter wouldn't work the same in linux, like it would in windows. Paths start with "/". I should have known that I did program a raspi... once... This version ignores the fact that on linux paths could be bigger, and doesn't try and limit the results from the API based on the length of the path, rather it only ignores what was inside the switch statement. I'm not entirely happy with using a switch statement to filter results because I image that that list could get quite large. I'm half way through a seminar on linux file systems as we speak, it's called "The Shell". DOWNLOAD: DiskSpace.zip Edited January 12, 2020 by chef Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 12, 2020 Share Posted January 12, 2020 (edited) Code Details Undocumented TypeError: Failed to fetch that was for the swagger Edited January 12, 2020 by chacawaca 1 Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 12, 2020 Share Posted January 12, 2020 last version seem to work, i have local and mounted drive. 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 12, 2020 Author Share Posted January 12, 2020 last version seem to work, i have local and mounted drive. Excellent news! Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 12, 2020 Share Posted January 12, 2020 just miss the cool graphic that you have in windows. but at least information is there. 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 12, 2020 Author Share Posted January 12, 2020 just miss the cool graphic that you have in windows. but at least information is there. Which browser are you using? The charts are coming from a JavaScript plugin inside the plugin. That sounds like a new issue. Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 12, 2020 Share Posted January 12, 2020 tested, Brave, Firefox, Opera, none of them have the graphic 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 12, 2020 Author Share Posted January 12, 2020 tested, Brave, Firefox, Opera, none of them have the graphic Could you send me a log file? And perhaps if you could take a look at the dev options in the browser console and see if there are any errors. I'm about to test the library in Firefox to see what's up. Thank you again. Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 12, 2020 Share Posted January 12, 2020 no error in log file, first thing i checked. I will try to get you a clear debug log when i have 2 min. 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 12, 2020 Author Share Posted January 12, 2020 tested, Brave, Firefox, Opera, none of them have the graphic Browser support will be limited to: Chrome 50+ Firefox 45+ Internet Explorer 11 Edge 14+ Safari 9+ Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 12, 2020 Share Posted January 12, 2020 if its work on chrome it will work on brave both are chromium 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 13, 2020 Author Share Posted January 13, 2020 Interesting, Here is the Disk Space plugin running on Android Server(Bluestacks). Works great, except that no canvas show up like in Linux. Very weird stuff. @@Luke Link to comment Share on other sites More sharing options...
chef 3746 Posted January 14, 2020 Author Share Posted January 14, 2020 (edited) I donlt know why that was hard, But I believe we have a proper crossplatform plugin here. Seems to be okay on Android and windows @chacawca you wanna test to see if you finally get charts on linux chrome browsers? DiskSpace.zip Edited January 14, 2020 by chef Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 14, 2020 Share Posted January 14, 2020 ubuntu server windows brave, firefox, opera sorry no graphic You should rename your plugin and add memory and cpu info 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 14, 2020 Author Share Posted January 14, 2020 Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 14, 2020 Share Posted January 14, 2020 yep, box size have change (path top and size bottom, instead of left and right), but no graphic 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 14, 2020 Author Share Posted January 14, 2020 (edited) @@Luke we're cross platform now Here's a link to the repo: https://github.com/chefbennyj1/Emby.DiskSpace it was all about the slashes: this way / and that way \ . DOWNLOAD: DiskSpace.zip Edited January 14, 2020 by chef Link to comment Share on other sites More sharing options...
chacawaca 106 Posted January 14, 2020 Share Posted January 14, 2020 Work with ubuntu 1 Link to comment Share on other sites More sharing options...
tdiguy 96 Posted January 15, 2020 Share Posted January 15, 2020 Working perfectly now. It is reporting only the drives on my system. 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted January 15, 2020 Author Share Posted January 15, 2020 Link to comment Share on other sites More sharing options...
tdiguy 96 Posted January 15, 2020 Share Posted January 15, 2020 Thank you for taking the time to help test that out. I learned a lot from do this project. Now I'm wondering about running bash scripts from command prompts in .netcore. It's a whole new world Bash is at least one of those things that has been out there so long that there is a plethora of information out there on it. Course i dont know jack about .net so no idea how that goes or how it complicates it. I am mostly a network guy, things get ugly when i have to do anything resembling scripting ( nevermind programming ). But i can make a mean ACL on a firewall. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now