Инструменты пользователя

Инструменты сайта


os:kodi

LibreELEC

LibreELEC is ‘Just enough OS’ for Kodi, a Linux distribution built to run Kodi on current and popular mediacentre hardware. We are an evolution of the popular OpenELEC project.

Логи лежат здесь: /storage/.kodi/temp

Updating LibreELEC using the CLI

For updating LibreELEC while using the command line interface, you have to SSH in.

# After you are in, move to the correct folder.
cd /storage/.update
# First you may want to check whether there's any other files in this folder:
ls -la
# Now, after we are at the correct folder (and there are no other files in it)
# we download the specific file directly to our LibreELEC machine:
wget http://releases.libreelec.tv/LibreELEC-RPi2.arm-8.0.1.img.gz
# Check the latest builds at https://libreelec.tv/downloads/
# This can take some time depending on your internet connection.
# You will see a running progress bar.
# When the download is done, type the following to restart your machine:
reboot
# The update process will resume after that, following by a another reboot.
# Now the update process will be complete

LibreELEC для Orange Pi PC+

С выходом стабильных версий LE, качать отсюда: https://libreelec.tv/downloads/allwinner/

Для нестабильных nightly-версий, устарело

Перенос на eMMC

Готового скрипта по переносу живой системы нет, но можно установить свежую систему на eMMC из-под старой, а потом перенести на неё конфигурацию. Порядок действий: выгрузить конфигурацию на флешку через интерфейс, затем загрузиться с sdcard на новой системе, там настроить интернет и ssh, зайти туда по ssh, и далее

# Скачать образ
wget https://releases.libreelec.tv/LibreELEC-H3.arm-11.0.3-orangepi-pc-plus.img.gz
# Распаковать
gzip -d LibreELEC-H3.arm-11.0.3-orangepi-pc-plus.img.gz
# Определить название eMMC  в системе
ls /dev | grep mmc # mmcblk1 или mmcblk2. Нулевой - это sdcard
# Отмонтировать разделы eMMC, если они смонтированы
umount /dev/mmcblk2*
# Очистить eMMC
dd if=/dev/zero of=/dev/mmcblk2 bs=1M count=32
# Записать образ на eMMC
dd if=LibreELEC-H3.arm-11.0.3-orangepi-pc-plus.img of=/dev/mmcblk2
# Выключить аппарат
shutdown

Извлечь sdcard, загрузить систему, восстановить конфигурацию с флешки.

Эмулятор старых игр

https://github.com/bite-your-idols/Gamestarter

  1. Разрешить установку из недоверенных источников (Kodi → Settings → System → Add-ons and enable Unknown sources)
  2. Добавить репозиторий из .zip
  3. Поставить RetroArch, затем в его свойствах Download Libretro cores full package
  4. Copy your ROMs and BIOSes to default folder /storage/emulators/ via Samba or FTP

Статический IP-адрес через SSH

Иногда интерфейс глючит и не даёт сменить DHCP на статику. Решение:

# узнать ID подключения
connmanctl services
# изменить настройки (IP, netmask, gateway)
connmanctl config "wifi_0923094h2334_o83bp8wno8dayaiwy3nrodigj_managed_psk" --ipv4 manual 192.168.1.4 255.255.255.0 192.168.1.1

https://www.ask-sheldon.com/static-ip-on-libreelec/

Пульт ДУ

В моём случае KEY_ENTER вместо KEY_POWER, потому что Orange Pi PC 2 выключается и включить его с пульта невозможно.
Остальное закомментированное отсутствует в командах.

/storage/.config/rc_keymaps/supra_rs41
# table supra_rs41, type: nec
# 0x710202 KEY_POWER
0x710202 KEY_ENTER
# 0x71020f source
0x710220 KEY_RED
0x710234 KEY_GREEN
0x71022b KEY_YELLOW
0x71022c KEY_BLUE
0x710227 KEY_MUTE
0x710225 KEY_ZOOM
# 0x710200 freeze
0x710228 KEY_TEXT
0x710203 KEY_FAVORITES
0x710232 KEY_SUBTITLE
0x710240 KEY_AUDIO
0x710255 KEY_RECORD
0x710226 KEY_REWIND
0x71021e KEY_FORWARD
0x710239 KEY_PREVIOUS
0x710213 KEY_NEXT
0x71021a KEY_PLAY
0x710201 KEY_STOP
0x710260 KEY_UP
0x710261 KEY_DOWN
0x710265 KEY_LEFT
0x710262 KEY_RIGHT
0x710268 KEY_ENTER
0x71022d KEY_MENU
0x71021f KEY_ESC
0x710207 KEY_VOLUMEUP
0x71020b KEY_VOLUMEDOWN
0x710222 KEY_HOME
# 0x710221 mouse
0x710212 KEY_CHANNELUP
0x710210 KEY_CHANNELDOWN
0x710204 KEY_1
0x710205 KEY_2
0x710206 KEY_3
0x710208 KEY_4
0x710209 KEY_5
0x71020a KEY_6
0x71020c KEY_7
0x71020d KEY_8
0x71020e KEY_9
0x710211 KEY_0
0x710223 KEY_DISPLAYTOGGLE
# 0x710250 return
# Применить конфигурацию
ir-keytable -c -w /storage/.config/rc_keymaps/supra_rs41
# Добавить её в автозагрузку
echo "* * supra_rs41" > /storage/.config/rc_maps.cfg

https://bva.dyndns.info/orange-pi-remote

Youtube addon

Установка из консоли (https://github.com/anxdpanic/plugin.video.youtube/releases)

wget https://github.com/anxdpanic/plugin.video.youtube/releases/download/6.x.x-dev/plugin.video.youtube-unofficial-6.8.9+matrix.1.beta3.zip
unzip ~/plugin.video.youtube-unofficial-6.8.9\+matrix.1.beta3.zip -d /storage/.kodi/addons/

Настройка

Settings → API → Allow developer keys = ENABLED
Settings → API → Enable API configuration page = ENABLED

Если включить Enable API configuration page, то можно потом зайти на http://192.168.1.4:50152/youtube/api и вбить туда все нужные данные.

Либо, можно отредактировать конфиг (но из Client ID нужно убрать .apps.googleusercontent.com).

nano /storage/.kodi/userdata/addon_data/plugin.video.youtube/api_keys.json
{
    "keys": {
        "developer": {}, 
        "personal": {
            "api_key": "API KEY HERE", 
            "client_id": "CLIENT ID HERE", 
            "client_secret": "CLIENT SECRET HERE"
        }
    }
}

Потом можно авторизоваться через https://youtube.com/activate

https://github.com/anxdpanic/plugin.video.youtube/wiki/Personal-API-Keys

Настройки самого плагина: nano /storage/.kodi/userdata/addon_data/plugin.video.youtube/settings.xml

Пример

Ошибки

No streams found

При попытке запустить ролик сообщение «No streams found»

nano /storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py

Scroll down to lines 689-690 and 'comment them out' using 'hash tags' like this:

                   'Accept-Language': 'en-US,en;q=0.8,de;q=0.6'}
 
#       if self._access_token:
#           headers['Authorization'] = 'Bearer %s' % self._access_token
 
        page_result = self.get_watch_page(video_id)

Then REBOOT Kodi.

https://github.com/anxdpanic/plugin.video.youtube/issues/129#issuecomment-862014049

The following content is not available on this app

При попытке запустить ролик сообщение «The following content is not available on this app» Установить последнюю бету из архива: https://github.com/anxdpanic/plugin.video.youtube/issues/523

IPTV Simple

Установка: https://github.com/kodi-pvr/pvr.iptvsimple/releases/latest

wget https://github.com/kodi-pvr/pvr.iptvsimple/archive/refs/tags/7.6.4-Matrix.zip
unzip 7.6.4-Matrix.zip -d /storage/.kodi/addons/

Настройки лежат здесь: /storage/.kodi/userdata/addon_data/pvr.iptvsimple/settings.xml

<settings version="2">
    <setting id="epgCache">true</setting>
    <setting id="epgPath" default="true"></setting>
    <setting id="epgPathType">1</setting>
    <setting id="epgTimeShift" default="true">0</setting>
    <setting id="epgTSOverride" default="true">false</setting>
    <setting id="epgUrl">http://epg.it999.ru/epg.xml.gz</setting>
    <setting id="logoBaseUrl" default="true">http://epg.it999.ru/epg.xml.gz</setting>
    <setting id="logoFromEpg" default="true"></setting>
    <setting id="logoPath" default="true"></setting>
    <setting id="logoPathType">1</setting>
    <setting id="m3uCache">true</setting>
    <setting id="m3uPath" default="true"></setting>
    <setting id="m3uPathType">1</setting>
    <setting id="m3uUrl">http://iptvm3u.ru/onelist.m3u</setting>
    <setting id="startNum">1</setting>
</settings>

Телепрограмма:
http://epg.it999.ru/epg.xml.gz
http://www.teleguide.info/download/new3/xmltv.xml.gz

Скрипт упорядочивания каналов в плейлисте по алфавиту

Powershell:

$file = "$env:userprofile\Downloads\onelist.m3u"
 
curl "http://iptvm3u.ru/onelist.m3u" -OutFile "$file"
 
$l = ((gc "$file" -encoding utf8) -split '#EXTINF:-1 ,' -notmatch "EXTM3U|^$").Trim()
$names,$links = $l.where({$_ -notmatch "^https?://"}, 'split')
# $outFile = "c:\temp\list-$((get-date).ToString("yyyyMMdd-HHmm")).m3u"
 
# Making ordered object
$data = @()
$c = 0
 
$names |% {
    $obj = [pscustomobject]@{
    Name = $_
    Link = $links[$c]
    }
$c++
$data += $obj
}
 
# Sorting
$data = $data |sort Name
 
# Forming playlist
"#EXTM3U" |Out-File "$file" -Encoding utf8 -Force -Confirm:$false
 
$data |% {
"#EXTINF:-1 ," + $_.name + "`n" + $_.link |Out-File "$file" -Encoding utf8 -Append
}

Каналы IPTV

Скачивание и перепаковка EPG

# Каждые 8 часов (/etc/crontab)
0 */8 * * * root curl http://epg.it999.ru/epg.xml -o /var/www/html/dl/epg.xml && gzip -fk /var/www/html/dl/epg.xml

Ссылки

KODI

os/kodi.txt · Последнее изменение: 15.04.2024 19:02 — viacheslav

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki