kodi: add module
Kodi is a media center software.
This commit is contained in:
parent
93b52ce0bd
commit
cbc176010b
13 changed files with 372 additions and 0 deletions
5
tests/modules/programs/kodi/default.nix
Normal file
5
tests/modules/programs/kodi/default.nix
Normal 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;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<!-- Generated by Home Manager. -->
|
||||
<settings version="2">
|
||||
<setting id="versioncheck_enable">false</setting>
|
||||
</settings>
|
||||
18
tests/modules/programs/kodi/example-addon-settings.nix
Normal file
18
tests/modules/programs/kodi/example-addon-settings.nix
Normal 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}
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<!-- Generated by Home Manager. -->
|
||||
<advancedsettings version="1.0">
|
||||
<videolibrary>
|
||||
<showemptytvshows>true</showemptytvshows>
|
||||
</videolibrary>
|
||||
</advancedsettings>
|
||||
16
tests/modules/programs/kodi/example-settings.nix
Normal file
16
tests/modules/programs/kodi/example-settings.nix
Normal 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}
|
||||
'';
|
||||
}
|
||||
16
tests/modules/programs/kodi/example-sources-expected.xml
Normal file
16
tests/modules/programs/kodi/example-sources-expected.xml
Normal 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>
|
||||
33
tests/modules/programs/kodi/example-sources.nix
Normal file
33
tests/modules/programs/kodi/example-sources.nix
Normal 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}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue