Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 21
  • 22
  • 23
  • 24(current)
  • 25
Release Audio Profiles - Easy switch between different audio settings
(2020-04-15, 19:57)pkscout Wrote:
(2020-04-15, 12:53)Roby77 Wrote: @pkscout if you want I can test it your mod.on libreelec Matrix
Since @tomasiek has expressed a desire to maintain the addon, I don't want to muddy things be releasing Yet Another Fork.  Hopefully my pull request will be accepted and pushed out via the current repo.  If there's a change to tomasiek's plans, we'll move on from there.
I will check what and how tomorrow and turn this PR on. I think it would be a good idea to treat this repo as a test one, and if you are able to adapt the program to the requirements of kodi, then I am in favor. I'll do it tomorrow, I'll just add you as a repo developer
Ok. I released PR - everything works. For now, I am not conquering the version in the repository itself - more tests are needed. I invited you to cooperate. Feel like home. As I said - I'm not a programmer - but aren't we the amateurs who built the ark?
(2020-04-15, 20:35)Roby77 Wrote: No wasnn't my intention I would like help to test cause is a script that my family use often

I found a bug switching profile (remote key) on libreelec 
Code:
<key id="24">runscript(script.audio.profiles,0)</key><

Error:
Code:
Contents: list index out of range
Traceback (most recent call last):
File "/storage/.kodi/addons/script.audio.profiles/default.py", line 6, in <module>
PROFILES()
File "/storage/.kodi/addons/script.audio.profiles/resources/lib/profiles.py", line 58, in __init__
self.start(mode)
File "/storage/.kodi/addons/script.audio.profiles/resources/lib/profiles.py", line 87, in start
self.toggle(mode)
File "/storage/.kodi/addons/script.audio.profiles/resources/lib/profiles.py", line 217, in toggle
profile = self.aProfile[ip + 1]
IndexError: list index out of range
-->End of Python script error report<--

Sorry not a proper lot cause I don't have log on, will do later

Thank for your hard work

edit: found out that if i use (almost in windows)
Code:
 <t>RunScript(script.audio.profiles,1)</t>
      <a>RunScript(script.audio.profiles,2)</a>

no problem

so the problem maybe is with the toogle function 
OK, I think I fixed that.  It was a result of me trying to clean up some sloppy exception handling.  I just got access to the Github repo with the code, so I'm still trying to decide now how to manage this together with tomasiek.  I think I'm going to create another branch with code updates for testing so we don't pollute master with bad code (anymore).  I need to get out of the house for some exercise first (it's morning here in Hawaiʻi), so look for a post later today with the best way to get the update.
New Beta Release

v.1.4.2~beta2 (for Matrix this is v.1.4.102~beta2)
- fixes crash when toggling profiles

To download this beta, go to:

https://github.com/notoco/script.audio.p.../releases/

Look for the zip in the assets section that matches your Kodi version.  For Kodi 18, download the leia zip.  For Kodi 19 download the matrix zip.  You should be able to install the zip using Kodi's install from zip function in the addons section.  If you have previously downloaded a zip directly from Github, please check your addon folder.  If you have something named script.audio.profiles-master (or anything with a dash and other text after script.audio.profiles), you need to delete that folder before installing this beta. To ensure ease of upgrade to production versions, please don't download from the main Github page. Only download betas from the asset area of the releases page.
Thank you ! Tried and works correctly

Sorry to bother you again but I think that I found another bug

Volume level is stored correctly in profile (checked profole.json)

But if I switch profile or restarst Kodi volume level is not set to profile setting

Example profile 1 volume level saved to 90

I change volume level to 70, at restart or toggle profile volume is always to 70
(2020-04-17, 14:40)Roby77 Wrote: Thank you ! Tried and works correctly

Sorry to bother you again but I think that I found another bug

Volume level is stored correctly in profile (checked profole.json)

But if I switch profile or restarst Kodi volume level is not set to profile setting

Example profile 1 volume level saved to 90

I change volume level to 70, at restart or toggle profile volume is always to 70
I'll look, but that one is likely going to take awhile to figure out. There is very little debug logging in the code (which is why I'm not bothering to ask for a debug log), and I'm still trying to figure out how some of the features/functions work.  I suspect I'm going to have to go through the code line by line, add better debug logging, and then see where things are.
Wait, i tried on windows (Kodi Matrix) and i don't have this problem

will try again with libreelec deleting app and reset
(2020-04-17, 20:53)Roby77 Wrote: Wait, i tried on windows (Kodi Matrix) and i don't have this problem

will try again with libreelec deleting app and reset
@Roby77, I thought I'd check and see how the reinstall went on libreelec.  At this point your issue (if it persists), is the only one I know of that's outstanding, and if it's working for you on all platforms, then I might talk to @tomasiek about pushing this version to the main Kodi 18 and Kodi 19 repos so we have something functional for the current and upcoming versions of Kodi.
Yes i can confirm that after reinstall all works perfectly (or maybe was a Kodi build bug)

I noticed only that if I'm on profile 1 and lower volume 1 at 75 ( example) on restart volume is always on 75 even if profile 1 is selected for wakeup restart

If I remember correctly old plugin on restart also loaded volume of profile 1

BTW maybe is better as it is now

Thank you
(2020-04-20, 23:37)Roby77 Wrote: Yes i can confirm that after reinstall all works perfectly (or maybe was a Kodi build bug)

I noticed only that if I'm on profile 1 and lower volume 1 at 75 ( example) on restart volume is always on 75 even if profile 1 is selected for wakeup restart

If I remember correctly old plugin on restart also loaded volume of profile 1

BTW maybe is better as it is now

Thank you
If I understand you correctly, I'm not able to duplicate that here, but I've been updating code, so maybe I accidentally fixed something.  For me when I start Kodi Profile 1 (or which ever one I set in the settings to load at startup) loads and changes the volume to what I saved it at.  Anyway, I just posted a new beta (see below), so maybe that'll change things for you.
New Beta Available

v1.4.2~beta3
changes for better code compatibility between Kodi 18 and 19
setting to pop up dialog box when playback start works again
fixed notifications so save notifications show even if notifications are off
fix so you don't have to restart Kodi for settings changes to be reflected
added option to set delay before pop up dialog automatically closes
added option to enable debug logging (standard for Kodi addons)
cleaned up some setting descriptions
updated Italian language file

Please note that there are separate zip files for Kodi Leia (v18) and Matrix (v19). You need to download the correct one based on your Kodi version.  To get the new beta go to https://github.com/notoco/script.audio.p.../releases/

I think this gets the Kodi 18/19 version feature complete.  There were definitely a number of things that still weren't working that are now (like the option to display a pop up selector every time you started playback).  I also updated some of the setting language to better reflect what it was really doing.  For instance, there was a setting that say "include player settings," but in reality it was including the Player settings from the VIDEO area, nothing else.  So that one now reads, "include video player settings."  I've tested this on both Kodi 18 and Kodi 19 (although with a nightly that's probably a week old).  I updated all the language files as best I could with Google translate, but if you're using one of the languages AP supports (Hungarian, Italian, or Polish) and see an obvious mistake in the settings area, let me know.

One important thing to note.  The Kodi folks ask addon developers to not flood the debug log with data unless we're actually trying to solve a problem, so the addon now has a setting to enable debug logging.  If you run into problems and I ask for a debug log, you will have to enable that setting AND turn on debug logging in Kodi.  if you don't do both, I won't get what I need to troubleshoot.

I'm still hoping to hear from @tomasiek about when we might push this to the actual Kodi repo.  If I haven't heard anything from them another week or so, I may have to decide whether to just take control of the maintenance of the addon.
(2020-04-24, 00:53)pkscout Wrote:
(2020-04-20, 23:37)Roby77 Wrote: Yes i can confirm that after reinstall all works perfectly (or maybe was a Kodi build bug)

I noticed only that if I'm on profile 1 and lower volume 1 at 75 ( example) on restart volume is always on 75 even if profile 1 is selected for wakeup restart

If I remember correctly old plugin on restart also loaded volume of profile 1

BTW maybe is better as it is now

Thank you
If I understand you correctly, I'm not able to duplicate that here, but I've been updating code, so maybe I accidentally fixed something.  For me when I start Kodi Profile 1 (or which ever one I set in the settings to load at startup) loads and changes the volume to what I saved it at.  Anyway, I just posted a new beta (see below), so maybe that'll change things for you.

Let m try to explain better even if my English is terrible

Profile 1 volume 100 ...that is also default profile for Kodi at startup

I decrease the volume down to 75% for example

At restart / reboot of kodi profile 1 is not loaded because was already on profile 1 so volume is 75%

With old addon version profile default was always loaded so volume was always Reset to profile setting

For me would be better this situation cause waf

Or Maybe you could be so kindly suggest me a code to put in autoexec.py to reset volume on every reboot ?
(2020-04-24, 01:53)Roby77 Wrote:
(2020-04-24, 00:53)pkscout Wrote:
(2020-04-20, 23:37)Roby77 Wrote: Yes i can confirm that after reinstall all works perfectly (or maybe was a Kodi build bug)

I noticed only that if I'm on profile 1 and lower volume 1 at 75 ( example) on restart volume is always on 75 even if profile 1 is selected for wakeup restart

If I remember correctly old plugin on restart also loaded volume of profile 1

BTW maybe is better as it is now

Thank you
If I understand you correctly, I'm not able to duplicate that here, but I've been updating code, so maybe I accidentally fixed something.  For me when I start Kodi Profile 1 (or which ever one I set in the settings to load at startup) loads and changes the volume to what I saved it at.  Anyway, I just posted a new beta (see below), so maybe that'll change things for you. 

Let m try to explain better even if my English is terrible

Profile 1 volume 100 ...that is also default profile for Kodi at startup

I decrease the volume down to 75% for example

At restart / reboot of kodi profile 1 is not loaded because was already on profile 1 so volume is 75%

With old addon version profile default was always loaded so volume was always Reset to profile setting

For me would be better this situation cause waf

Or Maybe you could be so kindly suggest me a code to put in autoexec.py to reset volume on every reboot ? 
Thanks. That's more clear.  I did notice that the profile is not loaded at startup if it was the active profile at shutdown, so at least now I can see about tracking that down.  In the interim, you might try this in your autoexec.py file:

python:

import xbmc
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Application.SetVolume", "params": {"volume": xxx}, "id": 1}')

Just replace xxx with the value for the startup volume (0 - 100).  I tested it quickly on my development setup, and it worked.
New Beta Release

v.1.4.2~beta4
fix so the auto loaded profile for startup is always loaded
added option to disable auto load of profile at startup if it's the one that was enabled at shutdown

Please note that there are separate zip files for Kodi Leia (v18) and Matrix (v19). You need to download the correct one based on your Kodi version.  You can get this beta release at https://github.com/notoco/script.audio.p...s/releases

This should return the script behavior to what @Roby77 was describing. If you don't want the profile to reload at startup if it was the active one at quit, there is an option right under the auto start selector to turn the force auto load at startup off.
(2020-04-24, 01:01)pkscout Wrote: New Beta Available

v1.4.2~beta3
changes for better code compatibility between Kodi 18 and 19
setting to pop up dialog box when playback start works again
fixed notifications so save notifications show even if notifications are off
fix so you don't have to restart Kodi for settings changes to be reflected
added option to set delay before pop up dialog automatically closes
added option to enable debug logging (standard for Kodi addons)
cleaned up some setting descriptions
updated Italian language file

Please note that there are separate zip files for Kodi Leia (v18) and Matrix (v19). You need to download the correct one based on your Kodi version.  To get the new beta go to https://github.com/notoco/script.audio.p.../releases/

I think this gets the Kodi 18/19 version feature complete.  There were definitely a number of things that still weren't working that are now (like the option to display a pop up selector every time you started playback).  I also updated some of the setting language to better reflect what it was really doing.  For instance, there was a setting that say "include player settings," but in reality it was including the Player settings from the VIDEO area, nothing else.  So that one now reads, "include video player settings."  I've tested this on both Kodi 18 and Kodi 19 (although with a nightly that's probably a week old).  I updated all the language files as best I could with Google translate, but if you're using one of the languages AP supports (Hungarian, Italian, or Polish) and see an obvious mistake in the settings area, let me know.

One important thing to note.  The Kodi folks ask addon developers to not flood the debug log with data unless we're actually trying to solve a problem, so the addon now has a setting to enable debug logging.  If you run into problems and I ask for a debug log, you will have to enable that setting AND turn on debug logging in Kodi.  if you don't do both, I won't get what I need to troubleshoot.

I'm still hoping to hear from @tomasiek about when we might push this to the actual Kodi repo.  If I haven't heard anything from them another week or so, I may have to decide whether to just take control of the maintenance of the addon.

I do not claim any rights to this add-on. I just resuscitated him. And you gave him a new life, so I am very much in favor of you taking over the care of this project. So - take control of the maintenance of the addon Smile!
  • 1
  • 21
  • 22
  • 23
  • 24(current)
  • 25

Logout Mark Read Team Forum Stats Members Help
Audio Profiles - Easy switch between different audio settings3