Dibbes 514 Posted January 28, 2020 Posted January 28, 2020 @@Dibbes, this is correct? 10e+9 = 10GB Yes, but more common is 1e+10... Sent from my iPad using Tapatalk 1
Dibbes 514 Posted January 28, 2020 Posted January 28, 2020 (edited) [emoji2962] <--I hope that that mind blown emoji shows up...1e just means 1 exponent, then the + or - gives the direction in which the decimal moves and lastly, the number says how many places. So we know that 1 kilobyte is a 1000 bytes, so that's a 1 with three zeros, written differently: 1e+3 1GB is a 1 with 9 zeroes, so 1e+9. 10GB is a one with ten zeroes, so 1e+10. Kilo = 3 zeroes Mega = 6 zeroes Giga = 9 zeroes Tera = 12 zeroes Peta = 15 zeroes Etc. Sent from my iPad using Tapatalk Edited January 28, 2020 by Dibbes 2
Spaceboy 2573 Posted January 28, 2020 Posted January 28, 2020 @@Spaceboy, @@PenkethBoy and @@maegibbons should have a good idea on recording sizes. for me an hour of HD recorded tv can be anywhere between 2 and 6Gb depending on channel 2
chef 3810 Posted January 28, 2020 Author Posted January 28, 2020 (edited) C# seems to be okay with the exponent integer. I think Dibbes just saved me a bunch of time with this new found way of writting long ints. The threshold has been set to a whole drive value less10GB, which should allow for an hour and a bit of recorded TV based on what Spaceboy has said. I'm not sure how it will do casting 1e+10 to a long value. The IDE is not yelling about it. Anything else shows a possible overflow error. 1.0.0.6 I hope that fixes the notifications issues. Edited January 28, 2020 by chef
CBers 7450 Posted January 28, 2020 Posted January 28, 2020 @@chef I'm still getting the original messages, even though v1.0.0.4 is in use. Still getting the same with v1.0.0.6. 1
chef 3810 Posted January 28, 2020 Author Posted January 28, 2020 1.0.0.7 var totalSize = Math.Round(driveInfo.TotalSize / 1000000000.0) ; //GBs var freeSpace = Math.Round(driveInfo.AvailableFreeSpace / 1000000000.0); //GBs if ((totalSize - freeSpace) > 10.0) continue; //Bigger the 10GB we're good That has to be it. 1
CBers 7450 Posted January 28, 2020 Posted January 28, 2020 (edited) 1.0.0.7 var totalSize = Math.Round(driveInfo.TotalSize / 1000000000.0) ; //GBs var freeSpace = Math.Round(driveInfo.AvailableFreeSpace / 1000000000.0); //GBs if ((totalSize - freeSpace) > 10.0) continue; //Bigger the 10GB we're good That has to be it. OK, so most of my drives break that rule, as TotalSize is almost exactly the same as AvailableFreeSpace, so the result is effectively zero, causing a notification to be raised. I think all you need to do is: var freeSpace = Math.Round(driveInfo.AvailableFreeSpace / 1000000000.0); //GBs if ((freespace / 1000000000.0) > 10) continue; Unless I'm wrong. . Edited January 28, 2020 by CBers 1
CBers 7450 Posted January 29, 2020 Posted January 29, 2020 @@chef I see v1.0.0.8 was released, but what changes were made, as I'm still getting the same notifications, but for all of my drives now?
maegibbons 1287 Posted January 29, 2020 Posted January 29, 2020 @@CBers I think you are right. If you have freespace just check if it is greater or less than 10GB. Total drive space is irrelavent if not using percentage. Krs Mark Sent from my SM-N976B using Tapatalk 2
maegibbons 1287 Posted January 29, 2020 Posted January 29, 2020 Things are not working so good I have had notofications from .8 Disk space almost full: D:\ (DATA) disk space almost full - 759.6 GB Thats not full!! Krs Mark Sent from my SM-N976B using Tapatalk 1
chef 3810 Posted January 29, 2020 Author Posted January 29, 2020 Yes, 1.0.0.9 should fix things. Check if free space is less then 10 GB inorder to alert. Sorry about that. 1
CBers 7450 Posted January 29, 2020 Posted January 29, 2020 Not sure if this is expected, but the ST is taking 0 seconds to run. 2020-01-29 20:49:23.010 Debug TaskManager: Executing Disk Space Almost Full Notification 2020-01-29 20:49:23.024 Debug TaskManager: Disk Space Almost Full Notification Completed after 0 minute(s) and 0 secondsI don't have any drives with less than 10Gb free, but I thought it might run for at least 1 second. Not complaining, just curious if it's working as expected.
chef 3810 Posted January 29, 2020 Author Posted January 29, 2020 Not sure if this is expected, but the ST is taking 0 seconds to run. 2020-01-29 20:49:23.010 Debug TaskManager: Executing Disk Space Almost Full Notification 2020-01-29 20:49:23.024 Debug TaskManager: Disk Space Almost Full Notification Completed after 0 minute(s) and 0 secondsI don't have any drives with less than 10Gb free, but I thought it might run for at least 1 second. Not complaining, just curious if it's working as expected. Yes thank you for the reminder! I should have thrown a IProgress update in there to complete the task. I'll put one in now. I meant to do that earlier but forgot.
CBers 7450 Posted January 29, 2020 Posted January 29, 2020 Yes thank you for the reminder! I should have thrown a IProgress update in there to complete the task. I'll put one in now. I meant to do that earlier but forgot. That's OK chef, you must be busy. So you think that the plugin is running OK then?
chef 3810 Posted January 29, 2020 Author Posted January 29, 2020 (edited) That's OK chef, you must be busy. So you think that the plugin is running OK then? I think so. I've added the progress report so it shouldn't look like it hangs (which was happening to me), but also increment as it moves through scanned drives. 1.0.1.0 I think it's working okay. Thank you for taking the time to help get it working better. I think it has definitely leveraged more of embys API. Edited January 29, 2020 by chef 2
CBers 7450 Posted January 29, 2020 Posted January 29, 2020 Thank you for taking the time to help get it working better. And thank you.
Dibbes 514 Posted January 29, 2020 Posted January 29, 2020 @@chef I have a request: is there a way to get the free-space figure in MB/GB/TB when you do an "on mouse over" on the graphs? It's now displaying bytes...
chef 3810 Posted January 29, 2020 Author Posted January 29, 2020 @@chef I have a request: is there a way to get the free-space figure in MB/GB/TB when you do an "on mouse over" on the graphs? It's now displaying bytes... I've tried to do this. There is a way to code custom tooltips for chartJS, I've read the docs and I understand how to do it, so yes I'm pretty sure I can. For now I was able to calculate the percentage of each part of the graph, because the long string of byte data was completely useless to anyone reading it. The reason it's in bytes is because that is how the chart is drawn to get the most accurate results. I'll work on custom tooltips next. 1
Dibbes 514 Posted January 29, 2020 Posted January 29, 2020 I've tried to do this. There is a way to code custom tooltips for chartJS, I've read the docs and I understand how to do it, so yes I'm pretty sure I can. For now I was able to calculate the percentage of each part of the graph, because the long string of byte data was completely useless to anyone reading it. The reason it's in bytes is because that is how the chart is drawn to get the most accurate results. I'll work on custom tooltips next. Thank you! 1
maegibbons 1287 Posted January 30, 2020 Posted January 30, 2020 Hi Working well. Many thanks. Can you add in a parameter for free Space limit? Preferably by drive but if not overall! 10GB IS too large for one of my legacy shares of only 40GB! It only has 2.8GB free and is triggering every hour. I dont store media on that drive. Krs Mark Sent from my SM-N976B using Tapatalk 2
chef 3810 Posted January 30, 2020 Author Posted January 30, 2020 Hi Working well. Many thanks. Can you add in a parameter for free Space limit? Preferably by drive but if not overall! 10GB IS too large for one of my legacy shares of only 40GB! It only has 2.8GB free and is triggering every hour. I dont store media on that drive. Krs Mark Sent from my SM-N976B using Tapatalk Yep. 2
maegibbons 1287 Posted January 30, 2020 Posted January 30, 2020 Excellent! Krs Mark Sent from my SM-N976B using Tapatalk
chef 3810 Posted January 30, 2020 Author Posted January 30, 2020 This is weird, there is an error in my debugging and I don't understand it. Saving the configuration the first time after adding new elements causes the UI to break. But, why? This is going to take a second more to finish.
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