Kodi Community Forum

Full Version: [SOLVED] Mark All Unwatched Videos as Watched
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
easier would be to use the context menu on a video source and mark as watched Wink
(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
(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
(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
thanks!!

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