Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Download time with empty minutes and seconds (#16)
orig PR: nzbget/nzbget#800 Calculation of Total time Download time Verification time Repair time Unpack time was broken for python3. Everything except hours def format_time_sec_orig(sec): Hour = sec / 3600 Min = (sec - (sec / 3600) * 3600) / 60 Sec = (sec - (sec / 3600) * 3600) % 60 return '%d:%02d:%02d' % (Hour, Min, Sec) def format_time_sec_new(sec): Hour = sec / 3600 Min = (sec % 3600) / 60 Sec = (sec % 60) return '%d:%02d:%02d' % (Hour, Min, Sec) print("Orig: " + format_time_sec_orig(int(7199))) print("New: " + format_time_sec_new(int(7199))) Output: 1:00:00 1:59:59 Process finished with exit code 0
- Loading branch information