Add-on:WatchedList: Difference between revisions
m (Addon-Bot Update) |
m (Addon-Bot repo category update) |
||
(33 intermediate revisions by 4 users not shown) | |||
Line 3: | Line 3: | ||
|provider-name=schapplm | |provider-name=schapplm | ||
|ID=service.watchedlist | |ID=service.watchedlist | ||
|latest-version=1. | |latest-version=1.3.7 | ||
|extension point=xbmc.python.script | |extension point=xbmc.python.script | ||
|provides=executable | |provides=executable | ||
Line 13: | Line 13: | ||
|Platform=all | |Platform=all | ||
|Language= | |Language= | ||
|License= | |License=GPL-2.0-or-later | ||
|Forum=https://forum.kodi.tv/showthread.php?tid=164652 | |Forum=https://forum.kodi.tv/showthread.php?tid=164652 | ||
|Website=https://kodi.wiki/view/Add-on:WatchedList | |Website=https://kodi.wiki/view/Add-on:WatchedList | ||
Line 19: | Line 19: | ||
|Email= | |Email= | ||
|broken= | |broken= | ||
|icon url=http://mirrors.kodi.tv/addons/ | |icon url=http://mirrors.kodi.tv/addons/omega/service.watchedlist/icon.png}} | ||
== Setup == | == Setup == | ||
Line 33: | Line 33: | ||
# Follow user ...: Run in background and update the WatchedList database every time the user changes a watched state (from unwatched to watched and vice versa). Marking something as "unwatched" is only possible with this setting. | # Follow user ...: Run in background and update the WatchedList database every time the user changes a watched state (from unwatched to watched and vice versa). Marking something as "unwatched" is only possible with this setting. | ||
# Progress dialog: Show a progress bar for every full update. No user interaction possible during the update (can take a few minutes, depending on verbosity and amount of changes and size of database), but it is possible to abort the whole process. | # Progress dialog: Show a progress bar for every full update. No user interaction possible during the update (can take a few minutes, depending on verbosity and amount of changes and size of database), but it is possible to abort the whole process. | ||
# Amount of User Information ("verbosity"): Determines, for which events a notification will be shown. This is independent from [[ | # Amount of User Information ("verbosity"): Determines, for which events a notification will be shown. This is independent from [[Log file|debug logging]]. Options: ''all'' (notification for updates of every single movie and episode), ''only info'' (default, only notification for major steps of the update process, ''only warning'', ''only error'', ''none'' (show no notifications at all) | ||
[[File:service_watchedlist_doc_settings_basic.jpg|500px|Basic Settings]] | [[File:service_watchedlist_doc_settings_basic.jpg|500px|Basic Settings]] | ||
Line 46: | Line 46: | ||
# Dropbox synchronization: Saves your WatchedList database in your dropbox (should take max. 1MB space). If you enable this option, the [[Add-on:Dropbox|Dropbox authorization process]] will be started. If this option is activated with the same Dropbox account on several clients, it is possible to share the WatchedList database via the Dropbox. | # Dropbox synchronization: Saves your WatchedList database in your dropbox (should take max. 1MB space). If you enable this option, the [[Add-on:Dropbox|Dropbox authorization process]] will be started. If this option is activated with the same Dropbox account on several clients, it is possible to share the WatchedList database via the Dropbox. | ||
# Dropbox Auth Code: This will has to be inserted after the Dropbox authorization process (see above). | # Dropbox Auth Code: This will has to be inserted after the Dropbox authorization process (see above). | ||
# MySQL: IP- | # MySQL: IP-address of the Server. Make sure, there is a mysql server running. To start, use [MySQL/Setting_up_MySQL this] guide. | ||
# MySQL: 3306 is the default mysql port. No need to change it. | # MySQL: 3306 is the default mysql port. No need to change it. | ||
# MySQL: Name of the database. You manually need to create this database on the mysql server (use phpMyAdmin) | # MySQL: Name of the database. You manually need to create this database on the mysql server (use phpMyAdmin) | ||
Line 55: | Line 55: | ||
[[File:service_watchedlist_doc_settings_database.jpg|500px|Basic Settings]] | [[File:service_watchedlist_doc_settings_database.jpg|500px|Basic Settings]] | ||
=== | === Usage === | ||
This addon runs in the background as a service. There is no interaction with the user. The script only gives messages about the current operation | This addon runs in the background as a service. There is no interaction with the user. The script only gives messages about the current operation | ||
Line 133: | Line 133: | ||
* Online List of watched movies | * Online List of watched movies | ||
::* [[Add-on:Trakt|Trakt Addon]] | ::* [[Add-on:Trakt|Trakt Addon]] | ||
::* [https://github.com/watchedsyncforkodi/service.watchedsync watchedsync (in development)] | |||
::* [https://forum.kodi.tv/showthread.php?tid=128542 Follw-It Addon] (Last update April 2012, probably not working any more) | ::* [https://forum.kodi.tv/showthread.php?tid=128542 Follw-It Addon] (Last update April 2012, probably not working any more) | ||
* Addon that exports the watched-state to the nfo files of the movies | * Addon that exports the watched-state to the nfo files of the movies | ||
Line 141: | Line 142: | ||
::* http://forum.kodi.tv/showthread.php?tid=129448&pid=1401643#pid1401643 (not working any more) | ::* http://forum.kodi.tv/showthread.php?tid=129448&pid=1401643#pid1401643 (not working any more) | ||
* Export watched flag in nfo file and Import it back again: | * Export watched flag in nfo file and Import it back again: | ||
::* [[ | ::* [[Advancedsettings.xml]] Section: Video Library | ||
== Feedback and Discussion == | == Feedback and Discussion == | ||
Line 152: | Line 153: | ||
[[Category:All add-ons]] | [[Category:All add-ons]] | ||
[[Category:Program add-ons]] | [[Category:Program add-ons]] | ||
[[Category:Helix add-on repository]] | |||
[[Category:Isengard add-on repository]] | |||
[[Category:Jarvis add-on repository]] | |||
[[Category:Krypton add-on repository]] | [[Category:Krypton add-on repository]] | ||
[[Category:Leia add-on repository]] | |||
[[Category:Matrix add-on repository]] | [[Category:Matrix add-on repository]] | ||
[[Category: | [[Category:Nexus add-on repository]] | ||
[[Category: | [[Category:Omega add-on repository]] | ||
Latest revision as of 20:12, 11 April 2024
WatchedList | ||||||||||||||||
|
Add-ons | WatchedList |
Need help with this add-on? See here. |
Export: Searches the Kodi-Database for watched files. Determine imdb-id and thetvdb-id to identify movies and TV-episodes. Then save the list to a new independent table.
Import: Set the watched state for each video file in Kodi.
Automatic background process without user interaction.
Installing
This add-on is installed from the Add-on browser located in Kodi as follows:
- Settings
- Add-ons
- Install from repository
- Program Add-ons
- WatchedList
- Install
Setup
Basic Settings
- Update watched state of movies
- Update watched state of episodes
- Autorun: starts with Kodi after a delay time of x minutes.
- Startup delay (see above x). Set the delay time to not disturb directly at startup.
- Autostart mode: 'one update' only does one full update of the watchedlist and then quits. 'periodic' executes this update in the interval given below. 'no update' does no full update. You have the possibility to run WatchedList in background.
- Update interval (active if set to 'periodic' above)
- Follow user ...: Run in background and update the WatchedList database every time the user changes a watched state (from unwatched to watched and vice versa). Marking something as "unwatched" is only possible with this setting.
- Progress dialog: Show a progress bar for every full update. No user interaction possible during the update (can take a few minutes, depending on verbosity and amount of changes and size of database), but it is possible to abort the whole process.
- Amount of User Information ("verbosity"): Determines, for which events a notification will be shown. This is independent from debug logging. Options: all (notification for updates of every single movie and episode), only info (default, only notification for major steps of the update process, only warning, only error, none (show no notifications at all)
Database Settings
- DB Method: Either use a SQLite db file or a mysql server for the database of this addon. The default setting is a local SQLite db file. This is suitable for backup of the local watched states in case of file movements or Kodi database cleaning.
- DB File: Use a non-default database file (not in [...]/userdata/addon_data/service.watchedlist)
- DB File: Path to the database-file. To add a network path for access from multiple clients you can browse the path in Kodi or edit this value manually in the "%appdata%\Kodi\userdata\addon_data\service.watchedlist\settings.xml".
- DB File: Filename of the database (SQLite .db file)
- DB File: Create a zip backup copy (ca. 40 KB) of the database (ca 100 KB) each time before writing it. Set the number of backup files with this option. With this you can restore any state you want, e.g. when you mess with your kodi-database and too much media is marked as watched. You can set this to infinite number of backups (option -1) to make sure, but this will fill your disk over the years.
- Dropbox synchronization: Saves your WatchedList database in your dropbox (should take max. 1MB space). If you enable this option, the Dropbox authorization process will be started. If this option is activated with the same Dropbox account on several clients, it is possible to share the WatchedList database via the Dropbox.
- Dropbox Auth Code: This will has to be inserted after the Dropbox authorization process (see above).
- MySQL: IP-address of the Server. Make sure, there is a mysql server running. To start, use [MySQL/Setting_up_MySQL this] guide.
- MySQL: 3306 is the default mysql port. No need to change it.
- MySQL: Name of the database. You manually need to create this database on the mysql server (use phpMyAdmin)
- MySQL: Username. This user must exist and have all necessary permissions on the database set before
- MySQL: password for this user.
Usage
This addon runs in the background as a service. There is no interaction with the user. The script only gives messages about the current operation
- After Startup, the databases are searched for watched-information (Notification 1).
- Then newly watched movies and tv episodes are written to the addon database (Notification 2).
- After that, media that is not watched in the Kodi database and was previously marked as watched by the addon is again marked as watched in Kodi ( Notifications 3 and 4).
Database
MySQL Database
The mySQL database stores all relevant information. It looks like this:
For the description of the tables read below.
SQLite Database file
This Kodi Addon creates a SQLite database file called watchedlist.db by default. I recommend using the mySQL database instead, but both methods work well (see addon settings above).
To view the database you can use the Windows Tool SQLite Database Browser or the Linux Tool sqliteman. The file is by default located in %APPDATA%\Kodi\userdata\addon_data\service.watchedlist\watchedlist.db in Windows or ~/.kodi/userdata/addon_data/service.watchedlist/watchedlist.db in Linux.
This first figure shows the SQLite db file with automatically created backup copies.
The database (here opened with SQLite DB Browser) has three tables.
The first table stores the watched movies by imdb-number. The title column is only for easier user access to the table.
The second table stores watched tv episodes with unique number for the TV Show (this field is called imdbnumber in Kodi, but this is the TheTVDB number). The names of the tv shows are stored in a third table, only for better readability.
Conversion from SQLite database to mysql database
In Version 1.0.0 of this addon, the possibility to use a mysql database was added. This has a few advantages over the SQLite Database file:
- simultaneous access possible
- mysql handles all the database access, therefore no permanent backup copying necessary
- no filesystem access in the addon. Should lead to fewer errors
How to convert the database from SQLite db file to mysql:
- open the old database file in SQLite database browser
- File -> Export -> Database to sql file
- bring this into the new format. For Replacement, I used Notepad++ in Windows:
- Replace regular expression
"INSERT INTO `movie_watched` VALUES \((\d+),(\d+),(\d+),(\d+),"
with"INSERT IGNORE INTO `movie_watched` VALUES \((\1),(\2),FROM_UNIXTIME\((\3)\),FROM_UNIXTIME\((\4)\),"
- Replace regular expression
"INSERT INTO `episode_watched` VALUES \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)"
with"INSERT IGNORE INTO `episode_watched` VALUES \((\1),(\2),(\3),(\4),FROM_UNIXTIME\((\5)\),FROM_UNIXTIME\((\6)\)\)"
- The exact character sequence regarding white-spaces or backticks can be different between versions of the SQLite tool and might need adaptation
- Replace regular expression
- Save this new sql file
- execute the commands in the "INSERT"-commands in the sql query interface in phpmyadmin after the tables were generated at the first start of the watchedlist addon with mysql option enabled.
Technical Details
The Kodi Database is queried and updated with JSON-RPC. It should not matter whether you use Kodi mysql or Kodi local database.
Limitations
The watched-status is only stored based on imdb/thetvdb number. Different Versions of a movie (DVD, BlueRay, Extended Edition, Directors Cut) are all considered equally watched.
Alternatives
- Online List of watched movies
- Trakt Addon
- watchedsync (in development)
- Follw-It Addon (Last update April 2012, probably not working any more)
- Addon that exports the watched-state to the nfo files of the movies
- separate script to scan Kodi library (probably not executable from within Kodi and not working any more)
- other similar addons
- http://forum.kodi.tv/showthread.php?tid=129448&pid=1401643#pid1401643 (not working any more)
- Export watched flag in nfo file and Import it back again:
- Advancedsettings.xml Section: Video Library
Feedback and Discussion
In case of errors or questions, please post them in the forum thread.