SQL client

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #62
    esmadja
    Guest

    Is there an SQL client to query the song database? I want to check the content of the songs.db to see if that is where the problem is.
    I seem to be having problems with scanning, specifically it isn’t finding new songs that I am adding to the mp3_dir. All the old songs in an existing sub directory are there, but the new files aren’t being added. This includes after a restart of the software as well as a rescan through the admin GUI page.
    Is there a way to force a complete rescan without deleting the songs.db? Will deleting the songs.db cause any issues?

    #3345
    rpedde
    Participant

    In answer to your questions:

    1. Yes, there is a sql client. It’s called “sqlite”. You can execute arbitrary sql commands with it:


    foo@bar$ sqlite /path/to/songs.db
    sqlite> select * from songs where upper(path) like '%SOMEDIR%'

    ... rows

    sqlite> .quit

    There are also scads of graphical sqlite programs around. You can find some listed here: http://www.sqlite.org/cvstrac/wiki?p=SqliteTools

    2. Check your permissions. The files must have read permission by the “runas” user. Also, you can run mt-daapd with a “-d5” argument and a “logfile” specified in your config, and that might shed some light on what’s happening as well.

    3. Yes, you can start mt-daapd with a “-r” and that will force a rescan. Alternately, you can force rescan on individual files by setting “force_rescan” to 1 in the songs table of the db:


    foo@bar$ sqlite /path/to/songs.db
    sqlite> update songs set force_update=1 where type='m4a'
    sqlite> .quit

    4. Nope, won’t hurt anything to delete songs.db — it will recreate it.

    — Ron

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.