Kodi Community Forum
[SOLVED] Mark All Unwatched Videos as Watched - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: [SOLVED] Mark All Unwatched Videos as Watched (/showthread.php?tid=140776)



[SOLVED] Mark All Unwatched Videos as Watched - Firas.AlShafei - 2012-09-18

I couldn't find a solution for this online so i figured i would put something together.

Watched information is stored in the xbmc video database MyVideos60.db. The database location depends on your operating system:
Quote:Android_____: Android/data/org.xbmc.xbmc/files/.xbmc/userdata/
iOS/ATV2___: /private/var/mobile/Library/Preferences/XBMC/userdata/
Linux_______: $HOME/.xbmc/userdata/
Mac OS X___: /Users/<your_user_name>/Library/Application Support/XBMC/userdata/
Windows 7__: Users\%userprofile%\AppData\Roaming\XBMC\userdata\
Windows XP_: Documents and Settings\%userprofile%\Application Data\XBMC\userdata\

To modify this database we need to use a database management program, I use SQLiteSpy, a small (free!) program.
I will be using SQL commands to modify the database so any compatible program can be used in its place.

I'm going to modify the database to set the playCount and lastPlayed values only if they are blank (unwatched). This will maintain the play count and last played values of videos I have already watched.

Instructions:
  1. Copy MyVideos60.db to your local PC, this can be done using WinSCP if you're running xbmc on linux.
  2. Open the database using SQLitespy. File -> Open Database -> Browse to MyVideos60.db
  3. Double click the files table.
  4. Paste the following SQL commands into the sql window
    • Code:
      update files set playCount=1 where playCount is NULL;
      update files set lastPlayed='2012-01-01 12:00:00' where lastPlayed is NULL;
  5. Press F9 to run the SQL commands.
  6. Verify the changes in the table.
  7. Copy MyVideos60.db back to the userdata folder in xbmc.
  8. Might need to restart xbmc.

This is how it would look like before the change:
Image

After the change:
Image

Hope that helps someone Smile If this helps you please up my reputation, it suffered the wrath of X3lectric



RE: [SOLVED] Mark All Unwatched Videos as Watched - Martijn - 2012-09-18

easier would be to use the context menu on a video source and mark as watched Wink


RE: [SOLVED] Mark All Unwatched Videos as Watched - Firas.AlShafei - 2012-09-18

(2012-09-18, 05:09)Martijn Wrote: easier would be to use the context menu on a video source and mark as watched Wink

Depends on the situation. I reinstalled xbmc and had a few thousand episodes and movies, just didn't really want to go through them all manually.
More information never hurt Smile


RE: [SOLVED] Mark All Unwatched Videos as Watched - Martijn - 2012-09-18

(2012-09-18, 05:14)Firas.AlShafei Wrote:
(2012-09-18, 05:09)Martijn Wrote: easier would be to use the context menu on a video source and mark as watched Wink

Depends on the situation. I reinstalled xbmc and had a few thousand episodes and movies, just didn't really want to go through them all manually.
More information never hurt Smile

I didn't mean on each and every one. Just on the entire source


RE: [SOLVED] Mark All Unwatched Videos as Watched - Lappskij - 2015-03-24

(2012-09-18, 05:56)Martijn Wrote:
(2012-09-18, 05:14)Firas.AlShafei Wrote:
(2012-09-18, 05:09)Martijn Wrote: easier would be to use the context menu on a video source and mark as watched Wink

Depends on the situation. I reinstalled xbmc and had a few thousand episodes and movies, just didn't really want to go through them all manually.
More information never hurt Smile

I didn't mean on each and every one. Just on the entire source

Sorry.. but there is no option on the main Source if Movies is the main folder added to source and all Movies have their folders inside that folder


RE: [SOLVED] Mark All Unwatched Videos as Watched - UserInterface - 2015-10-07

thanks!!

Still works perfectly


RE: [SOLVED] Mark All Unwatched Videos as Watched - RayNA - 2022-03-27

Thanks so much, and it still works in 2022... Nod