Modul für Kodi (ehemals 70_XBMC)

Begonnen von vbs, 02 Februar 2017, 23:11:10

Vorheriges Thema - Nächstes Thema

Tommy82

Zitat von: vbs am 21 März 2017, 21:59:05
Dann mal bitte ein verbose5-Log wenn du den Befehl schickst.

Was sollte da eigentlich passieren bei "play audio"? Ich denke mal du musst schon irgendwie einen Audio-Player in Kodi geöffnet haben. Sprich: eine Audio-Datei auf Pause haben oder sowas?

Hi,
was sollte denn laut Modul beim "set Kodi play audio" passieren? Wenn ich das richtig interpretiere, dann sollte darüber doch Kodi angewiesen werden audio abzuspielen?

Wenn ich beim play befehl in Fhem auf verbose 5 logge, dann kommt das:
2017.03.29 20:23:48.389 4: KODI_Call: Sending: {"id":"22","method":"Player.GetActivePlayers","jsonrpc":"2.0"}
2017.03.29 20:23:48.391 5: SW: 7b226964223a223232222c226d6574686f64223a22506c617965722e476574416374697665506c6179657273222c226a736f6e727063223a22322e30227d
2017.03.29 20:23:48.446 5: KODI_ProcessRead
2017.03.29 20:23:48.447 5: No PARTIAL buffer
2017.03.29 20:23:48.447 5: KODI_Read: Incoming data: {"id":"22","jsonrpc":"2.0","result":[]}
2017.03.29 20:23:48.447 5: KODI_Read: Current processing buffer (PARTIAL + incoming data): {"id":"22","jsonrpc":"2.0","result":[]}
2017.03.29 20:23:48.448 4: KODI_Read: Decoding JSON message. Length: 39 Content: {"id":"22","jsonrpc":"2.0","result":[]}
2017.03.29 20:23:48.450 5: KODI_Read: Tail:
2017.03.29 20:23:48.450 5: KODI_Read: PARTIAL:
Fhem Cubitruck  Armbian Buster with Linux 5.3.9-sunxi
HM-CC_RT-DN, HM-Sec-RHS,HM-Sec-SD, HM-Sec-SCo,IT1500,1xIT GRR-3500 Fritz!Dect200,Powerline546E,Enigma2 Modul mit 3 Vu+,Wol Modul für WinServer2016 und WinServer 2019,FB6590
Allnetl Wandtablett mit FTUI

vbs

Ja, es wird dann der PlayPause-Befehl an den Audio-Player gesendet.

nesges

Mit v17 "Krypton" funktioniert die Implementierung von ActivateWindow zum Großteil nicht mehr. Ich hab im Anhang eine korrigierte Version des Moduls, bei der ich aber nicht sicher bin ob sie in v15 und v16 noch funktioniert. Falls jemand noch eine ältere Version installiert hat, würde ich mich freuen wenn's kurz getestet würde.

Ansonsten habe ich noch die Reihenfolge der exec Argumente angefasst, die ist jetzt alphabetisch.

@vbs: Lieber Patch oder lieber ganzes .pm?

vbs

Danke, das passt schon so als komplettes File. Würde gerne aber noch auf Rückmeldung bzgl. Abwärtskompatibilität warten.

ulli

Das Modul funktioniert super. Besten Dank vorab.

GIbt es eine Möglichkeit die z.B. Audio Playliste von Kodi abzurufen um dann gezielt über FHEM ein Lied anzuwählen?
Ich möchte die Playliste in Kodi erstellen, Sie mir dann in FHEM anzeigen lassen und über FHEM auswählen was abgespielt werden soll.
Geht das irgendwie?

vbs

Wäre technisch machbar aber ist im Modul leider nicht implementiert.

ulli

Hmm aber wie nutzt ihr dann das Modul sinnvoll?

vbs

Meiner Meinung nach sollte das Modul nicht versuchen, das Webinterface von Kodi nachzubauen oder zu ersetzen. Zielt für mich nur auf Automatisierung ab. Zum reinen Bedienen von Kodi eignet sich das Webinterface besser, denk ich.

nesges

Zitat von: ulli am 04 April 2017, 18:02:06
Hmm aber wie nutzt ihr dann das Modul sinnvoll?

Die Frage scheint mir jetzt nicht so sinnvoll :-) Das Modul hat "unzählige" Steuerbefehle für Kodi. Man kann Kodi damit fast vollständig bedienen und teilweise hat man mehr Möglichkeiten als über ein natives Kodi-Theme. Ich benutze das Modul zB intensiv um eine Fernbedienung in Tablet-UI zu implementieren und um Kodi mit Alexa per Sprache zu steuern.

ulli

Ich nutze kodiert aktuell um Musik abzuspielen.
Dafür wäre es eben gut die playliste in kodi zu konfigurieren und dann die titel oder streams von fhem aus auszuwählen.

phoenix

Nabend allerseits,

seit einiger Zeit habe ein kleines Problem was die Lichtsteuerung angeht. Und zwar benutze ich das folgende kleine Script um beim starten/stoppen/pausieren eines Films entsprechend das Licht automatisch zu steuern:
KODI:playStatus.* {
if (ReadingsVal("KODI", "type", "") eq "episode" or "movie"){
  if (ReadingsVal("KODI", "playStatus", "") eq "playing"){
       fhem("set Halogen off ; ; set Licht_vorne off ; ; set Licht_hinten off ; ; set Leuchtschild off ; ; set Bodenlichtleiste off");;
    }
    if (ReadingsVal("KODI", "playStatus", "") eq ("stopped")){
       fhem("set Bodenlichtleiste on ; ; set Licht_hinten on ; ; set Licht_vorne on ; ; set Leuchtschild on ; ; set Halogen on");;
    }
if (ReadingsVal("KODI", "playStatus", "") eq ("paused")){
       fhem("set Bodenlichtleiste on ; ; set Licht_hinten on ; ; set Leuchtschild on");; }

   }

}


Jetzt ist mir aufgefallen, dass ich wenn ich den Film pausiere, schaltet sich das Licht erstmal wie gewünscht ein, aber nach 1-2 Minuten dimmt FHEM alle Lichter immer wieder auf und ab. Solange bis ich den Film wieder starte. Das gleiche auch wenn der PC auf dem Kodi läuft herunter gefahren wird, dann dimt Fhem exakt 5x alle Lichter auf und ab. Ich bekomme aber einfach nicht heraus warum. Da ja mit den Script nur der Playstatus ausgelesen wird, dieser sich aber nicht ändert in den Readings ist mir das ein Rätsel.

Hat vielleicht jemand einen kleinen Denkanstoss für mich?

vbs

Kannst du den Vorfall bitte einmal im Event-Monitor loggen und posten? Und dazu das Device-Listing.

phoenix

Zitat von: vbs am 11 Mai 2017, 20:43:03
Kannst du den Vorfall bitte einmal im Event-Monitor loggen und posten? Und dazu das Device-Listing.

2017-05-14 12:56:13 IT Halogen off
2017-05-14 12:56:14 CUL CUL_0 raw: is00000000100101110100010100000000
2017-05-14 12:56:14 structure Kinolicht undefined
2017-05-14 12:56:14 IT Licht_vorne off
2017-05-14 12:56:14 CUL CUL_0 raw: is00000001100101110100010100000000
2017-05-14 12:56:14 structure Kinolicht undefined
2017-05-14 12:56:14 IT Licht_hinten off
2017-05-14 12:56:15 CUL CUL_0 raw: is00000010100101110100010100000000
2017-05-14 12:56:15 structure Kinolicht undefined
2017-05-14 12:56:15 IT Leuchtschild off
2017-05-14 12:56:15 CUL CUL_0 raw: isF00000000FF0
2017-05-14 12:56:15 structure Kinolicht off
2017-05-14 12:56:15 IT Bodenlichtleiste off
2017-05-14 12:56:16 CUL CUL_0 raw: isF000F0000FF0
2017-05-14 12:56:16 XBMC KODI playStatus: playing
2017-05-14 12:56:16 XBMC KODI type: movie
2017-05-14 12:56:16 XBMC KODI currentTitle: Guardians of the Galaxy
2017-05-14 12:56:16 XBMC KODI year: 2014
2017-05-14 12:56:16 XBMC KODI currentOriginaltitle: Guardians of the Galaxy
2017-05-14 12:56:16 XBMC KODI label: Guardians of the Galaxy
2017-05-14 12:56:16 XBMC KODI movieid: 214
2017-05-14 12:56:16 XBMC KODI 3dfile: off
2017-05-14 12:56:16 XBMC KODI currentMedia: smb://NSA325-V2/Filme/Guardians of the Galaxy/Guardians of the Galaxy.3DHSBS.mkv
2017-05-14 12:56:16 XBMC KODI sd_video0width: 1920
2017-05-14 12:56:16 XBMC KODI sd_video0codec: h264
2017-05-14 12:56:16 XBMC KODI sd_video0height: 1080
2017-05-14 12:56:16 XBMC KODI sd_video0duration: 7251
2017-05-14 12:56:16 XBMC KODI sd_video0language:
2017-05-14 12:56:16 XBMC KODI sd_video0stereomode: left_right
2017-05-14 12:56:16 XBMC KODI sd_video0aspect: 1.77777802944183
2017-05-14 12:56:16 XBMC KODI sd_audio0language: ger
2017-05-14 12:56:16 XBMC KODI sd_audio0channels: 6
2017-05-14 12:56:16 XBMC KODI sd_audio0codec: dca
2017-05-14 12:56:16 XBMC KODI sd_audio1language: eng
2017-05-14 12:56:16 XBMC KODI sd_audio1codec: dca
2017-05-14 12:56:16 XBMC KODI sd_audio1channels: 6
2017-05-14 12:56:16 XBMC KODI sd_subtitle0language: ger
2017-05-14 12:56:16 XBMC KODI version: 17.1-17.1-Krypton stable
2017-05-14 12:56:16 XBMC KODI name: Kodi
2017-05-14 12:56:16 XBMC KODI mute: off
2017-05-14 12:56:16 XBMC KODI volume: 100
2017-05-14 12:56:16 XBMC KODI skin: Estuary Refresh(skin.estuary.refresh)
2017-05-14 12:56:16 XBMC KODI fullscreen: on
2017-05-14 12:56:16 XBMC KODI stereoscopicmode: monoscopic
2017-05-14 12:56:16 DENON_AVR Marantz signal: Dolby Digital
2017-05-14 12:56:16 DENON_AVR Marantz surroundMode: Movie
2017-05-14 12:56:16 structure Kinolicht off
2017-05-14 12:56:16 IT Halogen off
2017-05-14 12:56:16 CUL CUL_0 raw: is00000000100101110100010100000000
2017-05-14 12:56:16 structure Kinolicht off
2017-05-14 12:56:16 IT Licht_vorne off
2017-05-14 12:56:17 CUL CUL_0 raw: is00000001100101110100010100000000
2017-05-14 12:56:17 structure Kinolicht off
2017-05-14 12:56:17 IT Licht_hinten off
2017-05-14 12:56:17 CUL CUL_0 raw: is00000010100101110100010100000000
2017-05-14 12:56:17 structure Kinolicht off
2017-05-14 12:56:17 IT Leuchtschild off
2017-05-14 12:56:17 CUL CUL_0 raw: isF00000000FF0
2017-05-14 12:56:17 structure Kinolicht off
2017-05-14 12:56:17 IT Bodenlichtleiste off
2017-05-14 12:56:18 CUL CUL_0 raw: isF000F0000FF0
2017-05-14 12:56:18 XBMC KODI partymode: off
2017-05-14 12:56:18 XBMC KODI shuffle: off
2017-05-14 12:56:18 XBMC KODI totaltime: 02:00:51.211
2017-05-14 12:56:18 XBMC KODI time: 00:00:02.195
2017-05-14 12:56:18 XBMC KODI repeat: off
2017-05-14 12:56:18 XBMC KODI playStatus: playing
2017-05-14 12:56:18 XBMC KODI speed: 1
2017-05-14 12:56:32 XBMC KODI volume: 100
2017-05-14 12:56:32 XBMC KODI mute: off
2017-05-14 12:56:32 XBMC KODI name: Kodi
2017-05-14 12:56:32 XBMC KODI version: 17.1-17.1-Krypton stable
2017-05-14 12:56:32 XBMC KODI stereoscopicmode: monoscopic
2017-05-14 12:56:32 XBMC KODI fullscreen: on
2017-05-14 12:56:32 XBMC KODI skin: Estuary Refresh(skin.estuary.refresh)
2017-05-14 12:56:32 structure Kinolicht off
2017-05-14 12:56:32 IT Halogen off
2017-05-14 12:56:32 CUL CUL_0 raw: is00000000100101110100010100000000
2017-05-14 12:56:32 structure Kinolicht off
2017-05-14 12:56:32 IT Licht_vorne off
2017-05-14 12:56:33 CUL CUL_0 raw: is00000001100101110100010100000000
2017-05-14 12:56:33 structure Kinolicht off
2017-05-14 12:56:33 IT Licht_hinten off
2017-05-14 12:56:33 CUL CUL_0 raw: is00000010100101110100010100000000
2017-05-14 12:56:33 structure Kinolicht off
2017-05-14 12:56:33 IT Leuchtschild off
2017-05-14 12:56:33 CUL CUL_0 raw: isF00000000FF0
2017-05-14 12:56:33 structure Kinolicht off
2017-05-14 12:56:33 IT Bodenlichtleiste off
2017-05-14 12:56:34 CUL CUL_0 raw: isF000F0000FF0
2017-05-14 12:56:34 XBMC KODI time: 00:04:16.986
2017-05-14 12:56:34 XBMC KODI totaltime: 02:00:51.211
2017-05-14 12:56:34 XBMC KODI shuffle: off
2017-05-14 12:56:34 XBMC KODI partymode: off
2017-05-14 12:56:34 XBMC KODI playStatus: playing
2017-05-14 12:56:34 XBMC KODI speed: 1
2017-05-14 12:56:34 XBMC KODI repeat: off
2017-05-14 12:56:34 XBMC KODI year: 2014
2017-05-14 12:56:34 XBMC KODI id: 214
2017-05-14 12:56:34 XBMC KODI currentTrack:
2017-05-14 12:56:34 XBMC KODI currentAlbum:
2017-05-14 12:56:34 XBMC KODI sd_subtitle0language: ger
2017-05-14 12:56:34 XBMC KODI sd_audio0channels: 6
2017-05-14 12:56:34 XBMC KODI sd_audio0codec: dca
2017-05-14 12:56:34 XBMC KODI sd_audio0language: ger
2017-05-14 12:56:34 XBMC KODI sd_audio1language: eng
2017-05-14 12:56:34 XBMC KODI sd_audio1channels: 6
2017-05-14 12:56:34 XBMC KODI sd_audio1codec: dca
2017-05-14 12:56:34 XBMC KODI sd_video0stereomode: left_right
2017-05-14 12:56:34 XBMC KODI sd_video0aspect: 1.77777802944183
2017-05-14 12:56:34 XBMC KODI sd_video0language:
2017-05-14 12:56:34 XBMC KODI sd_video0duration: 7251
2017-05-14 12:56:34 XBMC KODI sd_video0height: 1080
2017-05-14 12:56:34 XBMC KODI sd_video0codec: h264
2017-05-14 12:56:34 XBMC KODI sd_video0width: 1920
2017-05-14 12:56:34 XBMC KODI thumbnail: image://smb%3a%2f%2fNSA325-V2%2fFilme%2fGuardians%20of%20the%20Galaxy%2fGuardians%20of%20the%20Galaxy.3DHSBS-poster.jpg/
2017-05-14 12:56:34 XBMC KODI label: Guardians of the Galaxy
2017-05-14 12:56:34 XBMC KODI tvshowid: -1
2017-05-14 12:56:34 XBMC KODI currentTitle: Guardians of the Galaxy
2017-05-14 12:56:34 XBMC KODI 3dfile: off
2017-05-14 12:56:34 XBMC KODI currentMedia: smb://NSA325-V2/Filme/Guardians of the Galaxy/Guardians of the Galaxy.3DHSBS.mkv
2017-05-14 12:56:34 XBMC KODI currentArtist:
2017-05-14 12:56:34 XBMC KODI type: movie
2017-05-14 12:56:34 structure Kinolicht undefined
2017-05-14 12:56:34 IT Bodenlichtleiste on
2017-05-14 12:56:34 CUL CUL_0 raw: isF000F0000FFF
2017-05-14 12:56:34 structure Kinolicht undefined
2017-05-14 12:56:34 IT Licht_hinten on
2017-05-14 12:56:34 CUL CUL_0 raw: is00000010100101110100010100010000
2017-05-14 12:56:34 structure Kinolicht undefined
2017-05-14 12:56:34 IT Leuchtschild on
2017-05-14 12:56:35 CUL CUL_0 raw: isF00000000FFF
2017-05-14 12:56:35 XBMC KODI playStatus: paused
2017-05-14 12:57:32 XBMC KODI name: Kodi
2017-05-14 12:57:32 XBMC KODI version: 17.1-17.1-Krypton stable
2017-05-14 12:57:32 XBMC KODI mute: off
2017-05-14 12:57:32 XBMC KODI volume: 100
2017-05-14 12:57:32 XBMC KODI fullscreen: on
2017-05-14 12:57:32 XBMC KODI skin: Estuary Refresh(skin.estuary.refresh)
2017-05-14 12:57:32 XBMC KODI stereoscopicmode: monoscopic
2017-05-14 12:57:32 structure Kinolicht undefined
2017-05-14 12:57:32 IT Bodenlichtleiste on
2017-05-14 12:57:32 CUL CUL_0 raw: isF000F0000FFF
2017-05-14 12:57:32 structure Kinolicht undefined
2017-05-14 12:57:32 IT Licht_hinten on
2017-05-14 12:57:32 CUL CUL_0 raw: is00000010100101110100010100010000
2017-05-14 12:57:32 structure Kinolicht undefined
2017-05-14 12:57:32 IT Leuchtschild on
2017-05-14 12:57:33 CUL CUL_0 raw: isF00000000FFF
2017-05-14 12:57:33 XBMC KODI partymode: off
2017-05-14 12:57:33 XBMC KODI shuffle: off
2017-05-14 12:57:33 XBMC KODI totaltime: 02:00:51.211
2017-05-14 12:57:33 XBMC KODI time: 00:04:18.572
2017-05-14 12:57:33 XBMC KODI repeat: off
2017-05-14 12:57:33 XBMC KODI playStatus: paused
2017-05-14 12:57:33 XBMC KODI speed: 0


In dem Moment wo im Eventlog speed: 0 erscheint fängt das Licht an, an an und aus zu gehen. Danach wiederholt sich folgende Passage im Log jede Minute:
2017-05-14 13:05:32 XBMC KODI name: Kodi
2017-05-14 13:05:32 XBMC KODI version: 17.1-17.1-Krypton stable
2017-05-14 13:05:32 XBMC KODI volume: 100
2017-05-14 13:05:32 XBMC KODI mute: off
2017-05-14 13:05:32 XBMC KODI fullscreen: on
2017-05-14 13:05:32 XBMC KODI skin: Estuary Refresh(skin.estuary.refresh)
2017-05-14 13:05:32 XBMC KODI stereoscopicmode: monoscopic
2017-05-14 13:05:32 structure Kinolicht undefined
2017-05-14 13:05:32 IT Bodenlichtleiste on
2017-05-14 13:05:32 CUL CUL_0 raw: isF000F0000FFF
2017-05-14 13:05:32 structure Kinolicht undefined
2017-05-14 13:05:32 IT Licht_hinten on
2017-05-14 13:05:32 CUL CUL_0 raw: is00000010100101110100010100010000
2017-05-14 13:05:32 structure Kinolicht undefined
2017-05-14 13:05:32 IT Leuchtschild on
2017-05-14 13:05:33 CUL CUL_0 raw: isF00000000FFF
2017-05-14 13:05:33 XBMC KODI time: 00:04:18.572
2017-05-14 13:05:33 XBMC KODI totaltime: 02:00:51.211
2017-05-14 13:05:33 XBMC KODI shuffle: off
2017-05-14 13:05:33 XBMC KODI partymode: off
2017-05-14 13:05:33 XBMC KODI playStatus: paused
2017-05-14 13:05:33 XBMC KODI speed: 0
2017-05-14 13:05:33 XBMC KODI repeat: off


Kodi gibt folgende Readings aus:

3dfile

off

2017-05-14 12:56:34
currentAlbum


2017-05-14 12:56:34
currentArtist


2017-05-14 12:56:34
currentMedia

smb://NSA325-V2/Filme/Guardians of the Galaxy/Guardians of the Galaxy.3DHSBS.mkv

2017-05-14 12:56:34
currentOriginaltitle

Guardians of the Galaxy

2017-05-14 12:56:13
currentShowtitle


2017-05-14 12:56:13
currentTitle

Guardians of the Galaxy

2017-05-14 12:56:34
currentTrack


2017-05-14 12:56:34
episode


2017-05-14 12:56:13
episodeid


2017-05-14 12:56:13
fullscreen

on

2017-05-14 13:06:32
id

214

2017-05-14 12:56:34
label

Guardians of the Galaxy

2017-05-14 12:56:34
movieid

214

2017-05-14 12:56:13
mute

off

2017-05-14 13:06:32
name

Kodi

2017-05-14 13:06:32
partymode

off

2017-05-14 13:06:32
playStatus

paused

2017-05-14 13:06:32
playlist


2017-05-14 12:56:13
repeat

off

2017-05-14 13:06:32
sd_audio0channels

6

2017-05-14 12:56:34
sd_audio0codec

dca

2017-05-14 12:56:34
sd_audio0language

ger

2017-05-14 12:56:34
sd_audio1channels

6

2017-05-14 12:56:34
sd_audio1codec

dca

2017-05-14 12:56:34
sd_audio1language

eng

2017-05-14 12:56:34
sd_subtitle0language

ger

2017-05-14 12:56:34
sd_video0aspect

1.77777802944183

2017-05-14 12:56:34
sd_video0codec

h264

2017-05-14 12:56:34
sd_video0duration

7251

2017-05-14 12:56:34
sd_video0height

1080

2017-05-14 12:56:34
sd_video0language


2017-05-14 12:56:34
sd_video0stereomode

left_right

2017-05-14 12:56:34
sd_video0width

1920

2017-05-14 12:56:34
season


2017-05-14 12:56:13
shuffle

off

2017-05-14 13:06:32
skin

Estuary Refresh(skin.estuary.refresh)

2017-05-14 13:06:32
songid


2017-05-14 12:56:13
speed

0

2017-05-14 13:06:32
state

opened

2017-05-14 12:54:30
stereoscopicmode

monoscopic

2017-05-14 13:06:32
system

wake

2017-05-14 12:54:32
thumbnail

image://smb%3a%2f%2fNSA325-V2%2fFilme%2fGuardians%20of%20the%20Galaxy%2fGuardians%20of%20the%20Galaxy.3DHSBS-poster.jpg/

2017-05-14 12:56:34
time

00:04:18.572

2017-05-14 13:06:32
totaltime

02:00:51.211

2017-05-14 13:06:32
tvshowid

-1

2017-05-14 12:56:34
type

movie

2017-05-14 12:56:34
version

17.1-17.1-Krypton stable

2017-05-14 13:06:32
videolibrary

update

2017-05-13 16:57:18
volume

100

2017-05-14 13:06:32
year

2014

2017-05-14 12:56:34


vbs

Bei deinem Perl-Code fallen mehrere Sachen auf:
- beim ersten if das "or" kannst du so nicht schreiben. Nach dem "or" kommt eine eigene Bedingung. In deinem Fall "movie", die immer wahr ist.
- bei "stopped" und "paused" schreibst du den Wert in Klammern. Vermtl. ist das Hauptproblem. Bin nicht so sicher, was da genau passiert. Legt eigentlich ein Array an.
- bei den nachfolgenden bedingungen solltest du "elseif" verwenden
- das ReadingsVal nur einmal aufrufen und das Ergebnis wiederverwenden

Ich würde dir generell empfehlen, die verschiedenen Zustände direkt über das RegEx im notify zu filtern (zB "playStatus:.playing"). Damit brauchst du dann gar keinen Perl-Code mehr, was einfach das Risiko für Fehler stark senkt.

Würde außerdem event-on-change-reading einsetzen, damit nur bei echten Änderungen getriggert wird.

phoenix

Jup die Klammern hatte ich tatsächlich vergessen raus zu nehmen. Die sind noch ein überbleibsel gewesen als ich paused und stopped zusammen hatte.
so sah das damals aus, daher kamen die Klammern: if (ReadingsVal("KODI", "playStatus", "") eq ("paused" || "stopped")
Dann wollte ich halt für den Status paused ein eigenes Lichtszenario wie für stopped, deshalb hatte ich mir das auseinander gedröselt.

Mit "elseif" und "else" habe ich mal probiert, bekomme aber immer Syntaxfehler. Denke da werde ich wohl nochmal das Wiki studieren müssen. habs jetzt zumindest soweit, dass es erstmal funktioniert, muss mir jetzt aber doch nochmal bei Zeiten paused und stopped auseinander dröseln. Danke auf jeden Fall für Deine Hilfe :)

Aber eine Verstänisfrage hätte ich da noch zu dem "or".beim ersten if soll geprüft ob es sich um eine Serie "episode" oder einen Film "movie" handelt, da bei musik z.b. am Licht nichts geändert werden soll. Also es sind ja zwei Bedingungen, wovon einer erfüllt sein soll. Deshalb ist mir noch so ganz klar, warum das so nicht sein darf.