Audio Selection Plus Plugin

  • Reichi
    PLEASE spend few hours to implement `Audio Tracks sorting by Priority` directly into Enigma2
    when tracks list is generated on read pmt


    as i wrote before any external solution can't be perfect, cause then we lose storing of last used track


    with my script method there were too long delay
    with Gutemine's plugin, sometime works sometime not and cant accept why choose limited count of values

    Code
    config.plugins.audioselectionplus.audio8=ORY
    config.plugins.audioselectionplus.audio9=org
    config.plugins.audioselectionplus.audio4=Original
    config.plugins.audioselectionplus.audio5=Undetermined
    config.plugins.audioselectionplus.audio6=orj
    config.plugins.audioselectionplus.audio7=Tonoption 2
    config.plugins.audioselectionplus.audio1=Latvian
    config.plugins.audioselectionplus.audio2=Russian
    config.plugins.audioselectionplus.audio3=English
    config.plugins.audioselectionplus.zapping=1


    when i suggested single line parameter long time ago

    Code
    config.audio.LanguagePriority=Latvian#Russian#rus#English#englisch#engl#orj#dos#ORY#orig#org#Tonoption 2#Undetermined#


    @gutemine
    try my settings on EuroNews 19E/13E, maybe doesn't work cause service and prio list contan two tracktitles which pass

  • Your parameter list is simple nonsense as the preffered trackes are search from 1---9. If the string from 1 is found searching stops, if not it searches continues for the string from 2, etc...


    So this is NOT a sort it is a search with simple text string finds !


    And if you have many sats which need to be changed via DieseqC or Rotor the 1 sec preselection delay on zapping will be too low, you will have to use 2-3 seconds as it works ONLY if all audio tracks are already listed so that the search works as it should.


    And sorting in enigma2 hast the weakness that you then end up with channellists not compatible depending on your settings. Doing this as a simple preselection has it's weakness, I agree but you have the big advantage that everything else stays as it is.


    At the moment I'm doing some housekeeping and code enhancements with some very usefull inputs that I got and then we'll see if it works.

  • In den letzten Tagen kahm doch einiges an Input was man im Code und
    im Handling noch verbessern könnte. Der Code wurde als massiv aufgeräum
    und auch verbessert. Nochmals Danke an alle Beteiligten die dafür
    Wertvolle Inputs und sogar Code Beispiele geliefert haben.


    Insbesondere gibt es jetzt nur mehr eine routine um den bevorzugten
    Track im menu und beim zappen zu finden, was das Erweitern des Plugins
    noch einfacher machen sollte.


    Zusätzlich habe ich noch wie gewünscht die Möglichkeit eingebaut im
    Audio Menu angezeigte Tonspuren mit der Taste 0 in die asp.conf zu
    übernehmen.


    Also viel Spass beim Testen der neuen version 0.13.


    LG
    gutemine

  • Your parameter list is simple nonsense as the preffered trackes are search from 1---9. If the string from 1 is found searching stops, if not it searches continues for the string from 2, etc...

    what exactly there is nonsense?
    my native is latvian, russian i know almost as native and some words in english i know cause ~20 years contacting with PCs
    [Blockierte Grafik: http://www.dream-multimedia-tv.de/board/index.php?page=Attachment&attachmentID=7559&h=703e16aacc3c9e915cc083668c6c8326554bdc93]


    So this is NOT a sort it is a search with simple text string finds !

    this was obvious, but i reported about case when none of track were selected


    And if you have many sats which need to be changed via DieseqC or Rotor the 1 sec preselection delay on zapping will be too low, you will have to use 2-3 seconds as it works ONLY if all audio tracks are already listed so that the search works as it should.

    all LNBs are static


    And sorting in enigma2 hast the weakness that you then end up with channellists not compatible depending on your settings. Doing this as a simple preselection has it's weakness, I agree but you have the big advantage that everything else stays as it is.


    what incompatibility you are talking about?


    Reichi; @anyone who have access to Enigma2 code
    when Enigma2 reads PMT just reorder presented tracks by if(0=InStr(config.AudiotracksPrioLine,TrackTitle),999,InStr(config.AudiotracksPrioLine,TrackTitle))+if(confi.prefereAC3,Track is Not AC3,Track is AC3)
    this is MySQL example, dont think in C it will take several pages of code.
    then listed tracks will come to the top of the list and when last used not stored in lamedb you will have some of usable track.
    switching always(outside E2 method) don't like cause some services can contain many of your preferred track titles,
    but which is original and which is translation can be different, when i know both of them i prefer original what isn't possible with AudioPlus
    E2 inside sorting will be useful also for thous users who's languages are present in second page of audio tracks list
    [Blockierte Grafik: http://www.dream-multimedia-tv.de/board/index.php?page=Attachment&attachmentID=7560&h=991aef46ecc3a6b6d0038430e3997763fdfb2ced]


    At the moment I'm doing some housekeeping and code enhancements with some very usefull inputs that I got and then we'll see if it works.

    sorry have not tested jet

  • What I mean with nonsense is putting your preffered language so low in the searchlist will not produce sensemaking results as search happens from top to bottom and often it will not be reached at all to be checked.


    And you could also sort the list with the plugin, python sort ist not that bad, but I prefere to keep the list as it is generated from enigma2 as it will be the same on every box for the same channel. As soon as you start pre-sorting it within enigma2 binary the result will vary.


    Look at how PLI implemented it in their Images, and they have the (old) enigma2 sources too to satisfy your wishes.

  • What I mean with nonsense is putting your preffered language so low...

    really 9 stronger than #1 ?!
    i tough 1 is stronger then comes 2; 3; ....


    And you could also sort the list with the plugin, python sort ist not that bad, but I prefere to keep the list as it is generated from enigma2 as it will be the same on every box for the same channel. As soon as you start pre-sorting it within enigma2 binary the result will vary.

    i believe python can sort, but this will be still `always switch` method, with this we lose store last used track option
    i really don't like to lose one feature by implement another
    with e2 inside sorting outside solutions will not be disabled, but will come unnecessary


    Look at how PLI implemented it in their Images, and they have the (old) enigma2 sources too to satisfy your wishes.

    have tested it more than year ago, they also have `always switch` method


    O.T.
    in case talk about sorting in python, can you help with solution sort files in order where ignored upper/lower case, but list contain original titles

    Code
    list = os.listdir("/usr/script")
    # this returns random order list
    #list = [x[:-3] for x in list if x.endswith('.sh')]
    # this doesnt work
    #list = [x[:-3] for x in list.sort() if x.endswith('.sh')]
    # first come all files with upper case .....
    list = [x[:-3] for x in sorted(list) if x.endswith('.sh')]
  • reporting about 13 vers
    1. asp.conf were replaced without dialog
    2. found one service after visit which AudioPlus stops work - Euronews on 28E, it has crazy track titles
    (on first zap *russian* were found)


    http://10.0.10.8/web/getaudiotracks:

  • another try explain difference between external and way how it must be implemented directly into Enigma2


    just imagine, two services:
    one has languages AA as original and BB as translated
    second has BB as original and AA as translated


    priority list contains AA; BB; CC; ...


    when you zap to second service AudoPlus(as any external solution) will change audiotrack to second(translated)
    in case i can speak both languages i prefer listening original track


    the correct solution is Enigma2 change order of tracks when read PMT
    and when not stored previous used(or stored has been gone) use first in sorted list


    imagine another case
    some services have more than 9 audio tacks and your language is somewhere in second page
    i think you will be only happy about see your tack in first positions cause you don't care so much when other track which you don't speak will be pushed out to second page


    without external audio priority stuff i have around 20 services where i have to change audiotrack on first zap
    (mostly cause Enigma2 lose such and other info on each autoscan also for already present services)
    with external audio priority stuff i have 2 services where i have to change audiotrack on each zap
    only internal solution can help there ...

  • Eeven if you do it in enigma2 it will NEVER by perfect and always work as there are TOO many channels with TOO many creative Track labels.


    BUT it it only works in 90% then it is already much besser then pressing Audio that often. And as I'm a pretty pragmatic programmer it will never be perfect either due to this.


    In Version 0.14 now you can have your own asp.conf on /etc/enigma2 which will not be replaced from an upgrade anymore (so the asp.conf is just a template/fallback if there no asp.conf is foun) and /etc/enigma2 means you can include it also in a settings backup from enigma2.


    And keeping last track remembering working is quite easy, simply turn of zapping preselct in AudioSelectionPlus and use Menu preselect only - then you only press Audio 2x in case you want him to search for a better Track.


    And regaring your AA/BB example - if Original as Trackname is once French and once English and you have the priority of original higher then for example English or French will always produce wrong result, no matter how and where it is implemented.


    Ciao
    gutemine

  • And keeping last track remembering working is quite easy, simply turn of zapping preselct in AudioSelectionPlus and use Menu preselect only - then you only press Audio 2x in case you want him to search for a better Track.

    similar suggestian as uninstall :smiling_face:
    and btw dm8k doesn't have Audio key, on double Yelow comes subtitle

    And regaring your AA/BB example - if Original as Trackname is once French and once English and you have the priority of original higher then for example English or French will always produce wrong result, no matter how and where it is implemented.

    with my suggested way this will be solved
    any programmer must agree less code must be preferred


    last try explain difference, now in colors - what we have now; what comes as external; what we miss
    Enigma2:
    reads PMT
    change order of Audio tracks
    if Previous Used Audio track not stored Or Previous Used Audio track not found then
    _ switch(first time) Audio track to first in Audio tacks list
    else
    _ switch(first time) Audio track to Previous Used Audio track
    External:
    sleep X seconds
    ask to Enigma2 what Audio tracks are present
    choose highest priority track title
    ask to Enigna2 which Audio track is selected
    if highest priority track <!> Audio track is selected
    _ ask to Enigma2 switch(second time) to highest priority track

  • You don't need to explain to me again I fully understood on the first explaination.


    BUT there is not a real difference of choosing best track or choosing first track pre-sorted as best.


    This was exactly the reason why I implemented BOTH - preselection in Menu and Preselection on Zapping.


    it would be pretty simple to sort the list in python before displaying and for example show always the choosen one as first, then the second best,... if only this makes you happy. There is no need to add this burden to enigma2 binary.


    The number shown on the Audio Selection screen in the and the track number of enigma2 can be easily decoupled by having a sotted list for display and a non sorted (orignak) list in python, but then the added value is then still close to zero when most people will want it to be happening on zapping automatically where there is no visible Tracknumber at all and it is totally unimportant which track number enigma2 internally would remember.


    But the sources are open and now even cleaned up, and I told you now also how it can be implemented within the plugin, so you are welcome to produce an AudioSelection++ Plugin :smiling_face:


    BTW the funny thing is that at the moment the feedback is very limited, as the people seem to be simply using and enjoying it as it is.


    Ciao
    gutemine

    Einmal editiert, zuletzt von Lost in Translation ()

  • You don't need to explain to me again I fully understood on the first explaination.

    that mostly were addressed to DMM developers and for those who live on another planet as we
    we think Dreambox must have that important feature others think Dreambox cant be improved


    BUT there is not a real difference of choosing best track or choosing first track pre-sorted as best.

    option `store last used audio track` has been lost, that is most important difference - one feature don't have to send other feature into garbage
    switching AudioTrack is done twice, not critical but definitely shows code isn't in best condition


    This was exactly the reason why I implemented BOTH - preselection in Menu and Preselection on Zapping.

    almost same as not use plugin at all, what means set manually audio track for about 20 services after each sat scan


    it would be pretty simple to sort the list in python before displaying and for example show always the choosen one as first, then the second best,... if only this makes you happy.
    There is no need to add this burden to enigma2 binary.

    outside of enigma2 this will not change anything


    The number shown on the Audio Selection screen in the and the track number of enigma2 can be easily decoupled by having a sotted list for display and a non sorted (orignak) list in python, but then the added value is then still close to zero when most people will want it to be happening on zapping automatically where there is no visible Tracknumber at all and it is totally unimportant which track number enigma2 internally would remember.

    what you mean "a non sorted (orignak) list in pytho", this list comes from Enigma2, if this list will be sorted at beginning other utilities will not have any problems
    personally me can't see anything bad on change order of audio tracks, but there is alternative, didn't show cause first i like better
    Enigma2:
    reads PMT
    if Previous Used Audio track not stored Or Previous Used Audio track not found then
    _ clone Audio tracks list
    _ change order of Audio tracks in cloned list

    _ switch(first time) Audio track to first in Audio tacks cloned list
    else
    _ switch(first time) Audio track to Previous Used Audio track
    External:
    sleep X seconds
    ask to Enigma2 what Audio tracks are present
    choose highest priority track title
    ask to Enigna2 which Audio track is selected
    if highest priority track <!> Audio track is selected
    _ ask to Enigma2 switch(second time) to highest priority track


    But the sources are open and now even cleaned up, and I told you now also how it can be implemented within the plugin, so you are welcome to produce an AudioSelection++ Plugin :smiling_face:

    my skills are so limited, but if DMM will ignore then can't see other solution as create exceptions list where store services references on which auto select have to skip change track
    from my point of view that solution can't be call other than "trough the ass"


    BTW the funny thing is that at the moment the feedback is very limited, as the people seem to be simply using and enjoying it as it is.

    don't think i not respect your work, but there also feedback is less than downloads
    http://www.dream-multimedia-tv…age=Thread&threadID=13752


    are there lot of people who speaks three and more languages?

  • You still didn't get the point what track sorting means to the last audio selected - guess where this gets stored - in channel settings!


    If your tracks will be different depending of how they were sorted then the channel settings suddenly will depend on what you entered for sorting and will not be so easily interchangeable as you create a dependency between channels and settings. it is already a pain for people to understand that channel settings depend on the satellites.xml used, if you want to increase this pain - OK, but bot with me.


    The second bad news is that I'm not getting horny from my download numbers, or number of posts, etc. otherwise i would never have made some of my plugins :smiling_face:


    Anyway, I've not found a good solution for the mess with the yellow button for audio on old remote either, but if you are NOT liking the disabeel preselect on zapping and just use preselect on menu approach to keep the last selected audio tracks as they are - unless you don't like them, I could offer to make a preselect on demand feature into the plugin too.


    It would be very simple to add a kind of double klich feature to the plugin, so if you press audio very fast in sequence then this will trigger the audio preselect and instantly exit the Audio Selection menu. This then would work with yellow double klick too :smiling_face: Then you could keep preselect on zapping of an quickly check for a better one dependent on your search buttons.


    This would be matching the current design or the plugin, as I already have a config entry for the enhancement what should happen on Audio Button if you are within the Audio Selection - exit, zapping on nothing which is the default. This featire currently will not work if your Rc has no audio button, so only none is OK in this case. There I would simple add doubleselect as option for this double klick feature. It is only very few code, as I just need to check the timestamps between the 2 clicks and in case there is less then X00msec difference I would consider this as double click, run the preselct routine and exit with the result.


    Again not what you are looking for, but as somebody has to implement it it is at least a feature me and others might also see as valuable for quickly checking if there isbetter audio track there.


    Ciao
    gutemine

    4 Mal editiert, zuletzt von Lost in Translation ()

  • AudioPIDs are not stored in channels list(/etc/enigma2/lamedb) cause they can come and go,
    only last used is stored and it is compared with currently presented in PMT
    actually if Enigma2 didn't lose that info on sat scan there were enough already present `store last used audiotrack` option
    not first and will not the last thing which is made in style somehow


    about `Menu preselect only` mode, i can't understand the point of use some automation plugin in manual mode - best or nothing


    well, in case there anyway no big chances DMM will implement this(maybe because same way solution will solve choosing right EPG)
    there some ideas:
    1. when `Zapping preselct` mode is on by double click Audio/Yellow chose AudioTrack manually and store service reference in exceptions list
    and next time do nothing for that services which references are stored
    2. skip search better if first audio track title of service is found in any of config.plugins.audioselectionplus.audio1-9
    3. skip search better if first audio track title of service is found in new parameter config.plugins.audioselectionplus.skipsearchbetterfor=latvian;russian
    4. mathematics:
    calculate rating for each present by number in Audio tracks list + number from priorities where track title is found(+10 if not present)
    during calculate remember smallest value
    then go trough list again and stop choice on first with remembered smallest value

  • You are still insisting to sort instead of search ?


    Please understand how the human in fron of the TV normally works - he doesn't SORT the Audio lists and then choose top of the list either, he quickly scans from top to bottom until he finds his favourite language and then it simply chooses this - and that is exactly what the Plugin tries to emulate as close as possible, because it is the easiest to understand and handle for the users in my opinion.


    As soon as I start to have exceptions or remember last choosen the plugin will depend on your channel list, which again I try to avoid if not really needed. Otherwise you endup with an endless list of channels with blacklist and whitelist, etc which is already a pain now - wthout Audio Channels on top of this.


    You have to understand how I'm working, I'm not building ANY sophisticated stuff, I like my Plugins simple and easy and therefore I know exactly what things to avoid, not matter how hard you are asking for it :smiling_face:


    So let's see what I can do for you and the other users over the weekend.


    Ciao
    gutemine

  • choose best track is primary!
    all four suggested ways will solve problem which i described with AA; BB tracks example,
    then how about nr 4. this way don't need external files etc.


    about sorting yes and no, but better have option and then have choice use or not


    about "how the human in fron of the TV normally works"
    values on the top of the list you will find much faster than between 5-9 and values >9 are out of the list at all
    and with scrollbarMode="showNever" you can only guess about that extra tracks
    o.t. look at menu->setup->system->timezone this section doesn't look that way cause human eyes works that way, but cause developers don't have to visit that section ever

  • No, regular patterns are more predicable for humans then things looking different all the time due to sorting which gives different results depending what is broadcastet.


    And it doesn't help to break simplicity to solve all problems by creating new ones.


    Anyway, you got your offer and I'll see if I can implement this on weekend.

  • Version 0.15 of the AudioSelection Plus Plugin is now available. It doesn't switch audio tracks anymore if there is only 1 audio track. And for the audio key in the prlugin there are now 2 new double click settings - doubleselect triggers a manual Audio Track selection based on your search criterias and doubleexit will do this and exit.


    Havew fun testing the 0.15


    Ciao
    gutemine

  • Ich habe in der 0.16 den Doubleklick wieder rausgeworden, dafür kann man
    sich jetzt aussuchen ob man auf 0 oder Audio die ganzen Enhancements
    haben will und das Hinzufügen von texten in die asp.conf ist dafür auf
    die TEXT Taste gewandert.


    ich hoffe jetzt können auch die Leute mit der alten FB ohne Audio Taste den vollen Funktionsumfang nutzen.


    LG
    gutemine