1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kodi_ynh.git synced 2024-09-03 19:26:34 +02:00

Merge pull request #12 from YunoHost-Apps/cleaning

Cleaning
This commit is contained in:
Éric Gaspar 2021-11-12 21:01:07 +01:00 committed by GitHub
commit da030ea198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 34 additions and 41 deletions

View file

@ -15,7 +15,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview
Transform your YunoHost server into media center with Kodi
Kodi is a media center and entertainment hub that brings all your digital media together. It is 100% free and open source, very customisable and runs on a wide variety of devices. Users can play and view most videos, music, podcasts, games and other digital media files from local and network storage media and the internet.
**Shipped version:** 17.3~ynh1

View file

@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
## Vue d'ensemble
Transfromez votre serveur YunoHost en media center avec Kodi
Kodi is a media center and entertainment hub that brings all your digital media together. It is 100% free and open source, very customisable and runs on a wide variety of devices. Users can play and view most videos, music, podcasts, games and other digital media files from local and network storage media and the internet.
**Version incluse :** 17.3~ynh1

1
doc/DESCRIPTION.md Normal file
View file

@ -0,0 +1 @@
Kodi is a media center and entertainment hub that brings all your digital media together. It is 100% free and open source, very customisable and runs on a wide variety of devices. Users can play and view most videos, music, podcasts, games and other digital media files from local and network storage media and the internet.

View file

@ -3,8 +3,8 @@
"id": "kodi",
"packaging_format": 1,
"description": {
"en": "Transform your YunoHost server into media center with Kodi",
"fr": "Transfromez votre serveur YunoHost en media center avec Kodi"
"en": "Media center that brings all your digital media together",
"fr": "Centre multimédia qui rassemble tous vos médias numériques"
},
"version": "17.3~ynh1",
"url": "https://kodi.tv",
@ -21,7 +21,7 @@
"url": "blog.cecchettosylvain.fr"
},
"requirements": {
"yunohost": ">= 4.1.3"
"yunohost": ">= 4.2.3"
},
"multi_instance": false,
"services": [
@ -31,8 +31,7 @@
"install" : [
{
"name": "domain",
"type": "domain",
"example": "example.com"
"type": "domain"
},
{
"name": "path",

View file

@ -19,6 +19,30 @@ package_check_dependencies="xserver-xorg-video-dummy"
# EXPERIMENTAL HELPERS
#=================================================
# Check the architecture
#
# example: architecture=$(ynh_detect_arch)
#
# usage: ynh_detect_arch
#
# Requires YunoHost version 2.2.4 or higher.
ynh_detect_arch(){
local architecture
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then
architecture="i386"
elif [ -n "$(uname -m | grep arm)" ]; then
architecture="arm"
else
architecture="unknown"
fi
echo $architecture
}
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View file

@ -7,7 +7,6 @@
#=================================================
source _common.sh
source ynh_detect_arch__2
source /usr/share/yunohost/helpers
#=================================================
@ -169,7 +168,7 @@ usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev "$app"
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --log "$final_path/.kodi/temp/kodi.log" --needs_exposed_ports $port
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports=$port
#=================================================
# START SYSTEMD SERVICE

View file

@ -8,7 +8,6 @@
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source ../settings/scripts/ynh_detect_arch__2
source /usr/share/yunohost/helpers
#=================================================
@ -53,8 +52,6 @@ fi
#=================================================
ynh_script_progression --message="Validating restoration parameters..."
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
@ -148,7 +145,7 @@ usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev "$app"
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports $port
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports=$port
#=================================================
# START SYSTEMD SERVICE

View file

@ -7,7 +7,6 @@
#=================================================
source _common.sh
source ynh_detect_arch__2
source /usr/share/yunohost/helpers
#=================================================
@ -28,7 +27,6 @@ arch=$(ynh_detect_arch)
#=================================================
# CHECK VERSION
#=================================================
ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
@ -150,7 +148,7 @@ usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev "$app"
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports $port
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports=$port
#=================================================
# START SYSTEMD SERVICE

View file

@ -1,25 +0,0 @@
#!/bin/bash
# Check the architecture
#
# example: architecture=$(ynh_detect_arch)
#
# usage: ynh_detect_arch
#
# Requires YunoHost version 2.2.4 or higher.
ynh_detect_arch(){
local architecture
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then
architecture="i386"
elif [ -n "$(uname -m | grep arm)" ]; then
architecture="arm"
else
architecture="unknown"
fi
echo $architecture
}