kodi: add module

Kodi is a media center software.
This commit is contained in:
Daniel Wagenknecht 2021-10-21 16:40:36 +02:00 committed by Robert Helgesson
parent 93b52ce0bd
commit cbc176010b
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
13 changed files with 372 additions and 0 deletions

View file

@ -0,0 +1,5 @@
{
kodi-example-addon-settings = ./example-addon-settings.nix;
kodi-example-settings = ./example-settings.nix;
kodi-example-sources = ./example-sources.nix;
}

View file

@ -0,0 +1,4 @@
<!-- Generated by Home Manager. -->
<settings version="2">
<setting id="versioncheck_enable">false</setting>
</settings>

View file

@ -0,0 +1,18 @@
{ config, ... }:
{
programs.kodi = {
enable = true;
package = config.lib.test.mkStubPackage { };
addonSettings = {
"service.xbmc.versioncheck".versioncheck_enable = "false";
};
};
nmt.script = ''
assertFileContent \
home-files/.kodi/userdata/addon_data/service.xbmc.versioncheck/settings.xml \
${./example-addon-settings-expected.xml}
'';
}

View file

@ -0,0 +1,6 @@
<!-- Generated by Home Manager. -->
<advancedsettings version="1.0">
<videolibrary>
<showemptytvshows>true</showemptytvshows>
</videolibrary>
</advancedsettings>

View file

@ -0,0 +1,16 @@
{ config, ... }:
{
programs.kodi = {
enable = true;
package = config.lib.test.mkStubPackage { };
settings = { videolibrary.showemptytvshows = "true"; };
};
nmt.script = ''
assertFileContent \
home-files/.kodi/userdata/advancedsettings.xml \
${./example-settings-expected.xml}
'';
}

View file

@ -0,0 +1,16 @@
<!-- Generated by Home Manager. -->
<sources>
<video>
<default>movies</default>
<source>
<allowsharing>true</allowsharing>
<name>videos</name>
<path pathversion="1">/path/to/videos</path>
</source>
<source>
<allowsharing>true</allowsharing>
<name>movies</name>
<path pathversion="1">/path/to/movies</path>
</source>
</video>
</sources>

View file

@ -0,0 +1,33 @@
{ config, ... }:
{
programs.kodi = {
enable = true;
package = config.lib.test.mkStubPackage { };
sources = {
video = {
default = "movies";
source = [
{
name = "videos";
path = "/path/to/videos";
allowsharing = "true";
}
{
name = "movies";
path = "/path/to/movies";
allowsharing = "true";
}
];
};
};
};
nmt.script = ''
assertFileContent \
home-files/.kodi/userdata/sources.xml \
${./example-sources-expected.xml}
'';
}