![]() |
|
|||||||
| Plugin/Script (Python) Help and Support Python requests/suggestions, support, bugs, and everything python goes in here! Please, add platform prefix to threads that are not platform-independent!: Thread prefixes; "[LINUX]", "[LIVE]", "[MAC]", "[WINDOWS]", and "[XBOX]" |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Member
Join Date: Apr 2008
Posts: 34
![]() |
Can i get the currently select library item (say from my movies) via a script?
i want to alter the keymap.xml file so that on a certain keypress whilst viewing my library it runs a script (ive done this part) the script should then be able to tell me which library item is selected, ie its filename |
|
|
|
|
|
#2 |
|
Team Arcade
Join Date: Dec 2004
Posts: 3,591
![]() |
xbmc.getInfoLabel()
Link to pydocs and manual in my signature |
|
|
|
|
|
#3 |
|
Member
Join Date: Apr 2008
Posts: 34
![]() |
|
|
|
|
|
|
#4 |
|
Team Arcade
Join Date: Dec 2004
Posts: 3,591
![]() |
that label is for what is currently playing.
|
|
|
|
|
|
#5 |
|
Member
Join Date: Apr 2008
Posts: 34
![]() |
no joy with this, im using:
label1 = xbmc.getInfoLabel("listitem.filename") the label returned is blank. I can use other labels like listitem.title, which works fine Is there a problem with asking the filename in a library view? |
|
|
|
|
|
#6 |
|
Team Arcade
Join Date: Dec 2004
Posts: 3,591
![]() |
looks like listitem.filename returns filename without the full path.
Sounds like you may want the full path? IS this correct? |
|
|
|
|
|
#7 |
|
Member
Join Date: Apr 2008
Posts: 34
![]() |
i do want the full path yep, however the request returns nothing at all, full or partial.
What should i be doing to get the full path? |
|
|
|
|
|
#8 |
|
Team Arcade
Join Date: Dec 2004
Posts: 3,591
![]() |
nothing, i'm testing something right now, just wondered if thats what you needed.
|
|
|
|
|
|
#9 |
|
Team Arcade
Join Date: Dec 2004
Posts: 3,591
![]() |
ok, when i run from library, it returns the idMovie column of the database. Are you sure your getting nothing?
One way to return this strictly from python, would be to use an sql statement and httpapi to get the resulting path and filename. But I'm testing a new infolabel, with a correction for library. If this works then it will need to be approved before commiting and you'll need to compile your own or wait for the next t3ch. If you want to just use the httpapi. PHP Code:
Last edited by Nuka1195; 2008-05-02 at 01:56. |
|
|
|
|
|
#10 |
|
Member
Join Date: Apr 2008
Posts: 34
![]() |
yes im getting nothing
When i run your alternate sql script im getting a sql error and when i look into it it seems that 'movie.idmovie=' and then it just stops so its not getting anything from xbmc.getInfoLabel( "ListItem.filename" ) thoughts? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|