[Web Interface Addon] AWX - Ajax based Web Interface Addon for XBMC

  Thread Rating:
  • 6 Votes - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
frolick Offline
Junior Member
Posts: 35
Joined: Jun 2011
Reputation: 0
Post: #291
thevorticon Wrote:Looks like it's stopping at clearVideoPlaylist, but I haven't found any commits that might have changed the VideoPlaylist.Clear function.

I'm still looking into it, but any ideas?

Well on the 31st of August Montellese merged the audio/video player into a single player called Player. He also changed how to access playlists. That's probably what the problem is. Unfortunately that means I need to change how this interface adds and clears playlists and how it plays media.

https://github.com/xbmc/xbmc/commit/c4f1...b85a9a2b03

I have no clue why it took so long for that change to make it through and start affecting the webinterface code.

Assuming he's been keeping the built in web interface up to date, I'll probably dive into that code tonight so I don't have to reinvent the wheel.
find quote
Mizaki Offline
Fan
Posts: 662
Joined: Apr 2011
Reputation: 12
Post: #292
I started doing the changes and got stuck with the player controls. Then haven't had time to go back to it. Playlist is all under just playlist now. I only use it for audio so I know the audio playlist.add and clear works. Hopefully save you some work.

lib.xbmc.js:
http://pastebin.com/DUZVQRsi

[Image: watched-clearlogo.jpg]
AWXi - Ajax web interface. Wiki
find quote
frolick Offline
Junior Member
Posts: 35
Joined: Jun 2011
Reputation: 0
Post: #293
Mizaki Wrote:I started doing the changes and got stuck with the player controls. Then haven't had time to go back to it. Playlist is all under just playlist now. I only use it for audio so I know the audio playlist.add and clear works. Hopefully save you some work.

lib.xbmc.js:
http://pastebin.com/DUZVQRsi

Thanks Mizaki, that did save me a lot of time. The controls are working now. When he refactored Player.GetActivePlayers, he decided to return an object inside of an array inside of an object which kind of threw me for a loop. The fix should be around line 337 if you want to see.

I also caught a bug that was adding songs to the playlist in the wrong order when trying to play an album. I threw out that whole function and rewrote it to use the built in XBMC function to add an album instead of trying to add it song by song.

I'm testing on the nightly from the 9th on my windows computer so things should work as of that build.

lib.xbmc.js
http://pastebin.com/gxuxkCqL
(This post was last modified: 2011-10-14 23:37 by frolick.)
find quote
thevorticon Offline
Junior Member
Posts: 16
Joined: Sep 2011
Reputation: 0
Post: #294
frolick Wrote:Thanks Mizaki, that did save me a lot of time. The controls are working now. When he refactored Player.GetActivePlayers, he decided to return an object inside of an array inside of an object which kind of threw me for a loop. The fix should be around line 337 if you want to see.

I also caught a bug that was adding songs to the playlist in the wrong order when trying to play an album. I threw out that whole function and rewrote it to use the built in XBMC function to add an album instead of trying to add it song by song.

I'm testing on the nightly from the 9th on my windows computer so things should work as of that build.

lib.xbmc.js
http://pastebin.com/DUZVQRsi
This works for me so far. Great work.
find quote
johnham Offline
Junior Member
Posts: 2
Joined: Dec 2010
Reputation: 0
Post: #295
Great work guys! I am SERIOUSLY missing this web ui since moving to nightly builds.

What would it take to commit these fixes to the official AWX add-on in the repo?
find quote
frolick Offline
Junior Member
Posts: 35
Joined: Jun 2011
Reputation: 0
Post: #296
johnham Wrote:Great work guys! I am SERIOUSLY missing this web ui since moving to nightly builds.

What would it take to commit these fixes to the official AWX add-on in the repo?

You know, I'm not sure how to get our changes into the official repo, but I'll try to figure it out.

My only concern is that what we've put together will only work on the newer nightly builds but maybe there's a way to specify which versions it will show up on.
find quote
Mizaki Offline
Fan
Posts: 662
Joined: Apr 2011
Reputation: 12
Post: #297
Thanks frolick. I think you put the wrong link, http://pastebin.com/gxuxkCqL seems to be yours Smile

JS how little I understand thee!

Maybe call it AWX-eden. I think the only other way is to have both codes bases and pick the right one per version.

Wishlist (if you are kind enough to work on it):
Recently Added (which you've mentioned)
Highlight the currently playing in the playlist
More sort options and do them from a drop down in the playlist/library
Hide watched (I'm wondering if you can do this with filter on the JSON call?)
Mark watched
Icon/posters/banners (separate for TV and audio)

Bugs:
Film file on info is "undefined."
Files - I'm not sure what it's supposed to do. I would have thought, list the sources? I only get "/media" which has nothing but dirs for mounting cdroms. Maybe it works in Windows?

I'll do what I can, when I can but I'm no programmer Sad If I do anything useful I'll put it here. It would be nice to get this on git, (not that I've used it much) so maybe we can get a few people adding to it.

[Image: watched-clearlogo.jpg]
AWXi - Ajax web interface. Wiki
find quote
Mizaki Offline
Fan
Posts: 662
Joined: Apr 2011
Reputation: 12
Post: #298
I missed this first time around.

In lib.xbmc.js line 284:
Code:
'{"jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "value": ' + settings.volume + '}, "id": 1}',

[Image: watched-clearlogo.jpg]
AWXi - Ajax web interface. Wiki
find quote
pecl24 Offline
Junior Member
Posts: 4
Joined: Oct 2011
Reputation: 0
Post: #299
Hi all,

Thanks for the work on AWX lately. I stopped using AWX after i switched to PRE-11.0 because a lot did not work but after the latest updates in this thread, the basics were working again. Some things were broken which i fixed.

So, if you're using a PRE-11.0 version from at least October 15th, these files will fix:
* Removal of individual playlist items
* Stop/next/previous buttons
* Volume slider
* Playlist refreshes after (un)shuffling

Get the files here and replace your installed ones:
http://dl.dropbox.com/u/46018035/jquery.awx.js
http://dl.dropbox.com/u/46018035/lib.xbmc.js
http://dl.dropbox.com/u/46018035/lang.en.js
find quote
Mizaki Offline
Fan
Posts: 662
Joined: Apr 2011
Reputation: 12
Post: #300
Thanks for those.

I'm working on the "Now Playing" box atm. Got it going but it really needs to be changed from using InfoLabels (which will be removed sometime). I'm almost there. Having a bit of trouble with the time and duration so any help would be nice. From the info labels you get say:
Code:
28:02
But with the Player.GetProperties you get hour, mins, secs, millisecs as separate fields. I tried:
Code:
time = hours + ':' + mins + ':' + secs;

I've found that you can't start a var (I guess string type) with a number, so I get an error. Any ideas? /me in no way a coder Smile

I converted to seconds and then used the formatTime function MKay had already put in. Next is seek and then I think the currently playing box should be done.

[Image: watched-clearlogo.jpg]
AWXi - Ajax web interface. Wiki
(This post was last modified: 2011-10-19 22:41 by Mizaki.)
find quote
Post Reply