This commit is contained in:
Luigi Di Carmino
2017-11-13 22:48:10 +01:00
9 changed files with 5356 additions and 104 deletions

View File

@@ -0,0 +1,3 @@
---
dependencies:
- { role: yavdr-common }

View File

@@ -1,8 +0,0 @@
---
# file roles/autoinstall-hardware-irmp/tasks/main.yml
- name: apt | install yavdr-hardware-irmp if connected
apt:
name: yavdr-hardware-irmp
when: '"1209:4444" in usb'
notify: [ 'Restart VDR' ]

View File

@@ -1,10 +1,10 @@
---
# file: roles/dvd/tasks/main.yml
- name: preconfigure libdvd-pkg
shell: |
echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections
echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections
#- name: preconfigure libdvd-pkg
# shell: |
# echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections
# echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections
- name: apt | install libdvd-pkg
apt:
@@ -12,7 +12,18 @@
state: present
install_recommends: no
with_items:
- libdvd-pkg
- 'libdvd-pkg'
- name: configure package libdvd-pkg
debconf:
name: 'libdvd-pkg'
question: '{{ item }}'
vtype: boolean
value: true
with_items:
- 'libdvd-pkg/post-invoke_hook-install'
- 'libdvd-pkg/build boolean'
notify: ['Reconfigure unattended upgrades with dpkg']
- name: change udev rule to allow KODI to eject optical disks
shell: sed 's/--lock-media //' /lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules

View File

@@ -1,2 +1,2 @@
- include: install-kodi.yml tags=install,update,kodi:install
- include: configure-kodi.yml tags=install,update,kodi:configure
- import_tasks: install-kodi.yml tags=install,update,kodi:install
- import_tasks: configure-kodi.yml tags=install,update,kodi:configure

View File

@@ -1,51 +0,0 @@
#!/usr/bin/ env python3
import subprocess
xrandr_data = subprocess.check_output(['xrandr', '-q'], universal_newlines=True)
def print_modelines(resolutions):
if resolutions:
for resolution, refreshrates in reversed(sorted(resolutions.items())):
for refreshrate in refreshrates:
print("{}_{}".format(resolution, refreshrate))
def cleanup_refreshrate(refreshrate):
return refreshrate.replace('+', '').replace('*', '')
resolutions = {}
for line in xrandr_data.splitlines():
if line.startswith('Screen'):
print_modelines(resolutions)
new_connection = False
screen = line.split(':', maxsplit=1)[0].split()[-1]
new_screen = True
print('Screen: {}'.format(screen))
elif new_screen and not new_connection and ' connected ' in line:
connection = line.split()[0]
new_screen = False
new_connection = True
print('Connection: {}'.format(connection))
resolutions = {}
elif new_connection and line.startswith(' '):
resolution, *refreshrates = line.split()
res_x, res_y = resolution.split('x')
resolution = (int(res_x), int(res_y))
r = []
for refreshrate in refreshrates:
if '+' in refreshrate:
current_mode = (resolution,
cleanup_refreshrate(refreshrate))
print('Current Mode: {}@{}'.format(*current_mode))
if '*' in refreshrate:
preferred_mode = (resolution,
cleanup_refreshrate(refreshrate))
print('Preferred Mode: {}@{}'.format(*preferred_mode))
r.append(cleanup_refreshrate(refreshrate))
resolutions[resolution] = r
print_modelines(resolutions)