WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
fetixx Offline
Junior Member
Posts: 5
Joined: Dec 2007
Reputation: 0
Post: #511
Unfortunately I am a Java programmer and not so much CPP.
However if somebody could check this in into XBMC source tree that would be great.

In the meanwhile I have finished the first Beta of my Java app which works in Windows / Linux / Mac. It sits in the System tray and notifies the user when a new song is being played on the Xbox and features on the popup (inspired by the linux app Exaile):
- Detailed Song information (With Album Art / Track No / Title / Album / Duration)
- Progress Bar / Seeking
- Previous / Play, Pause / Next

And from the System tray menu:
- Repeat
- Random
- Volume Up
- Volume Down
- Reboot Xbox
- Shutdown Xbox
- Party Mode
- Fast Forward
- Rewind

if anyone is interested drop me a line.
find quote
nad Offline
Team-XBMC Developer
Posts: 265
Joined: Feb 2004
Reputation: 0
Post: #512
Sounds a reasonable request. I should have time to do this tomorrow.

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: badge.gif]
find quote
nad Offline
Team-XBMC Developer
Posts: 265
Joined: Feb 2004
Reputation: 0
Post: #513
Change committed.

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: badge.gif]
find quote
TREX6662k5 Offline
Donor
Posts: 214
Joined: Oct 2006
Reputation: 0
Location: London, United Kingdom
Post: #514
Previously when I used to play videos, getcurrentlyplaying would also display the path of the thumbnail, just like playing audio would. However recently (I don't know when exactly) the path to a video thumbnail is not displayed anymore.

Its only displayed if XBMC is in library mode and the file is in the database.
Is this a bug or was this intentional?

WYSIWYG
find quote
KevMoore123 Offline
Junior Member
Posts: 26
Joined: Dec 2007
Reputation: 0
Location: England
Post: #515
Hi Mate,

Did you use the API to randomise songs, or did you write your own search algorithm?

Many thanks

Kev Moore
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #516
Nad,

Not sure if this is a bug or a feature i'm not using correctly, but with "Make archives with one file transparent" enabled. passing a .rar file to getDirectory() fails with Error: not folder.

With the setting disabled, getDirectory() works fine with rar files.

It doesn't matter if the rar has more than one item or not.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
nad Offline
Team-XBMC Developer
Posts: 265
Joined: Feb 2004
Reputation: 0
Post: #517
Trex: I can't seem to replicate your problem; the path is included whether in library mode or not. When the path is not included for you is the filename still correct?

Nuka: I'll investigate.

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: badge.gif]
find quote
nad Offline
Team-XBMC Developer
Posts: 265
Joined: Feb 2004
Reputation: 0
Post: #518
Nuka: should now work as expected

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: badge.gif]
find quote
TREX6662k5 Offline
Donor
Posts: 214
Joined: Oct 2006
Reputation: 0
Location: London, United Kingdom
Post: #519
Umm, I might just compile one fron svn now and see if it still occurs.

So I start playing a video on the xbox thats not in the libary, and i send a getcurrentlyplaying, I see the file and all its information is correct however there is no
Code:
<li>Thumb:
not even defaultvideothumbnail.png is shown.

Adding to the libary,
Code:
<li>Thumb:
appears and the respective path to the thumbnail is shown or defaultvideothumbnail.png

WYSIWYG
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #520
nad, unfortunately it did not work. I'm not sure if it's httpapi only though.

I looked through displaydir() and noticed that you have "*" returns just folders.

for consitency, that should be "/", which is what other areas in xbmc uses.

also can you have it return folders along with files if there is a mask set? other areas in XBMC work this way and it's up to the scripter to filter them. If that would cause issues for web sites, perhaps another option to include folders when a mask is set.

This is not vital as a script can easily filter for file types and just not set a mask.

Maybe you can dig deeper outside httpapi and see where the rar issue is, i couldn't find it.

thank you

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
nad Offline
Team-XBMC Developer
Posts: 265
Joined: Feb 2004
Reputation: 0
Post: #521
Nuka,

Are you sure you retrieved the svn with my change included (I believe it takes a few hours to be released)? I managed to replicate the fault that you described very easily and the change I submitted fixed it for me.

I'll make your * to / change (though I'll also keep the use of * for backward compatibility).

I could make the change to include folders when a mask is set but to me it doesn't seem that logical. Why return something (folders) that doesn't match the mask?

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: badge.gif]
find quote
nad Offline
Team-XBMC Developer
Posts: 265
Joined: Feb 2004
Reputation: 0
Post: #522
Trex: I see the problem; will fix it tomorrow.

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: badge.gif]
find quote
TREX6662k5 Offline
Donor
Posts: 214
Joined: Oct 2006
Reputation: 0
Location: London, United Kingdom
Post: #523
Thanks nad.

Also, I had created a feature request on the tracker, which talks about adding an extra parameter to AddToSlideshow and AddToPlayList that controls whether the action is recursive or not. Is it possible this can be added, or is this something that can be done on the client side?

Currently my script adds the files one by one in to the playlist, which can consume both time and network resources. And I don't want to the script to simulate the xboxes actions by also going though all the folders because i'd be making more problems than solving.

WYSIWYG
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #524
yes i'm sure and it doesn't take hours for svn to update.

rar files are not seen as folders at all with "Make archives with one file transparent" enabled, not just rars with one file, but if it's working for you, i don't know.

Quote:
Fixed: httpapi GetDirectory would not recognise a single file RAR as a folder when "Make archives with one file transparent" is enabled

Why return folders when you set a mask, because the subfolders may have files that match your mask, so you can drill down. makes sense to me.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,181
Joined: Oct 2003
Reputation: 175
Post: #525
If they're not seen as folders, it's because CDirectory::GetDirectory() is called with bUseFileFolders set to false (i.e. no file->folder translation is performed)

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: badge.gif]
find quote
Post Reply