Req Handle favorites
#16
"type" is fine. Ideally we could replace "windowid" with "window" and return the name of the window so that it can be used in GUI.ActivateWindow. Otherwise we have to extend GUI.ActivateWindow to also support window IDs.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#17
Since I'm still in learning curve and doing / updating PR involve lots of git reset / cherry pick because of my visual studio 2012 I'll do the PR after review from my repo if it's ok for you Smile

https://github.com/Tolriq/xbmc/commit/bb...5e825960a5

Implemented the GetFavourites in the way we said.

Edit : All ok now, seems I just need to allow null value and set it by default Smile
Reply
#18
I added some comments. Apart from that I'd say it's ready for a PR.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#19
For Add / Delete for favorites any thoughts ?

Can we go with passing the actual objects returned by the get counterpart ?
Reply
#20
I'd do the Add similar to how SetFooDetails works for video and audio library except that it will have more required parameters.
Not sure how to handle the Delete though as passing in the whole object sounds a bit cumbersome.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#21
Hi,

Tolriq mentioned this thread, so i post here.

I am delveloping a webinterface, where i use Favorites. So far you can list, start, add and remove favorites. The remove works with adding again the favorite, which might be a bug.

One thing i would like to have, and another which should change:
- changing position of favorites. My personal list is quite long, and i often move favorites which are added at the buttom by default to the near top of the list. would be nice to be able to do it with json-rpc, because i often have no screen on (radio and potcasts from plugins). Would that be difficult to add? For the Playlist it's possible in the way, that i can remove an item, and than add it at a different location. i think favorties are different here, since the GUI already is giving the possibility to move an item up or down. so an up/down thing would be ok.
Maye "Favourites.MoveFavourite" with params "Path" (which one) and "direction" with "up" or "down"?
- official/clean way of removing favorites. i would suggest with the Favourite path as attribute. something like "Favourites.RemoveFavourite" (according to add) where a param would be the path.

in the GUI it's also possible to change the Description (Rename) and to change the Prev. Picture. I am not sure if this would be important. No need from my side.

since chorus (not my interface) has an own solution (thumbs up) i think it could be because of the limitations of accessing favorites over json-rpc. so maybe others would like to see improvements as well.

what do you guys think about that?
Check out my plugin yarc, it's a web-remote optimised for all screen sizes (especially touch and small screen).
Reply
#22
(2016-02-20, 15:40)tuxfuxch Wrote: The remove works with adding again the favorite, which might be a bug.

Big Grin I never knew that! You can remove a favourite with JSON-RPC by just adding it again.
Reply
#23
hi ncarthy,
sorry for the way to late reply.
well it works, but only sometimes. a clean way would be better. i think it need to "be added again" with the correct parameters. if the link changes a bit, it does not work i think, but never closley tried it out. maybe i will at one point in the future and write here if i found out.
Check out my plugin yarc, it's a web-remote optimised for all screen sizes (especially touch and small screen).
Reply
#24
I've used it extensively and it definitely works. The favourites are just stored as a very simple xml file so it would be possible to query that file to find the exact parameters required but I don't bother. It works most of the time as you said.
Reply
#25
ok thanks for the background info and good to know. the thing is, that i modify the links if needed and i suppose it does not work in that case. i need to investigate it again, and maybe before deleting just get the very record again and "add" (remove) it with the parameters as it comes unmodified. but i really miss a clean method of doing it (for example removing by id or list position), and the functions which has the GUI such as moving in the list or modify name.

edit: if i may ask: where do you use it? do you have a webinterface or another remote? would like to have a look at it.
Check out my plugin yarc, it's a web-remote optimised for all screen sizes (especially touch and small screen).
Reply
#26
I use it in a module I wrote to link Kodi to Crestron systems. It's written in Crestron's proprietary language SIMPL# so it will not really be very helpful to you.
Reply
#27
Hello,

in the Favourites.AddFavourite method;

Can you add an optional parameter called "scriptparameter"
used for script favorite type. that way scripts can take parameters too.

similar in use to windowparameter
Reply

Logout Mark Read Team Forum Stats Members Help
Handle favorites0