Kodi Community Forum
[Web Interface Addon] AWX - Ajax based Web Interface Addon for XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Web Interfaces (https://forum.kodi.tv/forumdisplay.php?fid=156)
+---- Thread: [Web Interface Addon] AWX - Ajax based Web Interface Addon for XBMC (/showthread.php?tid=81775)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


- newphreak - 2011-10-08

Just notice how awesome web ui's were. Would it be possible to add some fanart in the background here etc? so much space going to waste hehe.
Image


- mullcom - 2011-10-10

dont work on Eden :U


- frolick - 2011-10-10

mullcom Wrote:dont work on Eden :U

Yeah, it looks like somebody decided to change the name of a parameter from "fields" to "properties" in the JSON-RPC calls on the 18th of September.

https://github.com/xbmc/xbmc/commit/481a6007e899bdba21f2b500ef4ad90ddd6b62eb

I'll make the changes when I get a chance, but if you want to get it working right now, my bet is that you can replace all the "fields" with "properties" (both with quotes) in lib.xbmc.js.

That is assuming that's the only change they made.


- frolick - 2011-10-10

newphreak Wrote:Just notice how awesome web ui's were. Would it be possible to add some fanart in the background here etc? so much space going to waste hehe.


Yeah, that should be possible. I believe that you can get the fanart location through the JSON-RPC interface. It's just a matter of figuring out how to best display it.

I'll add it to my things to learn how to do when I get some time. It's going to be after creating a recently added section and displaying a check mark on items you've watched though.


- thevorticon - 2011-10-13

frolick Wrote:Yeah, it looks like somebody decided to change the name of a parameter from "fields" to "properties" in the JSON-RPC calls on the 18th of September.

https://github.com/xbmc/xbmc/commit/481a6007e899bdba21f2b500ef4ad90ddd6b62eb

I'll make the changes when I get a chance, but if you want to get it working right now, my bet is that you can replace all the "fields" with "properties" (both with quotes) in lib.xbmc.js.

That is assuming that's the only change they made.

Yeah this gets the library showing up again for me on Eden (did a few other edits too) but when I try to play a video from it, I get a "Failed to Clear Playlist" error.

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?

Edit: Here's my WIP: http://dl.dropbox.com/u/400974/webinterface.awx.zip


- frolick - 2011-10-13

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/c4f161e177f5e079f2ba67c264c2ebb85a9a2b03

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.


- Mizaki - 2011-10-13

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


- frolick - 2011-10-14

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


- thevorticon - 2011-10-14

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.


- johnham - 2011-10-14

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?


- frolick - 2011-10-14

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.


- Mizaki - 2011-10-14

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.


Volume fix - Mizaki - 2011-10-15

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}',



Some fixes for PRE-11.0 - pecl24 - 2011-10-19

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


- Mizaki - 2011-10-19

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.