adding enqueue button
#1
Hey all,

I recently converted from xlobby to xbmc and am loving it thus far. I am trying to add an enqueue button to an existing skin, but am having a hard time finding the 'on click' command to queue a movie or audio file.

I know this is available through the context menu, but i would like users not to have to pull up the context menu. Also, I cannot find the source for the context menu, am I correct in assuming it is 'hard wired' into the xbmc build?

Additionally, some help with syntax would be great.

this is the button i want to change within the skin:

Code:
<control type="button" id="11">
        <description>Trailer</description>
        <height>46</height>
    <width>160</width>
    <label>20410</label>
    <align>center</align>
    <enable>!IsEmpty(ListItem.Trailer)</enable>
</control>

i think it needs to be changed to something like this, but not sure

Code:
<control type="button" id="11">
        <description>Enqueue</description>
        <label>Enqueue</label>
        <height>46</height>
    <width>160</width>
    <label>20410</label>
    <align>center</align>
        <onclick>[b]XXXXXX[/b]</onclick>
</control>

where XXXXXX enqueues the selected file(s)

any help is appreciated.
Reply
#2
There's a number of things you can try. I suspect the only one that will really work would be to first setfocus to the list, then fire off the Queue action, then set focus back to the button.

I'm not sure if the SendClick() command can pass an action or not - if so, you could send the Queue action to the list.

Reason is that we get the queue action from the list control, not from the window in general.

To sum up:

<onclick>SetFocus(whatever_the_list_id_is)</onclick>
<onclick>Queue</onclick>
<onclick>SetFocus(whatever_the_button_id_is)</onclick>

Let us know how it goes.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
i would also drop the id="11" from button,
otherwise the built-in action may be fired as well
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
thanks for your insights thus far.

I have tested the following: the first one changes the button to say "Enqueue", but clicking on it does nothing, and I cannot scroll through buttons next to it, ie: all other buttons scroll to the next closest button but when i get to this one, it stops scrolling and stays on the last button until i scroll the other way.

also not too sure what to try for button id in the lower <onclick> below when i remove it from the first line.
Code:
                    <control type="button">
                        <description>Enqueue</description>
                        <label>Enqueue</label>
                        <height>46</height>
                        <width>160</width>
                        <label>20410</label>
                        <align>center</align>
                        <onclick>SetFocus(200)</onclick>
                        <onclick>Queue</onclick>
                        <onclick>SetFocus(200)</onclick>
                    </control>

the following also changes button text and allows me to scroll through all the buttons perfect, but when I click on the new button it exits the media player and goes to the previous page.

Code:
                    <control type="button" id="11">
                        <description>Enqueue</description>
                        <label>Enqueue</label>
                        <height>46</height>
                        <width>160</width>
                        <label>20410</label>
                        <align>center</align>
                        <onclick>SetFocus(200)</onclick>
                        <onclick>Queue</onclick>
                        <onclick>SetFocus(11)</onclick>
                    </control>

looks like keeping the id="11" is still firing a command or something, but i cannot trace what file it is defined in

any further insight is appreciated.. I'm still looking into the problem and will post back any findings
Reply
#5
what skin and which xml file are you modifying?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
this is on the Ellipsis skin, and Im editing the DialogVideoInfo.xml starting on line 564.

I put this thread here instead of the dedicated area for Ellipsis because this seems to get more traffic, and i figured this could be useful for others using other skins.
Reply
#7
alright, try this one:

Code:
<control type="button" id="1234">
        <description>Enqueue</description>
        <label>Enqueue</label>
        <height>46</height>
    <width>160</width>
    <align>center</align>
        <onclick>Action(Queue,25)</onclick>
</control>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#8
thanks a ton ronie. adds to playlist perfectly.

a few things tho, upon clicking, it adds to playlist, then cycles to the next movie in the directory (which is perfect) but the screen stays on DialogVideoInfo.xml and it still displays the info for the previous movie that was just added. if i click enqueue again, it will add the next movie in the directory, cycle again to the next movie, but will still be on DialogVideoInfo.xml showing the first movie i added.

is there a way to close DialogVideoInfo.xml <onclick>, or (even better) refresh it so it shows the next selected episode?
sorry if this is confusing, Il post back if i figure something out. thanks again for the help thus far.
Reply
#9
just add another action to the button to close the dialog:
Code:
<control type="button" id="1234">
        <description>Enqueue</description>
        <label>Enqueue</label>
        <height>46</height>
    <width>160</width>
    <align>center</align>
        <onclick>Action(Queue,25)</onclick>
        <onclick>Dialog.Close(MovieInformation)</onclick>
</control>

i don't think there's a way to refresh the info shown by the dialog.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#10
tagging this thread with touchscreen related tags. This functionality has been requested a few times by touchscreen users.. Thanks for posting your results
Reply
#11
<onclick>Action(Queue,25)</onclick>

witch control is 25 ? (what is it?)
Image
Skin.JOGGLER
----------------------------------
Download - djtoll's Add-On Repository / Add-Ons > Install from ZIP / Get Add-ons > Djtoll's Repository
Reply
#12
25 is the id of the videolibrary window.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
adding enqueue button0