Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XM Web UI Adding features
#1
over the last few days i've been modifying the vuze web UI to suit my use, mainly by adding additional sort methods that have been left out by default but can be used in the desktop client.
I've been doing this by modifying these files:
index.html
javascript\common.js
javascript\torrent.js

found in this folder:
C:\Users\<username>\AppData\Roaming\Azureus\plugins\xmwebui\transmission\web

one other feature that is present in the desktop client that i would like to add to the UI is the ability to add/remove torrents to categories and to filter by category, but i am unable to find a 'category' field in the Torrent class in the torrent.js file. is this something thats is not available at all? or has it just been missed out if the class because it's not presently being used?

more to the point, if it's possible to add this, what exactly is the fieldname i would need to use to get it? and which array of properties does it belong to?

any help with this would be appreciated

Thanks

James
Reply
#2
There is a field that Vuze can send for the torrent. It's tag-uids, which returns a somewhat unhelpful array of tag uids. To get the actual tag info, there's an additional rpc call "tags-get-list", which returns "tags", an array of tag objects, each having a bunch of fields, like "name" and "type".

I went ahead and put some code in to show a simple tag list per torrent in the inspector section. The plugin won't be rolled out live for a while (weeks probably), but the source is at:

https://svn.vuze.com/public/plugins/xmwebui

I've attached a diff to this message. It should get your started. It at least loads in the tag list :)

After the tag list is loaded once (by opening the inspector on a torrent), you can use your browser's debug window to poke at "transmission.tags", such as "transmission.tags[Object.keys(transmission.tags)[0]]" will return the first object.

===

For adding/removing torrents, you can pass a 'tagAdd' and 'tagRemove' field in with the torrent-set command. Both fields should have an array of values. For tagAdd the array can be a list of numeric tag uids, or a list of string names. For tagRemove, unfortunately, only a list of string names is currently implemented. I just tried from console, and it seems you can call :

transmission.changeFileCommand( torrentId, [ 'linux', 'free'], 'tagAdd');

and it'll add those two tags to torrent with id of torrentId. Oddly named function, but hey, I didn't name it :P


Good Luck!

-Tux


Attached Files
.txt   xmwebui150806-1.diff.txt (Size: 4.72 KB / Downloads: 1)
Reply
#3
thank you, this was exactly what i was after!
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Having trouble adding new torrents marvinjordana 1 556 Yesterday, 11:31 AM
Last Post: LuvVuze
  web interface not working in console jriker1 6 290 11-26-2016, 07:22 PM
Last Post: jriker1



Users browsing this thread: 1 Guest(s)