JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 15.09.2022, 14:16
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Post K2S Not recognizing premium account / total traffic wrong

Ran into a problem today that my lifetime-premium account of K2S was only recognized as Free Account (expired premium) even though it's still valid till 2030.

After looking into the plugin, i saw that the account_expires_timestamp from the K2S api was compared with the current time with milliseconds!

Code:
if (account_expires_timestamp < System.currentTimeMillis()) {
whereas the api reports my account_expires_timestamp as
Code:
1905379200
which is unix epoch of 2030

and the plugin compares it with
Code:
1663242776952
which is current time in milliseconds, which is ALWAYS bigger than the plain epoch in seconds, so my account gets always flagged as expired premium.

A quick debug run where i added the values to the Account status confirmed it:
https://snipboard.io/Gla31p.jpg


I implemented a quick fix on my end, it's a trivial fix so i don't think i need to post a patch.

Also you can see that the traffic is recognized as "18.11 GB of 18.11 GB left", not sure if the total is not reported correctly by the api anymore, not a big deal anyway.

Regards,
FBD
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader

Last edited by FBD; 15.09.2022 at 14:17. Reason: img link updated
Reply With Quote
  #2  
Old 15.09.2022, 14:27
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,088
Default

Sorry my bad this regression has been added by me in revision 46701 when I've changed the plugin to use our json parser.
I've added the "* 1000" multiplication which should fix this issue for you.

EDIT

No need to wait for updates as you seem to use our dev build so this mistake has never been released to our stable version so thanks for your help!
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?

Last edited by pspzockerscene; 15.09.2022 at 14:30.
Reply With Quote
  #3  
Old 15.09.2022, 14:28
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,088
Default

Quote:
Originally Posted by FBD View Post
Also you can see that the traffic is recognized as "18.11 GB of 18.11 GB left", not sure if the total is not reported correctly by the api anymore, not a big deal anyway.
What would the real value be?

I only have a free account for testing atm...
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #4  
Old 15.09.2022, 14:29
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by pspzockerscene View Post
What would the real value be?

I only have a free account for testing atm...
Real value would be 20.00 Gigs, which is daily traffic for life-time premium accounts.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #5  
Old 15.09.2022, 14:33
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,088
Default

GB or GiB?
According to your screenshot it's GiB which is the default unit used by JD.
If you want JD to display "GB", do the following:
Settings -> Advanced Settings -> GraphicalUserInterfaceSettings.maxsizeunit -> Change this to "TB" -> Restart JD
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #6  
Old 15.09.2022, 14:40
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by pspzockerscene View Post
GB or GiB?
According to your screenshot it's GiB which is the default unit used by JD.
If you want JD to display "GB", do the following:
Settings -> Advanced Settings -> GraphicalUserInterfaceSettings.maxsizeunit -> Change this to "TB" -> Restart JD
No, the problem is that total traffic and remaining traffic are always the same, here, i just downloaded a few files and now i have

https://snipboard.io/ebicwP.jpg
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #7  
Old 15.09.2022, 14:42
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,524
Default

@FBD: as far as I know the api does not report max traffic and thus JDownloader only shows x of x instead of x of y .
see keep2share.github.io/api/#resources:/accountInfo:post

We try to avoid to set hardcoded upper limits as we have to manually check/update them. Maybe ask k2s support to extend api to report this value as well
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 15.09.2022 at 14:45.
Reply With Quote
  #8  
Old 15.09.2022, 14:43
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,088
Default

That is basically normal for pretty much alle filehosts because JD doesn't keep track of the first/highest traffic value.

Some filehosts however, do provide this information via API e.g. "trafficUsedToday" and "trafficMaxToday" so things will look prettier in JD but in this case: No.
EDIT

Jiaz was faster.
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #9  
Old 15.09.2022, 14:45
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by Jiaz View Post
@FBD: as far as I know the api does not report max traffic and thus JDownloader only shows x of x instead of x of y .
see keep2share.github.io/api/#resources:/accountInfo:post
ah well, as i said, not a big thing, wasn't sure if the k2s api even shows total traffic anymore, apparently not.

Quote:
Originally Posted by pspzockerscene View Post
No need to wait for updates as you seem to use our dev build so this mistake has never been released to our stable version so thanks for your help!
aah, i was wondering why i could not find anyone complaining about it on the forums, lol

thanks guys!
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #10  
Old 15.09.2022, 14:46
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,524
Default

Quote:
Originally Posted by Jiaz View Post
We try to avoid to set hardcoded upper limits as we have to manually check/update them. Maybe ask k2s support to extend api to report this value as well
Maybe ask them nicely and they will add it?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #11  
Old 15.09.2022, 14:48
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by Jiaz View Post
Maybe ask them nicely and they will add it?
I'll hit them up with a support ticket... and i still have the skype contact of one of the devs... from many years ago, no idea if he still works there, lol. but worth a try.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #12  
Old 15.09.2022, 14:52
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,088
Default

Quote:
Originally Posted by FBD View Post
aah, i was wondering why i could not find anyone complaining about it on the forums, lol
Me too you nearly gave me a heart attack.

I did refactor other parts of our keep2share plugin too so if you find any problems please let me know
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #13  
Old 16.11.2022, 17:53
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,088
Default

CORE-Updates have been released!
All announced bugfixes and features are live!
Please update your JDownloader and report any issues you find asap.
If this thread gets marked as "[Solved]" by our forum staff you can still post in it and we will read- and reply to it!

CORE-Updates wurden released!
Alle angekündigten Bugfixes/Features sind nun verfügbar!
Bitte JDownloader updaten und eventuelle Bugs schnellstmöglich an uns melden.
Falls dieser Thread vom Team als "[Erledigt]" markiert wird, kannst du weiterhin darin antworten und wir lesen/beantworten auch solche Threads!

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 21:36.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.