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(current)
  • 24
  • 25
Release Audio Profiles - Easy switch between different audio settings
Ops sorry 

Link corrected

http://www.easybytez.com/yqukh5uenyv0
In fact, for all this to make sense, I will have to clean the plugin from backward compatibility - since it won't work on 17/18 anyway. So there will be 2 repos - 1 default for k19, the second, new for k17 / 18 - that will die a natural death. I do not have time to adapt the plugin to the requirements of the official kodi repo, so at the moment it will remain as it is.
i hope that no other mods are required in future cause i don't have any python programming skill Big Grin
So do I Smile
Unlucky at every Kodi restart default profile isn't anymore switched

Kodi 19 on libreelec
(2020-03-05, 13:08)tomasiek Wrote: In fact, for all this to make sense, I will have to clean the plugin from backward compatibility - since it won't work on 17/18 anyway. So there will be 2 repos - 1 default for k19, the second, new for k17 / 18 - that will die a natural death. I do not have time to adapt the plugin to the requirements of the official kodi repo, so at the moment it will remain as it is.
I could probably help with that.  I forked the current version and ran a Codacy check on it, and the updates to clean up the code aren't that bad.  The one thing I did notice is that both service.py and and default.py and too complex.  The standard for Kodi is that these files be just a few lines to load the necessary code.  I'm not sure when that changed, but I had to update Artist Slideshow to work this way when I started submitting to the Leia or Matrix branches.

The trick is that I'm never sure what the Kodi maintainers will want changed during code review, so I'd basically have to make the changes I know are needed, do a pull request to your repo so we could all test them, submit to the Leia branch, fix the code as needed based on review, and then do a pull request to your repo to get all the code in sync again.  And I'm not sure how the Kodi folks would feel about multiple people potentially submitting updates.  The alternative is for me to do the initial code update and then let you do the pull request to the Kodi repo.

BTW, if the code itself is Python 2/3 compliant, there's only a small change needed to the addon.xml to have a version that works for Kodi Matrix.  You still have to submit it separately, but if you had a code review done for the Leia branch, then they usually don't do a full review again when you resubmit.

Anyway, let me know if you want a hand.  I think having this updated in the main repo would be helpful for folks.
I'm not a programmer, so any help will be useful. Only with the help of a friend I made the plugin useful in Kodi Leia. I don't even think about the Matrix yet. If you know how to fix a plugin, and you want to help, just do PR in repo. Describe what you have changed, what you have improved. I currently don't have time to do everything I wanted - changes in the work system caused by a virus.
(2020-04-13, 05:17)pkscout Wrote:
(2020-03-05, 13:08)tomasiek Wrote: In fact, for all this to make sense, I will have to clean the plugin from backward compatibility - since it won't work on 17/18 anyway. So there will be 2 repos - 1 default for k19, the second, new for k17 / 18 - that will die a natural death. I do not have time to adapt the plugin to the requirements of the official kodi repo, so at the moment it will remain as it is.
I could probably help with that.  I forked the current version and ran a Codacy check on it, and the updates to clean up the code aren't that bad.  The one thing I did notice is that both service.py and and default.py and too complex.  The standard for Kodi is that these files be just a few lines to load the necessary code.  I'm not sure when that changed, but I had to update Artist Slideshow to work this way when I started submitting to the Leia or Matrix branches.

The trick is that I'm never sure what the Kodi maintainers will want changed during code review, so I'd basically have to make the changes I know are needed, do a pull request to your repo so we could all test them, submit to the Leia branch, fix the code as needed based on review, and then do a pull request to your repo to get all the code in sync again.  And I'm not sure how the Kodi folks would feel about multiple people potentially submitting updates.  The alternative is for me to do the initial code update and then let you do the pull request to the Kodi repo.

BTW, if the code itself is Python 2/3 compliant, there's only a small change needed to the addon.xml to have a version that works for Kodi Matrix.  You still have to submit it separately, but if you had a code review done for the Leia branch, then they usually don't do a full review again when you resubmit.

Anyway, let me know if you want a hand.  I think having this updated in the main repo would be helpful for folks.  

Would be fantastic, i use this script everyday and is waf 

Works on Matrix just editing addon.xml BUT automatic switch profile on startup doesn't work anymore and also this code in autoexec doesn't work


Code:
import xbmc
xbmc.executebuiltin('XBMC.RunScript(script.audio.profiles,1)')
(2020-04-13, 18:04)Roby77 Wrote: Would be fantastic, i use this script everyday and is waf 

Works on Matrix just editing addon.xml BUT automatic switch profile on startup doesn't work anymore and also this code in autoexec doesn't work
 
Code:
import xbmc
xbmc.executebuiltin('XBMC.RunScript(script.audio.profiles,1)')
You can fix this in Matrix for now by changing XBMC.RunScript to just RunScript.  Here's info on that change for Matrix:

https://forum.kodi.tv/showthread.php?tid...pid2935397
Great! Thank you

edit: i see that probably also service.py must be updated

https://github.com/Roby77ita/script.audi...service.py

will try a modified version

EDIT: edited service.py and now default profile on startup works again

thanks for the suggestions
(2020-04-13, 06:55)tomasiek Wrote: I'm not a programmer, so any help will be useful. Only with the help of a friend I made the plugin useful in Kodi Leia. I don't even think about the Matrix yet. If you know how to fix a plugin, and you want to help, just do PR in repo. Describe what you have changed, what you have improved. I currently don't have time to do everything I wanted - changes in the work system caused by a virus.
Just FYI, I submitted a PR to your fork yesterday with the changes I think will get it through the submission process.  The code also works in both Leia and Matrix (with a change to the addon.xml for Matrix).  I was looking at the code some more, and it appears all the dialog boxes are using a call that requires you to have a skin file to create the dialog (in the old days this was the only way to do it).  Newer versions of Kodi (at least since 17) have a new SELECT dialog box you can create in code that uses whatever the current skin uses to create dialog box, so it fits in with every skin.

https://codedocs.xyz/xbmc/xbmc/group__py...0a5fdeaa4e

After you've looked through the PR, maybe it would be worth doing that too.

If I may, I am wondering, since you aren't a programmer, what your plan is for maintaining the addon.  It's currently 99% Python code with just a little XML for layout and some string files for text.  I'll happily continue pushing PRs to you if that's what you want, but I'm also open to taking over maintenance on this if there's interest.  Whatever.
(2020-04-13, 19:23)Roby77 Wrote: Great! Thank you

edit: i see that probably also service.py must be updated

https://github.com/Roby77ita/script.audi...service.py

will try a modified version

EDIT: edited service.py and now default profile on startup works again

thanks for the suggestions
Great.  I realized a few minutes ago that you don't actually need the autoexec.py thing anymore to have a profile enabled at startup.  There is an option in the settings (under AUTOMATIC SWITCH) to enable a certain profile at Startup/Wake.  The autoexec.py option will work, but I think autoexec.py has been deprecated, so it could be removed at some point in the future.
(2020-04-15, 04:50)pkscout Wrote:
(2020-04-13, 19:23)Roby77 Wrote: Great! Thank you

edit: i see that probably also service.py must be updated

https://github.com/Roby77ita/script.audi...service.py

will try a modified version

EDIT: edited service.py and now default profile on startup works again

thanks for the suggestions
Great.  I realized a few minutes ago that you don't actually need the autoexec.py thing anymore to have a profile enabled at startup.  There is an option in the settings (under AUTOMATIC SWITCH) to enable a certain profile at Startup/Wake.  The autoexec.py option will work, but I think autoexec.py has been deprecated, so it could be removed at some point in the future.

@pkscout if you want I can test it your mod.on libreelec Matrix

Thank you
(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.
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
  • 1
  • 21
  • 22
  • 23(current)
  • 24
  • 25

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