• 1
  • 27
  • 28
  • 29(current)
  • 30
  • 31
  • 35
Release WatchedList - service to automatically save/restore watched state
(2021-03-21, 10:22)schapplm Wrote:
(2021-03-20, 21:24)samsquanche Wrote: That did it. I suggest you add something to the instruction page.

Since I do not use MariaDB myself, I rather do not add something in that matter myself.
You can feel free to edit the wiki. Perhaps add a section "MariaDB" after the current " 2.4.1 MySQL" and add a section "Manually create the MariaDB database" after the current "2.4.3 Conversion from SQLite database to mysql database".

Actually for this the API for mysql and mariadb will be identical and type issues I faced would also happen with mysql as the types used for id's when using sqlite are integers but you use text with a full sql database. That's why I was suggesting the correction.

Cheers
Reply
(2021-03-25, 22:11)samsquanche Wrote: Actually for this the API for mysql and mariadb will be identical and type issues I faced would also happen with mysql as the types used for id's when using sqlite are integers but you use text with a full sql database. That's why I was suggesting the correction.

I still do not get the MySQL / MariaDB issue. The SQL code you posted is identical to the queries I use in the source code to initially create the database. According to your statement, "that did it". So no need to change anything?
In your first post, you replace the types timestamp, tinyint, smallint and int with INTEGER.
Does this mean some versions of MariaDB/MySQL do not support these types? My intention when writing the code was that timestamp is much easier to read in manually inspection (e.g. using phpMyAdmin).
Using tinyint and smallint eventually reduces the space of the database (although perhaps not significantly). Generally, I would take the type with the least size that is able to contain the data.
Reply
(2021-03-27, 09:43)schapplm Wrote:
(2021-03-25, 22:11)samsquanche Wrote: Actually for this the API for mysql and mariadb will be identical and type issues I faced would also happen with mysql as the types used for id's when using sqlite are integers but you use text with a full sql database. That's why I was suggesting the correction.

I still do not get the MySQL / MariaDB issue. The SQL code you posted is identical to the queries I use in the source code to initially create the database. According to your statement, "that did it". So no need to change anything?
In your first post, you replace the types timestamp, tinyint, smallint and int with INTEGER.
Does this mean some versions of MariaDB/MySQL do not support these types? My intention when writing the code was that timestamp is much easier to read in manually inspection (e.g. using phpMyAdmin).
Using tinyint and smallint eventually reduces the space of the database (although perhaps not significantly). Generally, I would take the type with the least size that is able to contain the data.
Hi again,
Sorry for the delay, very busy with school.
So when exporting the SQLite database with SQLite database browser it will prepare for another SQLite database with this at the beginning of the sql script:
SQL:

BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "movie_watched" (
    "idMovieImdb"    INTEGER,
    "playCount"    INTEGER,
    "lastChange"    INTEGER,
    "lastPlayed"    INTEGER,
    "title"    TEXT,
    PRIMARY KEY("idMovieImdb")
);
CREATE TABLE IF NOT EXISTS "episode_watched" (
    "idShow"    INTEGER,
    "season"    INTEGER,
    "episode"    INTEGER,
    "playCount"    INTEGER,
    "lastChange"    INTEGER,
    "lastPlayed"    INTEGER,
    PRIMARY KEY("idShow","season","episode")
);
CREATE TABLE IF NOT EXISTS "tvshows" (
    "idShow"    INTEGER,
    "title"    TEXT,
    PRIMARY KEY("idShow")
);
...
Which I changed to the following after having issues and looking at your source on GitHub:
SQL:

CREATE TABLE IF NOT EXISTS `movie_watched` (
    `idMovieImdb` int unsigned NOT NULL,
    `playCount` tinyint unsigned DEFAULT NULL,
    `lastChange` timestamp NULL DEFAULT NULL,
    `lastPlayed` timestamp NULL DEFAULT NULL,
    `title` text,
    PRIMARY KEY (`idMovieImdb`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `episode_watched` (
    `idShow` int unsigned NOT NULL DEFAULT '0',
    `season` smallint unsigned NOT NULL DEFAULT '0',
    `episode` smallint unsigned NOT NULL DEFAULT '0',
    `playCount` tinyint unsigned DEFAULT NULL,
    `lastChange` timestamp NULL DEFAULT NULL,
    `lastPlayed` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`idShow`,`season`,`episode`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tvshows` (
    `idShow` int unsigned NOT NULL,
    `title` text,
    PRIMARY KEY (`idShow`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
There is no issues with your add-on, just the Conversion from SQLite database to mysql database documentation.
Cheers
Reply
Hello All,
I hope someone can help, I’ve installed watchedlist on 2 of my raspberry Pi 4’s using MySQL. It all seeems to work as it should however I have certain tv shows that will not sync to the other Pi. For example i have 19 episodes watched on the main tv but zero on the 2nd tv. It only seems to be 1 tv show. Everything is set up the same. Any help would be great. 
thanks
Reply
(2021-02-14, 09:58)schapplm Wrote:
(2021-02-11, 17:27)hans.olo Wrote: Well this happens every day and to make the sync work again I need to restart Kodi. Otherwise it will not track what has been watched.
Are you the author of the add-on? Why wouldn't the addon reconnect when the connection has broken? lets say give up after 3 unsuccessful reconnect retries..
Well, this is not a dedicated design decision, but seems to present an error that did not come up when testing the mySQL feature. I added an issue on GitHub. Can you be more specific? Does this happen in the mode "watch user changes", or after performing a full update of the whole database in the periodic mode?
Sorry for my late response, haven't stopped by for some time.

I have enabled "watch user changes", this is error occurs soon after finishing watching a movie or a episode, when the addon tries to update the watched status of the movie/episode.
Reply
(2021-04-11, 09:49)Deewhy Wrote: I’ve installed watchedlist on 2 of my raspberry Pi 4’s using MySQL. It all seeems to work as it should however I have certain tv shows that will not sync to the other Pi. For example i have 19 episodes watched on the main tv but zero on the 2nd tv. It only seems to be 1 tv show. Everything is set up the same. Any help would be great. 
A cause for the problem could be that the tv show is scraped with two different providers like thetvdb and themoviedb on each of the devices. In that case, the stored unique identifier of the show is different and the addon can not combine the information. This is a known issue, which is not solved yet (and will not be in the near future).
Reply
(2021-04-15, 17:59)schapplm Wrote:
(2021-04-11, 09:49)Deewhy Wrote: I’ve installed watchedlist on 2 of my raspberry Pi 4’s using MySQL. It all seeems to work as it should however I have certain tv shows that will not sync to the other Pi. For example i have 19 episodes watched on the main tv but zero on the 2nd tv. It only seems to be 1 tv show. Everything is set up the same. Any help would be great. 
A cause for the problem could be that the tv show is scraped with two different providers like thetvdb and themoviedb on each of the devices. In that case, the stored unique identifier of the show is different and the addon can not combine the information. This is a known issue, which is not solved yet (and will not be in the near future).
Thank you for the reply, unfortunately this is not the issue. All have been scrapped using thetvdb. 
I have multiple tv shows doing the same thing. The MySQL database is fine the watched show appears straight after, however the Kodi doesn’t pick up the info next time watchedlist is run. Any other ideas.?
Reply
(2021-04-17, 00:34)Deewhy Wrote:
(2021-04-15, 17:59)schapplm Wrote:
(2021-04-11, 09:49)Deewhy Wrote: I’ve installed watchedlist on 2 of my raspberry Pi 4’s using MySQL. It all seeems to work as it should however I have certain tv shows that will not sync to the other Pi. For example i have 19 episodes watched on the main tv but zero on the 2nd tv. It only seems to be 1 tv show. Everything is set up the same. Any help would be great. 
A cause for the problem could be that the tv show is scraped with two different providers like thetvdb and themoviedb on each of the devices. In that case, the stored unique identifier of the show is different and the addon can not combine the information. This is a known issue, which is not solved yet (and will not be in the near future).
Thank you for the reply, unfortunately this is not the issue. All have been scrapped using thetvdb. 
I have multiple tv shows doing the same thing. The MySQL database is fine the watched show appears straight after, however the Kodi doesn’t pick up the info next time watchedlist is run. Any other ideas.?
I just noticed in my MySQL database a lot of shows are duplicated with different ID numbers. I guess this has something to do with my problem. Any idea why this would happen when all have been scrapped using the thetvdb?
Reply
(2021-04-17, 00:44)Deewhy Wrote: I just noticed in my MySQL database a lot of shows are duplicated with different ID numbers. I guess this has something to do with my problem. Any idea why this would happen when all have been scrapped using the thetvdb?
What do you mean by ID? The unique identifier referring to tvdb or tmdb? Or just the mySQL row index?
If it is the former: Do the IDs match to the different information providers? So can you create a connection of all the IDs to e.g. the id of tvdb?
Reply
(2021-04-17, 08:33)schapplm Wrote:
(2021-04-17, 00:44)Deewhy Wrote: I just noticed in my MySQL database a lot of shows are duplicated with different ID numbers. I guess this has something to do with my problem. Any idea why this would happen when all have been scrapped using the thetvdb?
What do you mean by ID? The unique identifier referring to tvdb or tmdb? Or just the mySQL row index?
If it is the former: Do the IDs match to the different information providers? So can you create a connection of all the IDs to e.g. the id of tvdb?

I’m not that good at all this, but I think I am sorted. I must have somehow scrapped under two different sources, I have basically deleted everything and started again on all off my pi’s and it seems now it’s all good. 
thank you to the reply’s these did show me the way.
Reply
Hello

I have made a clean new install on a Raspberry pi 4 with libreelec 9.95.1 and have installed the the watchedlist app. The file is stored on my Server and is running since a couple of years perfectly. But somehow the movies on the new Raspberry arent marked as watched when I run the app. Everything seems to be okay with the configuration and the app doesnt give any error message.

Any ideas?
Reply
(2021-04-14, 20:08)hans.olo Wrote:
(2021-02-14, 09:58)schapplm Wrote:
(2021-02-11, 17:27)hans.olo Wrote: Well this happens every day and to make the sync work again I need to restart Kodi. Otherwise it will not track what has been watched.
Are you the author of the add-on? Why wouldn't the addon reconnect when the connection has broken? lets say give up after 3 unsuccessful reconnect retries..
Well, this is not a dedicated design decision, but seems to present an error that did not come up when testing the mySQL feature. I added an issue on GitHub. Can you be more specific? Does this happen in the mode "watch user changes", or after performing a full update of the whole database in the periodic mode?
Sorry for my late response, haven't stopped by for some time.

I have enabled "watch user changes", this is error occurs soon after finishing watching a movie or a episode, when the addon tries to update the watched status of the movie/episode.
@schapplm any thoughts on this? Any thing I can do from configuration side or a bug?
Reply
Some users previously have reported problems regarding datetime values:
(2020-10-14, 20:13)CaptainTivo Wrote: [...] (22007): Incorrect datetime value [...]
There were two fixes that were rather workarounds requiring manual editing of the mySQL database:
(2019-08-08, 09:53)HeresJohnny Wrote: That seems to have fixed it, thanks!
(2017-09-20, 14:22)raymondjpg Wrote: Error: Writing the WL-database file (1292 (22007): Incorrect datetime value: '1970-01-01 11:00:00' for column 'lastPlayed' at row 160)
EDIT: I was able to resolve the issue [...]
There now is a patch on github created by fabquenneville.
Can someone who encounters the problem test this? You can either download the code via zip file or via Git. The code is based on the Kodi 19 version of the addon.
In my test case of time zone UTC+2 (Europe) the result was still unclear.
Reply
Just wanted to say thank you very much for this addon.

I needed to remove a bunch of incorrect self created genres which I was able to do myself and this addon enabled me not to loose my watched status across thousands of movies and hundreds of tv shows as I had to rescrape my sources.

Great tool, thanks again and cheers.
Confusion is just a state of mind.
Reply
Hi,

I am using version 1.3.3 on LE 10 and I have the DB Method set to "File" and "Number of Backups" set to 3. The addon is not creating any new backups as it did under Leia. I had the same settings, but ut always created 3. Also, it is not creating any new backups, unless I run it manually. I cannot ever remember setting any update intervals on the Leia version, as per my settings in the settings.xml file.

Thanks,

Shedrock
Reply
  • 1
  • 27
  • 28
  • 29(current)
  • 30
  • 31
  • 35

Logout Mark Read Team Forum Stats Members Help
WatchedList - service to automatically save/restore watched state3