AniDB "force" update does currently not do what I would expect it still upholds a 24 hour timeout.
I would kindly ask for an option to ignore this time out and "force" for real, if I choose to want to
what I am currently doing is this
var settings = JsonSerializer.Deserialize<SettingsEntry>(settingsOutput, Utils.jsonSerializerOptions) ?? new SettingsEntry();
if (!string.IsNullOrEmpty(settings.Database.MySqlFullName))
{
var conStringBuilder = new SqliteConnectionStringBuilder
{
DataSource = settings.Database.MySqlFullName
};
var conString = conStringBuilder.ToString();
using var connection = new SqliteConnection(conString);
connection.Open();
using var command = connection.CreateCommand();
command.CommandText = "select UpdatedAt from AniDB_AnimeUpdate where AnimeID = @aniDb";
command.Parameters.AddWithValue("@aniDb", seriesAniDb);
var updatedAt = Convert.ToDateTime(command.ExecuteScalar());
updatedAt = updatedAt.AddDays(-1.5);
using var commandUpdate = connection.CreateCommand();
commandUpdate.CommandText = "update AniDB_AnimeUpdate set UpdatedAt = @updatedAt where AnimeID = @aniDb";
commandUpdate.Parameters.AddWithValue("@aniDb", seriesAniDb);
commandUpdate.Parameters.AddWithValue("@updatedAt", updatedAt);
commandUpdate.ExecuteNonQuery();
}
which sets the UpdatedAt to -1.5 days in the past, so that calling this query actually refreshes an item
Series/{seriesId}/AniDB/Refresh?force=true&cacheOnly=false
You may ask why is this important to me, and maybe others?
In 99% of the time I don't care, but sometimes there are 2 use cases
-
A new series doesn't have episodes associated on AniDB but it may have in a couple of minutes/hourse after a episode was released, so it can happen that Shoko picked up the series but can't link the file to the correct episode because there was no episode available at the time
-
A series didn't have the correct tags associated most annoyingly the "18 restricted" tag, which is necessary to hide this kind of genres from people in my household which shouldn't see this
Shoko only can fix these issues 24 hours later, the first one is rather trivial as I can simply watch the episode 24 hours later, but the second one is more disturbing as I need to make sure for 24 hours this content doesn't fall into the wrong hands.
With the proposal I could manually fix it by simply refreshing the series ignoring the timeout.
So either the "force=true" should as I would assume actually force the update and ignore the timeout, or provide another parameter e.g. "ignoreTimeout=true"
AniDB "force" update does currently not do what I would expect it still upholds a 24 hour timeout.
I would kindly ask for an option to ignore this time out and "force" for real, if I choose to want to
what I am currently doing is this
which sets the
UpdatedAtto -1.5 days in the past, so that calling this query actually refreshes an itemYou may ask why is this important to me, and maybe others?
In 99% of the time I don't care, but sometimes there are 2 use cases
A new series doesn't have episodes associated on AniDB but it may have in a couple of minutes/hourse after a episode was released, so it can happen that Shoko picked up the series but can't link the file to the correct episode because there was no episode available at the time
A series didn't have the correct tags associated most annoyingly the "18 restricted" tag, which is necessary to hide this kind of genres from people in my household which shouldn't see this
Shoko only can fix these issues 24 hours later, the first one is rather trivial as I can simply watch the episode 24 hours later, but the second one is more disturbing as I need to make sure for 24 hours this content doesn't fall into the wrong hands.
With the proposal I could manually fix it by simply refreshing the series ignoring the timeout.
So either the "force=true" should as I would assume actually force the update and ignore the timeout, or provide another parameter e.g. "ignoreTimeout=true"