Kodi Community Forum

Full Version: How can I preserve bookmarks when moving bookmarked videos to a different hard drive
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a number of bookmarked video files that I want to move to another hard drive. Problem is that they will lose their bookmarks when their file path changes.

Anybody know a fix for this problem?
Not a fix, but a solution.

Do a full Video Library Export, while having enabled the import watch status and resume points settings in your advancedsettings.xml file. It will create .nfo files next to your videos and those will contain the necessary values.

Create new source(s), set the content, import your video collection (containing the nfo files).
If you are referring to these types of bookmarks, then they cannot be saved... https://kodi.wiki/view/Bookmarks_and_chapters
(2019-11-02, 20:30)Klojum Wrote: [ -> ]Not a fix, but a solution.

Do a full Video Library Export, while having enabled the import watch status and resume points settings in your advancedsettings.xml file. It will create .nfo files next to your videos and those will contain the necessary values.

Create new source(s), set the content, import your video collection (containing the nfo files).

Thanks very much! I am using Kodi on a Minix with the Confluence skin. It doesn't seem to support the functionality you're suggesting. I must be missing something? I'm a retired Micrfosoft developer, but new to Android.
(2019-11-02, 21:56)BobMcK Wrote: [ -> ]Thanks very much! I am using Kodi on a Minix with the Confluence skin. It doesn't seem to support the functionality you're suggesting. I must be missing something? I'm a retired Micrfosoft developer, but new to Android.

System -> Media -> Library -> Export Library.  Should give you options as to what to export and how.  You want 'Separate files' to create .nfo files next to your media. Then follow this link -> https://kodi.wiki/view/Advancedsettings....deolibrary to see how to add the required stuff to the advancedsettings.xml file to import the watched status and resume status.

Hint - Scroll to the top of the page to see how to create that file as it doesn't exist by default.

Note - Import will always prefer the .nfo files over online info.
(2019-11-02, 21:56)BobMcK Wrote: [ -> ]It doesn't seem to support the functionality you're suggesting
(2019-11-02, 22:09)black_eagle Wrote: [ -> ]System -> Media -> Library -> Export Library.  Should give you options as to what to export and how.  You want 'Separate files' to create .nfo files next to your media. Then follow this link -> https://kodi.wiki/view/Advancedsettings....deolibrary to see how to add the required stuff to the advancedsettings.xml file to import the watched status and resume status.

Do the advancedsettings.xml settings first... Reboot/restart Kodi to activate those settings... Then do the Video Library export.
(2019-11-02, 21:23)Karellen Wrote: [ -> ]If you are referring to these types of bookmarks, then they cannot be saved... https://kodi.wiki/view/Bookmarks_and_chapters

So if I create an advancedsettings.xml file (say, using an xml editor)  and set the suggested values, I can export the data, but there is no way to re-import it once I've modified it? Am I understanding you correctly? Anybody want to comment?
I don't think there is any way to do it.  The framegrab that is taken when you set a bookmark is stored in the userdata thumbnail folder under Video/Bookmarks but no way to reset the links in the database after moving the video files (that I have found).  I wrote a little python script that extracts the bookmarks from the data base to a txt file, but I use that to create Mastroka chapters rather than try to re-import them  (and Kodi has an option to take a framegrab at the chapter points).  Of course that's only useful if the bookmarks have lasting use.  If it's just to resume watching, then Kodi export/import will save the resume bookmark (1 per file obviously).

scott s.
.
(2019-11-04, 17:50)scott967 Wrote: [ -> ]  I wrote a little python script that extracts the bookmarks from the data base to a txt file

That sounds awesome, just what I need.
I have used the bookmarks to mark the start of shows in recorded tv streams so having the bookmark times in a txt file would help me cut the ts files on another device.

Would you mind sharing your script or pointing me into the right direction where to find the right parameters for querying these bookmarks?
Unable to do this in python, here's how to get the relevant information in an SQL query for dummies like myself:
sql:
SELECT bookmark.timeInSeconds, bookmark.totalTimeInSeconds, files.strFilename, bookmark.thumbNailImage
FROM bookmark, files
WHERE bookmark.idFile = files.idFile AND files.strFilename NOT LIKE 'plugin%'
Kodi 18.9

Wrapped in a little HTML, this results in a list including preview pictures that is going to help me to cut the videos and get rid of commercial breaks.