Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Series show all episodes watched, but actually are not #631

Open
t0815 opened this issue Apr 11, 2023 · 23 comments
Open

Some Series show all episodes watched, but actually are not #631

t0815 opened this issue Apr 11, 2023 · 23 comments
Assignees

Comments

@t0815
Copy link

t0815 commented Apr 11, 2023

VERSION INFORMATION

Server Version: 4.2.1

Desktop Version: 4.2.1

LOG FILE

n/a

DESCRIPTION

Related to #627 propably.

I noticed that some series show, there are no episodes remaining to watch after update,
but all episides are actually unwatched. Did not start playing them with new version either.

grafik

STEPS TO REPRODUCE

  1. ) Hard to tell, i can accross a series by chance
  2. ) so... find a series you havent been watching and check details page
@ElementalCrisis
Copy link
Member

Do you actually have files for this series?

I believe you're using the beta Web UI, check on there and let us know what it says.

@t0815
Copy link
Author

t0815 commented Apr 16, 2023

yes, i have files for the given series. How do i access the beta web ui?

@ElementalCrisis
Copy link
Member

Manually download it and replace the contents of the Web UI folder with it.

@revam
Copy link
Member

revam commented Apr 16, 2023

Or just change the update channel for the web ui to dev and hit update.

And if you're coming from a stable version of web ui, then hard refresh the web browser, reset the local storage and/or session storage, and close and re-open the tab. You probably need to do this regardless of how you update to the β web ui.

@t0815
Copy link
Author

t0815 commented Apr 18, 2023

Same in web-ui:

grafik

Files are available and unwatched:

grafik

@danmarce
Copy link

danmarce commented Apr 24, 2023

I'm having a similar issue with server 4.2.2 and Desktop 4.2.1, in my case I noticed the problem the other way, series I KNOW are completed (even with the vote) with un-watched episodes. On "Series Info" I get "all episodes have watched" but on the episodes tab I get the un-watched episodes (so I do on the search)

I would not take much issue, but the "mark all as watched" button does not work. While I see this happening mostly with recent series, it also happens with older series. I'm my case with over 3k series, is a bit hard to really find the errors on the desktop client, but I'll check the DB later.

Edit: Ok, on desktop I created a filter with "Has un-watched episodes: include" and "user voted: include". Definitively is mostly with recent added, watched and voted series.

I also tested the other way with "has unwatched episodes: exclude" and "user voted (any): exclude", and I got a few series.

@revam revam self-assigned this Apr 25, 2023
@t0815
Copy link
Author

t0815 commented Oct 7, 2023

i did some messing around in the db and did notice the entries for crossref_file_episode did not match the videolocal entries. I did update them with correct hash, filename and size, then the problem was fixed. I have no clue tho, under which circumstances old invalid crossref entries remain or are not updated....

@t0815
Copy link
Author

t0815 commented Oct 7, 2023

And for the particular case above, the issue was in videolocal_user, there the resume position would be present, which seems to break the continue watching tile. EDIT: did some more digging, and this seems to be the root cause, for breaking continue watching. I found several more instances, and every time the resume position was set (> 0). So to conclude, the query to fetch next episode will return null when the resume position is set. This gets set, if you play an episode via internal MP (I believe) / use play controls in UI. This also explains the issue #627

@da3dsoul
Copy link
Member

Is this still an issue? I know you're on daily, or at least were. It's a server issue, and we've messed with that logic quite a bit

@t0815
Copy link
Author

t0815 commented Sep 23, 2024

im not on daily anymore, since quite a while tbh. Could check tho...

@da3dsoul
Copy link
Member

We're about to hit the next stable, so daily is very... Stable right now

@t0815
Copy link
Author

t0815 commented Sep 23, 2024

🤣 okee, ill try...

@t0815
Copy link
Author

t0815 commented Sep 23, 2024

meh, got error during DB migration, latest daily. I think there is a typo in the query, but not sure.

[2024-09-23 19:59:28:030] Error|Shoko.Server.Server.ShokoServer > DATABASE ERROR: 129.35 ALTER TABLE `TMDB_Movie` CHANGE COLUMN IF EXISTS `EnglishOvervie` `EnglishOverview` TEXT CHARACTER SET UTF8 NOT NULL; | MySqlConnector.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `EnglishOvervie` `EnglishOverview` TEXT CHARACTER SET UTF8 NOT NULL' at line 1
   at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 892
   at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in /_/src/MySqlConnector/Core/ResultSet.cs:line 37
   at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 130
   at MySqlConnector.MySqlDataReader.InitAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 483
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 56
   at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 309
   at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 108
   at Shoko.Server.Databases.MySQL.Execute(MySqlConnection connection, String command) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Databases\MySQL.cs:line 1151
   at Shoko.Server.Databases.MySQL.ExecuteCommand(MySqlConnection connection, String command) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Databases\MySQL.cs:line 1137: DATABASE ERROR: 129.35 ALTER TABLE `TMDB_Movie` CHANGE COLUMN IF EXISTS `EnglishOvervie` `EnglishOverview` TEXT CHARACTER SET UTF8 NOT NULL; | MySqlConnector.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `EnglishOvervie` `EnglishOverview` TEXT CHARACTER SET UTF8 NOT NULL' at line 1
   at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 892
   at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in /_/src/MySqlConnector/Core/ResultSet.cs:line 37
   at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 130
   at MySqlConnector.MySqlDataReader.InitAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 483
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 56
   at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 309
   at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 108
   at Shoko.Server.Databases.MySQL.Execute(MySqlConnection connection, String command) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Databases\MySQL.cs:line 1151
   at Shoko.Server.Databases.MySQL.ExecuteCommand(MySqlConnection connection, String command) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Databases\MySQL.cs:line 1137
[2024-09-23 19:59:28:066] Error|Shoko.Server.Utilities.Utils > Database Error
[2024-09-23 19:59:28:066] Trace|Shoko.Server.Server.ServerState > Starting Server: Start fehlgeschalgen. Bitte überprüfe die Datenbankeinstellungen.

@da3dsoul
Copy link
Member

MySQL or Maria?

@t0815
Copy link
Author

t0815 commented Sep 23, 2024

mysql. The EnglishOvervie EnglishOverview seems wrong

@da3dsoul
Copy link
Member

Looking at it

@da3dsoul
Copy link
Member

New version is building

@t0815
Copy link
Author

t0815 commented Sep 23, 2024

next sql error:

[2024-09-23 21:11:28:473] Error|Shoko.Server.Server.ShokoServer > DATABASE ERROR: 130.1 [MigrateRenamers] | NHibernate.Exceptions.GenericADOException: could not execute native bulk manipulation query:CREATE TABLE IF NOT EXISTS RenamerInstance (ID INT NOT NULL AUTO_INCREMENT, Name text NOT NULL, Type text NOT NULL, Settings mediumblob, PRIMARY KEY (ID));
ALTER TABLE RenamerInstance ADD INDEX IX_RenamerInstance_Name (Name);
ALTER TABLE RenamerInstance ADD INDEX IX_RenamerInstance_Type (Type);[SQL: CREATE TABLE IF NOT EXISTS RenamerInstance (ID INT NOT NULL AUTO_INCREMENT, Name text NOT NULL, Type text NOT NULL, Settings mediumblob, PRIMARY KEY (ID));
ALTER TABLE RenamerInstance ADD INDEX IX_RenamerInstance_Name (Name);
ALTER TABLE RenamerInstance ADD INDEX IX_RenamerInstance_Type (Type);]
 ---> MySqlConnector.MySqlException (0x80004005): BLOB/TEXT column 'Name' used in key specification without a key length
   at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 892
   at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in /_/src/MySqlConnector/Core/ResultSet.cs:line 37
   at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 130
   at MySqlConnector.MySqlDataReader.InitAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 483
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 56
   at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 309
   at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 108
   at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(DbCommand cmd)
   at NHibernate.Engine.Query.NativeSQLQueryPlan.PerformExecuteUpdate(QueryParameters queryParameters, ISessionImplementor session)
   --- End of inner exception stack trace ---
   at NHibernate.Engine.Query.NativeSQLQueryPlan.PerformExecuteUpdate(QueryParameters queryParameters, ISessionImplementor session)
   at NHibernate.Impl.SessionImpl.ExecuteNativeUpdate(NativeSQLQuerySpecification nativeQuerySpecification, QueryParameters queryParameters)
   at NHibernate.Impl.SqlQueryImpl.ExecuteUpdate()
   at Shoko.Server.Databases.MySQL.MigrateRenamers(Object connection) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Databases\MySQL.cs:line 991: DATABASE ERROR: 130.1 [MigrateRenamers] | NHibernate.Exceptions.GenericADOException: could not execute native bulk manipulation query:CREATE TABLE IF NOT EXISTS RenamerInstance (ID INT NOT NULL AUTO_INCREMENT, Name text NOT NULL, Type text NOT NULL, Settings mediumblob, PRIMARY KEY (ID));
ALTER TABLE RenamerInstance ADD INDEX IX_RenamerInstance_Name (Name);
ALTER TABLE RenamerInstance ADD INDEX IX_RenamerInstance_Type (Type);[SQL: CREATE TABLE IF NOT EXISTS RenamerInstance (ID INT NOT NULL AUTO_INCREMENT, Name text NOT NULL, Type text NOT NULL, Settings mediumblob, PRIMARY KEY (ID));
ALTER TABLE RenamerInstance ADD INDEX IX_RenamerInstance_Name (Name);
ALTER TABLE RenamerInstance ADD INDEX IX_RenamerInstance_Type (Type);]
 ---> MySqlConnector.MySqlException (0x80004005): BLOB/TEXT column 'Name' used in key specification without a key length
   at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 892
   at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in /_/src/MySqlConnector/Core/ResultSet.cs:line 37
   at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 130
   at MySqlConnector.MySqlDataReader.InitAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 483
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 56
   at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 309
   at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 108
   at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(DbCommand cmd)
   at NHibernate.Engine.Query.NativeSQLQueryPlan.PerformExecuteUpdate(QueryParameters queryParameters, ISessionImplementor session)
   --- End of inner exception stack trace ---
   at NHibernate.Engine.Query.NativeSQLQueryPlan.PerformExecuteUpdate(QueryParameters queryParameters, ISessionImplementor session)
   at NHibernate.Impl.SessionImpl.ExecuteNativeUpdate(NativeSQLQuerySpecification nativeQuerySpecification, QueryParameters queryParameters)
   at NHibernate.Impl.SqlQueryImpl.ExecuteUpdate()
   at Shoko.Server.Databases.MySQL.MigrateRenamers(Object connection) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Databases\MySQL.cs:line 991

@da3dsoul
Copy link
Member

Ok, thanks. We don't have anyone that uses MySQL on the dev team anymore, so that helps

@da3dsoul
Copy link
Member

New one is building

@t0815
Copy link
Author

t0815 commented Sep 24, 2024

in shoko-desktop the issue is still present, but in Web-UI its fixed

@da3dsoul
Copy link
Member

.... Ok. Not sure how or why

@t0815
Copy link
Author

t0815 commented Sep 24, 2024

if i remember, the query for next episodes took the value for played seconds into account. Not sure, if web-api uses same query (obviously not i guess).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants