[FBot] Can't access replays from user's stats page

Please report any errors, bugs, exploits or glitches here.
User avatar
NabatExe
Posts: 2
Joined: Mon Nov 21, 2016 11:05 am

[FBot] Can't access replays from user's stats page

Postby NabatExe » Thu Dec 15, 2016 7:17 pm

If i went to my stats page link i can't download some replays. It gives me 404 error. If I try to download it from replay page link everything goes smoothly.
In details. If i try to download the game replay called "2016-12-15 16-46 Werewolf Trans! +1 Fullhouse (62m15s) 5 players" (watch img1) it will send 404 error (watch img2). If i go to replay section and search trough all replays (watch img3) only then I can download the replay.
Link to photos: http://imgur.com/a/VxMkp
P.S. Attached photos looked very ugly so i uploaded them to imgur.
User avatar
Falanor
Posts: 224
Joined: Sat Apr 23, 2016 5:04 pm

Re: Fbot bug. Can't access replays from user's stats page

Postby Falanor » Thu Dec 15, 2016 8:06 pm

Hey!
Yes, I'm aware of this problem.

When replay is created, it counts game duration in "ticks" which are equivalent to milliseconds. It’s being rounded when used in naming of the file, meaning that for a value of 15999 ticks we have "16 seconds".
While in the database the value of duration is stored in seconds and is not being rounded, meaning that 15.999 second is written as "15 seconds".

If you check the links, you can see this:
Status page: 2016-12-15 16-46 Werewolf Trans! +1 Fullhouse (62m14s) 5 players.w3g
Replay folder: 2016-12-15 16-46 Werewolf Trans! +1 Fullhouse (62m15s) 5 players.w3g

I have few ideas how I can fix this and hopefully I’ll do it soon.
Thank you!