Hi everyone, I want to ask for some help. I upgraded to the latest 2.0.5 on Arch and everything runs fine, but for some reason any modifications to deluge-all-debug.js are not displayed by the webui. The file is located at /usr/lib/python3.10/site-packages/deluge/ui/web/js
I want to permanently hide columns such as 'Owner' and allow all columns to be sortable. But 'Completed' simply won't sort by ascending or descending, etc.
All modifications worked perfectly on the previous version of Deluge.
Does anyone know what changed and how I can hard code the changes below so Deluge remembers the columns, etc?
Thanks
My changes are in blue:
columns: [
{
id: 'queue',
hidden: true,
header: '#',
width: 30,
sortable: true,
renderer: queueRenderer,
dataIndex: 'queue',
},
{
id: 'name',
header: _('Name'),
width: 150,
sortable: true,
renderer: torrentNameRenderer,
dataIndex: 'name',
},
{
header: _('Size'),
width: 75,
sortable: true,
renderer: fsize,
dataIndex: 'total_wanted',
},
{
header: _('Progress'),
width: 150,
sortable: true,
renderer: torrentProgressRenderer,
dataIndex: 'progress',
},
{
header: _('Seeds'),
hidden: true,
width: 60,
sortable: true,
renderer: seedsRenderer,
dataIndex: 'num_seeds',
},
{
header: _('Peers'),
hidden: true,
width: 60,
sortable: true,
renderer: peersRenderer,
dataIndex: 'num_peers',
},
{
header: _('Down Speed'),
width: 80,
sortable: true,
renderer: torrentSpeedRenderer,
dataIndex: 'download_payload_rate',
},
{
header: _('Up Speed'),
width: 80,
sortable: true,
renderer: torrentSpeedRenderer,
dataIndex: 'upload_payload_rate',
},
{
header: _('ETA'),
width: 60,
sortable: true,
renderer: timeOrInf,
dataIndex: 'eta',
},
{
header: _('Ratio'),
hidden: false,
width: 60,
sortable: true,
renderer: availRenderer,
dataIndex: 'ratio',
},
{
header: _('Avail'),
hidden: true,
width: 60,
sortable: true,
renderer: availRenderer,
dataIndex: 'distributed_copies',
},
{
header: _('Added'),
hidden: true,
width: 80,
sortable: true,
renderer: fdate,
dataIndex: 'time_added',
},
{
header: _('Complete Seen'),
hidden: true,
width: 80,
sortable: true,
renderer: dateOrNever,
dataIndex: 'last_seen_complete',
},
{
header: _('Completed'),
hidden: false,
width: 80,
sortable: true,
renderer: dateOrNever,
dataIndex: 'completed_time',
},
{
header: _('Tracker'),
hidden: false,
width: 120,
sortable: true,
renderer: trackerRenderer,
dataIndex: 'tracker_host',
},
{
header: _('Download Folder'),
hidden: true,
width: 120,
sortable: true,
renderer: fplain,
dataIndex: 'download_location',
},
{
header: _('Owner'),
hidden: true,
width: 80,
sortable: true,
renderer: fplain,
dataIndex: 'owner',
},
{
header: _('Public'),
hidden: true,
width: 80,
sortable: true,
renderer: fplain,
dataIndex: 'public',
},
{
header: _('Shared'),
hidden: true,
width: 80,
sortable: true,
renderer: fplain,
dataIndex: 'shared',
},
{
header: _('Downloaded'),
hidden: true,
width: 75,
sortable: true,
renderer: fsize,
dataIndex: 'total_done',
},
{
header: _('Uploaded'),
hidden: true,
width: 75,
sortable: true,
renderer: fsize,
dataIndex: 'total_uploaded',
},
{
header: _('Remaining'),
hidden: true,
width: 75,
sortable: true,
renderer: fsize,
dataIndex: 'total_remaining',
},
{
header: _('Down Limit'),
hidden: true,
width: 75,
sortable: true,
renderer: torrentLimitRenderer,
dataIndex: 'max_download_speed',
},
{
header: _('Up Limit'),
hidden: true,
width: 75,
sortable: true,
renderer: torrentLimitRenderer,
dataIndex: 'max_upload_speed',
},
{
header: _('Seeds:Peers'),
hidden: true,
width: 75,
sortable: true,
renderer: availRenderer,
dataIndex: 'seeds_peers_ratio',
},
{
header: _('Last Transfer'),
hidden: true,
width: 75,
sortable: true,
renderer: ftime,
dataIndex: 'time_since_transfer',
},
],
Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
Re: Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
Sorry I don't know why 'completed' don't allow sorting, as all those other JS and CSS files of webui are hard for me to make sence of honestly. Also see was like that in last two former releases also atleast.
Anyway, I post just to state that for rest of your request, then you need edit the "non-debug" version of that file(or alternatively rename/delete the "non-debug" version to get the "debug" one forcibly loaded which you've edited here). This was btw a newer change I believe, well bugfix rather, hence I understand the confusion. Also, if not seeing the proper change(when edited without webui running), then delete/clear the browser cookie the webui dropped, since it includes saved column-data to restore from, too.
Anyway, I post just to state that for rest of your request, then you need edit the "non-debug" version of that file(or alternatively rename/delete the "non-debug" version to get the "debug" one forcibly loaded which you've edited here). This was btw a newer change I believe, well bugfix rather, hence I understand the confusion. Also, if not seeing the proper change(when edited without webui running), then delete/clear the browser cookie the webui dropped, since it includes saved column-data to restore from, too.
Re: Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
Thank for the response - much appreciated. That worked! All columns are now as they should be after deleting the .debug and editing the 'deluge-all.js' file.
The only issue is that 'Complete' still won't sort. Every other column will, so I guess it's simply a bug which will hopefully be fixed at some point : )
The only issue is that 'Complete' still won't sort. Every other column will, so I guess it's simply a bug which will hopefully be fixed at some point : )
Re: Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
I looked again a little deeper, and found the issue, so for fixing 'completed' sorting, then make new line after line 9482(unmodified file's line-number), or just wherever in that section of code there, of the deluge-all-debug.js(since you stated using this):
As you have added exra lines, then hard go by line numbers, so here's the full section with the change added as third last line, to compare/search against:
There's a few others missing here too I see, for other columns, which likewise just can be added, and i'll submit a PR for this soon.
Code: Select all
{ name: 'completed_time', type: 'int' },
Code: Select all
meta: {
root: 'torrents',
idProperty: 'id',
fields: [
{
name: 'queue',
sortType: Deluge.data.SortTypes.asQueuePosition,
},
{ name: 'name', sortType: Deluge.data.SortTypes.asName },
{ name: 'total_wanted', type: 'int' },
{ name: 'state' },
{ name: 'progress', type: 'float' },
{ name: 'num_seeds', type: 'int' },
{ name: 'total_seeds', type: 'int' },
{ name: 'num_peers', type: 'int' },
{ name: 'total_peers', type: 'int' },
{ name: 'download_payload_rate', type: 'int' },
{ name: 'upload_payload_rate', type: 'int' },
{ name: 'eta', type: 'int', sortType: etaSorter },
{ name: 'ratio', type: 'float' },
{ name: 'distributed_copies', type: 'float' },
{ name: 'time_added', type: 'int' },
{ name: 'tracker_host' },
{ name: 'download_location' },
{ name: 'total_done', type: 'int' },
{ name: 'total_uploaded', type: 'int' },
{ name: 'total_remaining', type: 'int' },
{ name: 'max_download_speed', type: 'int' },
{ name: 'max_upload_speed', type: 'int' },
{ name: 'seeds_peers_ratio', type: 'float' },
{ name: 'time_since_transfer', type: 'int' },
{ name: 'completed_time', type: 'int' },
],
},
Re: Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
Thank you for taking a look at this!
I made the modification as suggested above and can confirm .... it works perfectly! 'Completed' now sorts just like the other columns: )
Much appreciated : )
One other (minor) question: is there any way to permanently hide the 'Label' Column? Can't seem to find a way to achieve that (so far) ...
I made the modification as suggested above and can confirm .... it works perfectly! 'Completed' now sorts just like the other columns: )
Much appreciated : )
One other (minor) question: is there any way to permanently hide the 'Label' Column? Can't seem to find a way to achieve that (so far) ...
Re: Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
You're very welcome mate
For hiding 'Label' column, you can add following into same file, after e.g line 9449:
Here's some added context for the change, for searching/comparison's sake:
For hiding 'Label' column, you can add following into same file, after e.g line 9449:
Code: Select all
{
header: _('Label'),
hidden: true,
},
Code: Select all
{
header: _('Down Limit'),
hidden: true,
width: 75,
sortable: true,
renderer: torrentLimitRenderer,
dataIndex: 'max_download_speed',
},
{
header: _('Up Limit'),
hidden: true,
width: 75,
sortable: true,
renderer: torrentLimitRenderer,
dataIndex: 'max_upload_speed',
},
{
header: _('Seeds:Peers'),
hidden: true,
width: 75,
sortable: true,
renderer: availRenderer,
dataIndex: 'seeds_peers_ratio',
},
{
header: _('Last Transfer'),
hidden: true,
width: 75,
sortable: true,
renderer: ftime,
dataIndex: 'time_since_transfer',
},
{
header: _('Label'),
hidden: true,
},
],
Re: Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
Interestingly, that code still isn't removing the persistent 'Label' column.
Here's what I have:
Here's what I have:
Code: Select all
{header:_('Seeds:Peers'),hidden:true,width:75,sortable:true,renderer:availRenderer,dataIndex:'seeds_peers_ratio',},
{header:_('Last Transfer'),hidden:true,width:75,sortable:true,renderer:ftime,dataIndex:'time_since_transfer',},
{header:_('Label'),hidden:true,},
],meta:{root:'torrents',idProperty:'id',fields:[{name:'queue',sortType:Deluge.data.SortTypes.asQueuePosition,},{name:'name',sortType:Deluge.data.SortTypes.asName},
Re: Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
I initially tested it working several times before posting, and just did again with the non-debug file as per your snippet, whereas I posted for the debug file initially, as thought you used that instead, though doesn't matter, and still works for me regardless.
I stop deluge-web, make the change, then start deluge-web and finally reload the webui page in browser to see effect. I did it a couple times toggling the hidden flag between true and false to see label column appear/disappear upon restart/refresh.
There's a browser cookie saving the column-data too, as stated previously, but I didn't need to clear/delete it for these tests here.
Sorry couldn't help you with this mate and indeed strange the disreprency.
I stop deluge-web, make the change, then start deluge-web and finally reload the webui page in browser to see effect. I did it a couple times toggling the hidden flag between true and false to see label column appear/disappear upon restart/refresh.
There's a browser cookie saving the column-data too, as stated previously, but I didn't need to clear/delete it for these tests here.
Sorry couldn't help you with this mate and indeed strange the disreprency.
Re: Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
Below is the complete section and all columns work fine (on/off) except that final 'Label' column modification.
Noticing it's the only line without the 'true,renderer:' part ... could that be the reason why it's not being recognised?
Noticing it's the only line without the 'true,renderer:' part ... could that be the reason why it's not being recognised?
Code: Select all
Deluge.TorrentGrid=Ext.extend(Ext.grid.GridPanel,{torrents:{},columns:[{id:'queue',header:'#',hidden:true,width:30,sortable:true,renderer:queueRenderer,dataIndex:'queue',},
{id:'name',header:_('Name'),width:150,sortable:true,renderer:torrentNameRenderer,dataIndex:'name',},
{header:_('Size'),width:75,sortable:true,renderer:fsize,dataIndex:'total_wanted',},
{header:_('Progress'),width:150,sortable:true,renderer:torrentProgressRenderer,dataIndex:'progress',},
{header:_('Seeds'),hidden:true,width:60,sortable:true,renderer:seedsRenderer,dataIndex:'num_seeds',},
{header:_('Peers'),hidden:true,width:60,sortable:true,renderer:peersRenderer,dataIndex:'num_peers',},
{header:_('Down Speed'),width:80,sortable:true,renderer:torrentSpeedRenderer,dataIndex:'download_payload_rate',},
{header:_('Up Speed'),width:80,sortable:true,renderer:torrentSpeedRenderer,dataIndex:'upload_payload_rate',},
{header:_('ETA'),hidden:true,width:60,sortable:true,renderer:timeOrInf,dataIndex:'eta',},
{header:_('Uploaded'),hidden:false,width:75,sortable:true,renderer:fsize,dataIndex:'total_uploaded',},
{header:_('Ratio'),hidden:false,width:60,sortable:true,renderer:availRenderer,dataIndex:'ratio',},
{header:_('Completed'),width:80,sortable:true,renderer:dateOrNever,dataIndex:'completed_time',},
{header:_('Tracker'),width:120,sortable:true,renderer:trackerRenderer,dataIndex:'tracker_host',},
{header:_('Avail'),hidden:true,width:60,sortable:true,renderer:availRenderer,dataIndex:'distributed_copies',},
{header:_('Added'),hidden:true,width:80,sortable:true,renderer:fdate,dataIndex:'time_added',},
{header:_('Complete Seen'),hidden:true,width:80,sortable:true,renderer:dateOrNever,dataIndex:'last_seen_complete',},
{header:_('Download Folder'),hidden:true,width:120,sortable:true,renderer:fplain,dataIndex:'download_location',},
{header:_('Owner'),hidden:true,width:80,sortable:true,renderer:fplain,dataIndex:'owner',},
{header:_('Public'),hidden:true,width:80,sortable:true,renderer:fplain,dataIndex:'public',},
{header:_('Shared'),hidden:true,width:80,sortable:true,renderer:fplain,dataIndex:'shared',},
{header:_('Downloaded'),hidden:true,width:75,sortable:true,renderer:fsize,dataIndex:'total_done',},
{header:_('Remaining'),hidden:true,width:75,sortable:true,renderer:fsize,dataIndex:'total_remaining',},
{header:_('Down Limit'),hidden:true,width:75,sortable:true,renderer:torrentLimitRenderer,dataIndex:'max_download_speed',},
{header:_('Up Limit'),hidden:true,width:75,sortable:true,renderer:torrentLimitRenderer,dataIndex:'max_upload_speed',},
{header:_('Seeds:Peers'),hidden:true,width:75,sortable:true,renderer:availRenderer,dataIndex:'seeds_peers_ratio',},
{header:_('Last Transfer'),hidden:true,width:75,sortable:true,renderer:ftime,dataIndex:'time_since_transfer',},
{header:_('Label'),hidden:true,},],
Re: Deluge 2.0.5 Webui Columns - changes are not saved after editing deluge-all-debug.js (Arch Linux)
I apologize, you where right all along, sorry mate!
I had tested this many times as said, and have just copy/pasted directly now your code too, and still is same result, except now finding by chance that when further refreshing page a second time(or first time if not having the page continually open like my testings here), then the 'Label' column returns for some reason, as you stated, and checked the browser cookie not to blame, as cleared it in further tests.
As per your question, then I initially added all parts for testing, and only removed again because no difference for the usecase of simply hiding column, e.g. as can be seen if changing other column there with just having 'hidden:true', and which doesn't re-emerge upon refreshing.
Sorry again, i'm not sure I can help with that then, unless moding and rebuilding the label plugin presumably, which i'm not even sure if I can do, especially when needed changes is in jS/CSS parts of code, but if finding something, then i'll post back.
I had tested this many times as said, and have just copy/pasted directly now your code too, and still is same result, except now finding by chance that when further refreshing page a second time(or first time if not having the page continually open like my testings here), then the 'Label' column returns for some reason, as you stated, and checked the browser cookie not to blame, as cleared it in further tests.
As per your question, then I initially added all parts for testing, and only removed again because no difference for the usecase of simply hiding column, e.g. as can be seen if changing other column there with just having 'hidden:true', and which doesn't re-emerge upon refreshing.
Sorry again, i'm not sure I can help with that then, unless moding and rebuilding the label plugin presumably, which i'm not even sure if I can do, especially when needed changes is in jS/CSS parts of code, but if finding something, then i'll post back.