Closed BoredLama closed 5 years ago
I just checked, it's not a timestamp, the value for released
should be in the form of:
2016-04-20T04:00:00.000Z
Example of creating such a string:
var currentTimestamp = Date.now();
var toDate = new Date(currentTimestamp);
var released = toDate.toISOString(); // will be: "2019-01-17T16:31:00.000Z"
Thanks for this! It seems to be working if I put released: new Date(), the ISO string is probably returned when casting the Date as a string.
I noticed your comment here: https://github.com/rleroi/stremio-anime/blob/master/server.js#L279
Stating:
I know the reason for this, look here: https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/api/responses/meta.md#video-object
Episodes are sorted based on the
released
property, l think it should be a timestamp. If you set your released time (even a fake one) with even a 1 millisecond difference between the episodes, they will be ordered correctly.