• 1
  • 12
  • 13
  • 14(current)
  • 15
  • 16
  • 17
Release Audio Profiles (for Kodi 18 and later)
Hi,

Thank you for answer.
Writing in resources/audioprofiles.py has no effects.
If I execute this file with my changes in the console (python audioprofiles.py) I can check that my code is ok.
But seems that this file is never executed when the addon is called ...
What do I miss ?
Reply
(2022-10-23, 22:47)Alex_1977 Wrote: Hi,

Thank you for answer.
Writing in resources/audioprofiles.py has no effects.
If I execute this file with my changes in the console (python audioprofiles.py) I can check that my code is ok.
But seems that this file is never executed when the addon is called ...
What do I miss ?
You probably need to add some logging to the Kodi log file and look there for a hint.  Maybe the path to the file isn't valid when it's running from Kodi?  I'm not even sure how you're managing to run that in a console window since it requires a bunch of Kodi bindings that aren't available outside Kodi.  I'm not going to be able to help much past that.
Reply
Hi,

What I need is to execute something when a profile is detected.
Do you thing that it's possible for you to update whith this function ?
Reply
(2022-10-24, 13:34)Alex_1977 Wrote: Hi,

What I need is to execute something when a profile is detected.
Do you thing that it's possible for you to update whith this function ?

Nope.  Or rather I'm not going to.  Trying to do that in a cross platform way is basically impossible, and I doubt it would clear review anyway.  Having addons that can launch arbitrary code outside Kodi isn't really a good idea.
Reply
Ok, I understand.
This is possible with the callbacks addon. There's a "when playback started" even which can execute a task (execute python script for example). It works, but I don't know how to make difference between an audio and a video file.
I asked on the callbacks forum but no answer, perhaps you know ...
Reply
Hi @pkscout,

First of all I would like to thank you and the other guys for maintaining and improving the add-on. I have personally made a small modification that at least for me is nice (i.e. possibility to turn off the notification sound) and I was wondering how I could provide it to the official version (in case you want to include it). Let me know.

Have a great day!

Alex
Light IMDb Ratings Update - Keep updated the IMDb ratings for your movies and TV shows.
In case you found useful my work, feel free to offer me a cappuccino!
Reply
(2022-10-25, 16:11)axlt2002 Wrote: Hi @pkscout,

First of all I would like to thank you and the other guys for maintaining and improving the add-on. I have personally made a small modification that at least for me is nice (i.e. possibility to turn off the notification sound) and I was wondering how I could provide it to the official version (in case you want to include it). Let me know.

https://github.com/pkscout/script.audio.profiles

You can do a pull request again the next-version branch.  I can review it and merge if it looks OK.
Reply
(2022-10-26, 01:51)pkscout Wrote:
(2022-10-25, 16:11)axlt2002 Wrote: Hi @pkscout,

First of all I would like to thank you and the other guys for maintaining and improving the add-on. I have personally made a small modification that at least for me is nice (i.e. possibility to turn off the notification sound) and I was wondering how I could provide it to the official version (in case you want to include it). Let me know.

https://github.com/pkscout/script.audio.profiles

You can do a pull request again the next-version branch.  I can review it and merge if it looks OK.
Thanks a lot! I will try during the weekend to propose my modifications.

Keep in touch,

Alex
Light IMDb Ratings Update - Keep updated the IMDb ratings for your movies and TV shows.
In case you found useful my work, feel free to offer me a cappuccino!
Reply
Hi @pkscout,

I have just pushed a couple of commits:
 
  • Added setting to disable notifications sound (by default the sound is enabled as it is now)
  • New add-on icon

The first commit has embedded also some minor corrections for the indentation of the text inside the notifications' settings.

I really hope you can accept the proposal. Let me know.

Have a great day,

Alex
Light IMDb Ratings Update - Keep updated the IMDb ratings for your movies and TV shows.
In case you found useful my work, feel free to offer me a cappuccino!
Reply
Hi,

I solved my problem with a python file executed in the callbacks addon (when playback started or resumed).
Something like this :

import xbmc
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup (26, GPIO.OUT) # pin 37 sortie pour relay
GPIO.setup (14, GPIO.OUT) # pin 8 sortie pour led bp

path = xbmc.getInfoLabel('Player.Folderpath')
if "Musique" in path or "musicales" in path:
    GPIO.output(26, GPIO.HIGH)
    GPIO.output(14, GPIO.HIGH)
else:
    GPIO.output(26, GPIO.LOW)
    GPIO.output(14, GPIO.LOW)

Possible to test the streaming too : is_internetstream = xbmc.getCondVisibility('Player.IsInternetStream') # (returns TRUE or FALSE)

I think it would be great to have this possibility in the audio profiles addon, for the ones who want to turn on/off lights, amps ...

Alex.
Reply
Firstly, thank you for this excellent add-on which I've just discovered, and which helps fix an annoying and longstanding problem I've had on my HK1RBox S905X4 running CE19, then CE20 nightlies. The problem has always been that, after playing any video with a DTSHD or TrueHD audio track, if I then play any 2-channel or multi-channel music file it plays at around 19x speed. This is with Audio Device set to HDMI Multichannel PCM (7.1), and Passthrough Device set to HDMI. Rebooting fixes the issue, and as I've only just discovered, so does changing the Audio device to HDMI (2.0) and then back to HDMI Multichannel PCM (7.1).

So I thought I might be able to do this automatically using Audio Profiles based on Codec-type, using two profiles; one with the audio device set to HDMI Multichannel PCM (7.1) and the other with it set to HDMI (2.0), both with passthrough for all formats, and switching between them based on the codecs. I configured it to switch to HDMI (2.0) when playing TrueHD or DTSHD, and to HDMI Multichannel PCM (7.1) for all other codecs. This worked perfectly for TrueHD, but didn't detect or switch for DTSHD.

After some investigation, I found that the DTSHD codec on this box is actually named 'dtshd_ma', not 'dtshd'. So as an experiment, I changed the string 'dtshd' to 'dtshd_ma' in apsettings.py line 50, in audioprofiles.py line 150 and in settings.xml line 655 (the only instances of the string I could find).

I don't know whether I needed to change the string in all three of these places, but this has fixed the problem and it now detects and switched for both HD audio formats.

I was wondering whether there was any way you could make this workaround more permanent, or will I need to reapply it on each new version of the add-on?

Many thanks again for your excellent work.
Reply
(2022-11-15, 06:24)serafis Wrote: After some investigation, I found that the DTSHD codec on this box is actually named 'dtshd_ma', not 'dtshd'. So as an experiment, I changed the string 'dtshd' to 'dtshd_ma' in apsettings.py line 50, in audioprofiles.py line 150 and in settings.xml line 655 (the only instances of the string I could find).

I don't know whether I needed to change the string in all three of these places, but this has fixed the problem and it now detects and switched for both HD audio formats.

I was wondering whether there was any way you could make this workaround more permanent, or will I need to reapply it on each new version of the add-on?
Let me look.  I can either add dtshd_ma as a valid DTSHD match or do some fuzzy logic to match anything that starts with dtshd.
Reply
That would be fantastic! Thanks!
Reply
(2022-11-16, 11:00)serafis Wrote: That would be fantastic! Thanks!
Beta version available for test that should correct this (and also an issue detected older DTS in some cases where it's reported as 'dta').

https://github.com/pkscout/script.audio....xt-version

Just download the zip from the menu when you click on the CODE button and then manually install it.  This works for me in limited testing, but I'd like to make sure it's working for you before I push the change to the main Kodi addon repo.
Reply
Yes, that works fine, thanks very much!
Reply
  • 1
  • 12
  • 13
  • 14(current)
  • 15
  • 16
  • 17

Logout Mark Read Team Forum Stats Members Help
Audio Profiles (for Kodi 18 and later)0