From Athenaeum
Revision as of 01:13, 29 February 2020 by James8562 (talk | contribs) (SQL Queries)

Jump to: navigation, search

General FAQ

In order for xbmc to mount NFS shares they must be exported "insecure".

  • To do this is freenas/nas4free you add mountd_flags="-n" to rc.conf.
  • To do this in linux you simply add "insecure" to the exports file.

The following packages typically need to be held to avoid accidental DB schema updates.

aptitude hold kodi kodi-bin kodi-pvr-hts kodi-pvr-tvheadend-hts

To confirm they have been held.

apt-mark showhold

To unhold them.

apt-mark unhold kodi kodi-bin kodi-pvr-hts kodi-pvr-tvheadend-hts

Version Upgrade

  1. Create a kodi$VERSION user account such as kodi18 and give this user full permissions to the future schemas via "schemas that match this pattern"
  2. Grant the new user select rights to the old databases
  3. Reduce the old user's permissions to select rights so that nobody can start an old kodi client and modify the database
  4. Before starting the new version of Kodi for the first time run:
    SET GLOBAL log_bin_trust_function_creators = 1;
    to avoid "ERROR: SQL: Undefined MySQL error: Code (1419)". Make sure to set it back to 0 when the upgrade is complete.

Intel Driver Install

The Intel drivers (graphics among many other things) can be installed via the Intel driver installer GUI program located here
1. You'll want to download the most recent deb labeled something like Intel(R) Graphics Installer X.X.X for Linux
2. Once downloaded run intel-linux-graphics-installer to install the intel installer agent
3. From a GUI session and as root run the installer agent which will then install all of the required drivers

Troubleshooting: If you get an error about a method driver, you'll need to install apt-transport-https

Minimal Ubuntu

Follow this guide.


When starting from a minimal cd install you'll need the following

snapd ubuntu-core-launcher x-screensaver x-screensave-data
software-properties-gtk network-manager pavucontrol

Starting on Boot


NOTE: Kodi now does this automatically in 16.04+ as part of lightdm - see below

In order to start xbmc on boot you'll need the following script

# xbmc-standalone
description "Autostart XBMC"

start on (filesystem and stopped udevtrigger)
stop on runlevel [06]

console output
emits starting-x

su xbmc -c "xinit /usr/bin/xbmc-standalone"
end script

Minimal LightDM

(Last updated as of 16.04)

There are three packages you'll need to install without recommends: xorg, lightdm and lightdm-gtk-greeter. Then edit or create the files below.



The below file should be created automatically but if not add it.


[Desktop Entry]
Comment=This session will start Kodi media center

Stub file creation

If you have a list of movie titles that you need to convert to stub files for XBMC then do the following operation(s) on the file.
First you might have to remove Windows line endings.

perl -pe 's/\r//g' ./input_file.list > ./cleaned_list_of_movies.list
perl -ne 'chomp $_; system "touch \"/desired/path/$_.dvd.disc\"";' /list/of/dvds.txt

Multi Episode Naming

Once TV episodes have been burned to disk the stub files need to be created in a certain directory with a specific naming scheme.
My naming scheme is True Blood - s01e01-02-03.dvd.disc

  1. Wherever you place the stubs you must set the top level (file) directory's scraper to none and exclude it from media library updates.
  2. The show folders underneath need to have their scrapers set to TV and "Selected folder contains a single TV show" should be checked.

The files view will not show the episodes, only the beginning of the raw files. To see the expanded episodes check the library view.

SQL Queries

Show in progress movies

bookmark b
inner join
movie m
b.idFile = m.idFile;

Delete in progress movies

bookmark b
inner join
movie m
b.idFile = m.idFile;

Show full paths and watched status

SELECT path.strPath,files.strFilename,files.playCount FROM MyVideos116.files INNER JOIN MyVideos116.path ON files.idPath=path.idPath;