Dibbes 430 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 @@chef, for the Windows version of this plugin, is there a way to get the name of the disks displayed as well, next to the drive-letter? I have a ton of shares mapped to my server and I don't always remember which is which. 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted January 15, 2020 Author Share Posted January 15, 2020 @@chef, for the Windows version of this plugin, is there a way to get the name of the disks displayed as well, next to the drive-letter? I have a ton of shares mapped to my server and I don't always remember which is which. Yes, I'll add this. 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted January 15, 2020 Author Share Posted January 15, 2020 (edited) @Dibbles It's been added, at the bottom beside space info. Is that cool? Edited January 15, 2020 by chef 1 Link to comment Share on other sites More sharing options...
Dibbes 430 Posted January 15, 2020 Share Posted January 15, 2020 @Dibbles It's been added, at the bottom beside space info. Is that cool? Perfect! and exactly how I pictured it Thank you Link to comment Share on other sites More sharing options...
Dibbes 430 Posted January 16, 2020 Share Posted January 16, 2020 (edited) @@chef Some observations Not sure why and it's honestly not really important, but for some drives the names aren't displayed (T & U drives)... very strange. These are Windows Shares, so maybe it's that... Also, for some shares the names are not displayed completely, just the first word (P & R Drives), These are different Synology boxes And, lastly, purely cosmetic, the boxes are not uniform in size And something I have not been able to figure out, how do I change colours of the images? I've seen various screenshots in this threat with different colours than mine... Any reason for that? Love this plugin though! Thanks Edited January 16, 2020 by Dibbes Link to comment Share on other sites More sharing options...
chef 3745 Posted January 16, 2020 Author Share Posted January 16, 2020 (edited) @Dibbles This is great feedback, thank you. Color is changed by selecting the Used/Available boxes at the top of the card. Interesting that the Volume label doesn't show of those two drives specifically. What does windows report as the volume label for those drives? Can you tell me which drive card in the image you posted has the odd sizing problem? I can fix sizing with some css. Edited January 16, 2020 by chef Link to comment Share on other sites More sharing options...
Dibbes 430 Posted January 16, 2020 Share Posted January 16, 2020 @Dibbles - You're going to have to drop the "l" from my handle, otherwise I don't get the notification... lol Interesting that the Volume label doesn't show of those two drives specifically. What does windows report as the volume label for those drives? - Sure, see below Can you tell me which drive card in the image you posted has the odd sizing problem? I can fix sizing with some css. - it's not much, but you can see it in the screenshot 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted January 16, 2020 Author Share Posted January 16, 2020 Oh geez, I finally got your name right... I must be getting old lol. Or need better glasses. Lol I see why those shares are not showing properly. I can fix the code to make them show up. 1 Link to comment Share on other sites More sharing options...
Dibbes 430 Posted January 16, 2020 Share Posted January 16, 2020 @@chef one more thing, can the used and available be swapped? Currently the available in the pie/circle (I don't know how it's called, really, but I mean the graphical part) comes first. I think that counter intuitive, as most OS'es give used first... (Also the legend gives used first, by the way) Link to comment Share on other sites More sharing options...
chef 3745 Posted January 16, 2020 Author Share Posted January 16, 2020 1 Link to comment Share on other sites More sharing options...
rbjtech 4221 Posted January 17, 2020 Share Posted January 17, 2020 (edited) I see why those shares are not showing properly. I can fix the code to make them show up. Hi Chef, great plugin but as all of my media is on UNC paths (\\server\media etc) on a remote server/nas, the plugin is currently only showing the system drive for me which is of limited use. Do you plan to add UNC support ? Thanks for your efforts - this could be incorporated under the main 'Server | Libraries' Admin View - as there is room there to display it ? Nice. Edit - a crude mock up .. Edited January 17, 2020 by rbjtech Link to comment Share on other sites More sharing options...
chef 3745 Posted January 17, 2020 Author Share Posted January 17, 2020 (edited) Edited January 17, 2020 by chef Link to comment Share on other sites More sharing options...
Happy2Play 8240 Posted January 17, 2020 Share Posted January 17, 2020 From a Network Shares aspect, maybe a manual input to show that share. And a option to not show/hide specific drives. 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted January 18, 2020 Author Share Posted January 18, 2020 Do you mean there should be a dialog with all the mounts, shares and drives available, and put checkboxes beside them to choose which ones to display? That would be pretty easy to do. But do the UNC drives show up in the API? We can only display paths that show up in IFileSystem (EnvironmentService). Link to comment Share on other sites More sharing options...
Happy2Play 8240 Posted January 18, 2020 Share Posted January 18, 2020 Do you mean there should be a dialog with all the mounts, shares and drives available, and put checkboxes beside them to choose which ones to display? That would be pretty easy to do. But do the UNC drives show up in the API? We can only display paths that show up in IFileSystem (EnvironmentService). Don't really know anything about this, but if a user could select/deselect the drives they wish to monitor, should cover the intended usage of this plugin. For the Network Shares I would think they would need to manually enter the shares they would want to monitor, as they typically would not be local to the machine Emby is on. Link to comment Share on other sites More sharing options...
chef 3745 Posted January 18, 2020 Author Share Posted January 18, 2020 Don't really know anything about this, but if a user could select/deselect the drives they wish to monitor, should cover the intended usage of this plugin. For the Network Shares I would think they would need to manually enter the shares they would want to monitor, as they typically would not be local to the machine Emby is on. Yep, right away I can see some issues coding network shares into this thing. Users gonna have to add these extra. There is a chance that we can't read Disk information of the share directory because it isn't local. Not sure how this is going to go. 2 Link to comment Share on other sites More sharing options...
chef 3745 Posted January 19, 2020 Author Share Posted January 19, 2020 (edited) I have UNC paths working in Windows, but I don't know how to do it under UNIX... ... yet. Currently I can check for the OS like this: private static bool IsUnix() { var isUnix = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux); return isUnix; } This is super helpful code built into CORE. That means I can code around those two platforms. I can Marshal in un-managed code from PInvoke on windows to access UNC shares like this: [return: MarshalAs(UnmanagedType.Bool)] [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern bool GetDiskFreeSpaceEx(string lpDirectoryName, out ulong lpFreeBytesAvailable, out ulong lpTotalNumberOfBytes, out ulong lpTotalNumberOfFreeBytes); and have it only run on windows machines to return UNC drive data. that's sweet! But, to grab UNIX data it will probably mean using a Bash script and parsing the StdOut information. I don't want to add this stuff to a release of the plugin until I know it can stay cross platform and has been thoroughly tested. So... any Linux guys out there who know a good bash script to grab UNC disk information?? Edited January 19, 2020 by chef 1 Link to comment Share on other sites More sharing options...
CBers 6766 Posted January 27, 2020 Share Posted January 27, 2020 I have UNC paths working in Windows, but I don't know how to do it under UNIX... ... yet. Currently I can check for the OS like this: private static bool IsUnix() { var isUnix = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux); return isUnix; } This is super helpful code built into CORE. That means I can code around those two platforms. I can Marshal in un-managed code from PInvoke on windows to access UNC shares like this: [return: MarshalAs(UnmanagedType.Bool)] [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern bool GetDiskFreeSpaceEx(string lpDirectoryName, out ulong lpFreeBytesAvailable, out ulong lpTotalNumberOfBytes, out ulong lpTotalNumberOfFreeBytes); and have it only run on windows machines to return UNC drive data. that's sweet! But, to grab UNIX data it will probably mean using a Bash script and parsing the StdOut information. I don't want to add this stuff to a release of the plugin until I know it can stay cross platform and has been thoroughly tested. So... any Linux guys out there who know a good bash script to grab UNC disk information?? Wouldn't they just be mounted filesystems under unix, using the df command ? Does your plugin send notifications if a particular disk is below a certain threshold ? Link to comment Share on other sites More sharing options...
CBers 6766 Posted January 27, 2020 Share Posted January 27, 2020 @@chef Not sure how the AVAILABLE and USED figures are calculated that are displayed if you hover over the images, but they don't look good. Just installed the plugin via the catalog. Link to comment Share on other sites More sharing options...
chef 3745 Posted January 27, 2020 Author Share Posted January 27, 2020 (edited) You can change the color by clicking on the little square. Those numbers are bytes. Does that make sense? It was the built in way to calculate the graphs. Maybe I can change it to read something more readable. It's calculated on the bottom though. Should I try? Edited January 27, 2020 by chef Link to comment Share on other sites More sharing options...
chef 3745 Posted January 27, 2020 Author Share Posted January 27, 2020 And yes it should send notifications of full drives! Great idea, @@CBers what kind of notifications do you want to see? On the dashboard under alerts maybe? Or dashboard alert modals? Link to comment Share on other sites More sharing options...
CBers 6766 Posted January 27, 2020 Share Posted January 27, 2020 You can change the color by clicking on the little square. Those numbers are bytes. Does that make sense? Not worried about the colour, but the figures are meaningless. No-one is going to sit there working out what 1424142395248 in bytes is in Tb/Gb/Mb etc.. Wouldn't it be better to show the information in the same format as the size of the drive at the bottom ? Link to comment Share on other sites More sharing options...
CBers 6766 Posted January 27, 2020 Share Posted January 27, 2020 And yes it should send notifications of full drives! Great idea, @@CBers what kind of notifications do you want to see? On the dashboard under alerts maybe? Or dashboard alert modals? It was mentioned in this thread about having a notification if a drive runs out of space, especially if it's used for recording Live TV (DVR). 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted January 27, 2020 Author Share Posted January 27, 2020 Not worried about the colour, but the figures are meaningless. No-one is going to sit there working out what 1424142395248 in bytes is in Tb/Gb/Mb etc.. Wouldn't it be better to show the information in the same format as the size of the drive at the bottom ? I will use my calculator function to change them to a more compressed number. But I'm not sure it will show units, I'll try. 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted January 27, 2020 Author Share Posted January 27, 2020 It was mentioned in this thread about having a notification if a drive runs out of space, especially if it's used for recording Live TV (DVR). Consider it done. 2 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