Difference between revisions of "WDLXTV-DB"

From WikiDLXTV
Jump to: navigation, search
(Created page with '{| align="right" | __TOC__ |} = Introduction = WDLXTV-DB was created to give developers a sqlite database on WDTV, which circumvents some limitation I found when I started exp…')
(No difference)

Revision as of 10:44, 30 December 2011

Introduction

WDLXTV-DB was created to give developers a sqlite database on WDTV, which circumvents some limitation I found when I started exploring the WD media library database (wdtv.cas). It turned out that sqlite has some issues when you try to create a database file on an NFS share. This is related to some locking problems, which can be avoided by mounting your NFS shares with the nolock option (which my NFS server didn't support).
This locking problem is also the reason why network shares are mounted read-only on WDLXTV by default, otherwise DMAOSD would create a wdtv.cas on the share and run into the same locking problem causing the Spinning Circle Of Death (SCOD).

The WDLXTV-DB feature acts like this:
It searches for a file .wdlxtv.db on your drives and xmounted shares.
If this file is found it is copied to /tmp/wdlxtv.db and a script is started which monitors periodically if /tmp/wdlxtv.db and your .wdlxtv.db file differ.
If they differ it copies /tmp/wdlxtv.db over your .wdlxtv.db file.
Your script or plugin or whatever uses the WDLXTV-DB should only access /tmp/wdlxtv.db and the watch script will mirror all your changes to .wdlxtv.db file on the drive/share.


You might ask: why so complicated?
There two main reasons:

  • /tmp is a ramdisk, so it's pretty fast
  • you circumvent the NFS problem

Enable WDLXTV-DB

-todo-

Use WDLXTV-DB

-todo-