Kodi Community Forum
Export the Bookmark - 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: Export the Bookmark (/showthread.php?tid=282808)



Export the Bookmark - bunter fisch - 2016-07-15

Hi,

sometimes i set bookmark when i watch a movie to correct some error, e.g. errors in text subs. how can i exprt the bookmark, especially the timecodes to my windows pc? the pictures of the bookmarks are saved in .kodi-folder in home directory, but not the timecodes.

bunter fisch


RE: Export the Bookmark - nickr - 2016-07-15

They'll be in the databases somewhere.


RE: Export the Bookmark - Ned Scott - 2016-07-15

If you export (wiki) NFO files, it will contain bookmark timestamps.


RE: Export the Bookmark - bunter fisch - 2016-07-16

this is not a file i've imported to the library. i've selected the file with the video button, not the film button. so there is no nfo.

but kodi must save the bookmark somewhere, even if the file wasn't imported to the library.


RE: Export the Bookmark - Ned Scott - 2016-07-17

The video DB, as nickr said. However, it won't be in an easily accessible format.


RE: Export the Bookmark - bunter fisch - 2016-10-16

(2016-07-15, 23:27)nickr Wrote: They'll be in the databases somewhere.

(2016-07-17, 01:20)Ned Scott Wrote: The video DB, as nickr said. However, it won't be in an easily accessible format.

Now i have this problem again. i've set some bookmarks but renamed the file (and i can't remember the former file name). now i don't see the bookmarks anymore.

so, where in the database can i search for the bookmarks?


RE: Export the Bookmark - scott967 - 2016-10-18

(2016-10-16, 14:30)bunter fisch Wrote: so, where in the database can i search for the bookmarks?

The bookmark table?

scott s.
.


RE: Export the Bookmark - bunter fisch - 2016-10-18

you mean the *.db-files in userdata/Database? what of that files? the biggest is "MyVideos93.db". if opened the file with notepadqq (on linux) but the most isn't readable. i can find some file name, but no bookmarks.


RE: Export the Bookmark - scott967 - 2016-10-18

Sorry, from your posts I assumed you were looking into the database. You need a program which can open and read sqlite3 databases such as MyVideos93.db. I use a Firefox browser extension but there are also installable programs to do this (such as SQLiteSpy on windows). I suppose it depends on what you intend to do with the bookmarks you export.

scott s.
.


RE: Export the Bookmark - pipal - 2017-01-15

Hi, is it possible to manually specify TV Episode bookmarks through a nfo file?

If I set-up TV Episode bookmarks through the GUI are they exported to .nfo files? This post suggests they aren't. Thank you.


RE: Export the Bookmark - Pantsenu - 2017-01-16

lo

http://kodi.wiki/view/NFO_files/tvepisodes

<epbookmark>


RE: Export the Bookmark - virtual__ - 2021-02-12

(2016-07-15, 23:12)bunter fisch Wrote: how can i exprt the bookmark, especially the timecodes to my windows pc?

For everyone like the OP and me that are still looking for a way to see the time code of the bookmarks saved in Kodi, just look for the database as Scott said.
It's located in .kodi/userdata/Database (on Android, the folder is Android/data/org.xbmc.kodi/files/.kodi/userdata/Database) and copy the MyVideos*.db (that one with the higher number) into your PC.

Then, with a sqlite client, run this query:
sql:
.mode box

SELECT (strPath || strFilename) AS LastPlayedFile,
time(timeInSeconds, 'unixepoch') AS BookmarkPosition,
timeInSeconds AS BookmarkPositionSeconds,
lastPlayed AS LastPlayedDate
FROM files
INNER JOIN bookmark ON files.idFile = bookmark.idFile
INNER JOIN path ON files.idPath = path.idPath
WHERE bookmark.type = 0
ORDER BY lastPlayed DESC
LIMIT 100;

... and you'll get a list of your recently played stuff with the bookmarks positions (also in HH:MM:SS format).
Hope this helps someone!


RE: Export the Bookmark - scott967 - 2021-02-14

Thanks for that.  For anyone interested, I wrote a little python3 script that will export the bookmarks for movies (only) that are watched (no resume bookmark in the database) to text files that are placed in the movie's folder.  The text file is formatted as a chapter file that can be muxed into an mkv file using mkvmerge.  Due to what seems to be a Kodi issue with chapters, it creates a chapter always at time 00:00:00.  (Kodi can then read the chapters and skin can display some chapter info).

Note that the path to the database is hard-coded into the variable "database"

I can't provide support for this script, but feel free to use it as a starting point if interested.  Note that this is for the default sqlite database, not Mariadb or other centralized database.

https://pastebin.com/7WRKJdCC

scott s.
.