Song Information - Star Rating question
#1
Why is it necessary to click OK when adjusting the start rating either up or down?

I'm trying to do away with this by sending an onclick action to the OK button but this closes the song info screen.

Thanks.
Reply
#2
I believe it's because it's only stored in the database on save of the dialog, rather than on the action itself. Does the dialog have a "Cancel" button? If so, it makes sense this way. If not, then sure, it could be done on change of the item (though maybe via a delayed callback to save hitting the database on-thread).
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
Yes it does have a cancel button but the whole process seems a bit long-winded when there are only 6 possible values (0-5).

Thanks for the explanation though.

EDIT: Can a song's rating be altered from MyMusicNav?
Reply
#4
i'm not sure how it's done on the musicosd, but you can change the songrating there without the need to ok/cancel.
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
#5
I'm almost there but could use some help figuring out the last problem..

I've added these 2 buttons on DialogSongInformation and they work correctly in the fact that they change the rating, send a click to the OK button, and then reload DialogSongInformation. The problem is the song list (MyMusicNav) doesn't see the changes unless refreshed.

PHP Code:
            <control type="button" id="114">
                <
description>Decrease Rating</description>
                <
label>DecreaseRating</label>
                <
onclick>DecreaseRating</onclick>
                <
onclick>SendClick(10)</onclick>
                <
onclick>ActivateWindow(songinformation)</onclick>
                <
onleft>115</onleft>
                <
onright>115</onright>
            </
control>

            <
control type="button" id="115">
                <
description>Increase Rating</description>
                <
label>IncreaseRating</label>
                <
onclick>IncreaseRating</onclick>
                <
onclick>SendClick(10)</onclick>
                <
onclick>ActivateWindow(songinformation)</onclick>
                <
onleft>114</onleft>
                <
onright>114</onright>
            </
control

Ideas?

Fixed it by adding <onback>SendClick(10)</onback> to both buttons which refreshes the list.
Reply
#6
Got it all down to one button. Big Grin

Up or Down to change the rating and click to change the thumb.

PHP Code:
<control type="button" id="13">
    <
left>548</left>
    <
top>610</top>
    <
width>1600</width>
    <
onup>IncreaseRating</onup>
    <
onup>SendClick(10)</onup>
    <
onup>ActivateWindow(songinformation)</onup>
    <
ondown>DecreaseRating</ondown>
    <
ondown>SendClick(10)</ondown>
    <
ondown>ActivateWindow(songinformation)</ondown>
    <
onback>SendClick(10)</onback>
    <
onleft>SendClick(10)</onleft>
    <
onright>SendClick(10)</onright>
    <
width>383</width>
    <
label>31166</label>
    <
focusedcolor>MedLight</focusedcolor>
    <
texturefocus>-</texturefocus>
    <
texturenofocus>-</texturenofocus>
</
control
Reply
#7
This should be added to all skins!

Drives me mad having to click left, up up up up up, right, ok just to make a star rating Big Grin
Reply
#8
(2014-02-27, 14:20)zag Wrote: This should be added to all skins!

Drives me mad having to click left, up up up up up, right, ok just to make a star rating Big Grin

Maybe it should just work like that in the first place, as it does so in other windows Wink

Nice work Hitcher Smile
Reply
#9
It could, but we'd have to kill the cancel button.
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
#10
Can't say I really see the point of the cancel button actually. What is it that we're cancelling in this window? We're not editing anything (aside from the rating, but that is covered by the above discussed method) Basically it's a just a close button, right? That function can be performed by the Ok button too I would think.
Reply
#11
It's covering the rating, yes.
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
#12
Hitcher,

I have been watching this thread for a while and thought I should give my code a spring clean by adding your code above, unfortunately my code does not seem to be working. Would you mind posting a link to your DialogSongInformation so that I can take a look and see why my activatewindow part of the code does not bring the dialog back up again.

Also, do you drop the "OK" and "Cancel" buttons completely from the code, or are you just not showing them?

Wyrm (xTV-SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#13
The trick is to remove any animations as they stop it reopening.

http://pastebin.com/T4g9cvqi
Reply
#14
(2014-03-07, 09:12)Hitcher Wrote: The trick is to remove any animations as they stop it reopening.

http://pastebin.com/T4g9cvqi

Hitcher,

yep that was it, all working now thanks mate.

Wyrm (xTV-SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply

Logout Mark Read Team Forum Stats Members Help
Song Information - Star Rating question0