What python file generates this list?

Specific support for Deluge on Microsoft Windows OS
Post Reply
phpjunkie
Member
Member
Posts: 14
Joined: Tue Dec 26, 2023 12:59 pm

What python file generates this list?

Post by phpjunkie »

I'd like to expand it so it shows the entire filenames.

Code: Select all

"C:\Program Files\Deluge\deluge-console.exe" --daemon deluge --port 58846 --username ********* --password ********** info --detailed ****************************************

Code: Select all

Name: *********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmos.H.264-NTb[eztv.re]
ID: ****************************************
State: Downloading Down Speed: 0.0 K/s Up Speed: 0.0 K/s
Seeds: 0 (0) Peers: 0 (2) Availability: 0.97 Seed Rank: -
Size: 17.0 G/17.6 G Downloaded: 17.0 G Uploaded: 1.7 G Share Ratio: 0.10
ETA: - Seeding: - Active: 4d 9h
Last Transfer: ∞ Complete Seen: Never
Tracker: stealth.si
Tracker status: Error: timed out
Progress: 96.76% [#########################################################--]
Download Folder: D:\Media\Downloads\Sort

Files in torrent
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.5 GiB) 96.14% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.3 GiB) 94.97% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.3 GiB) 97.93% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.7 GiB) 98.20% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.6 GiB) 97.04% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.3 GiB) 97.64% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.5 GiB) 94.57% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.8 GiB) 98.29% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.5 GiB) 96.31% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.2 GiB) 97.01% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.1 GiB) 96.86% Priority: Normal
*********.S01.720p.ATVP.WEB-DL.DDP5.1.Atmo  (1.7 GiB) 95.83% Priority: Normal
Connected peers
    None
mhertz
Moderator
Moderator
Posts: 2216
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: What python file generates this list?

Post by mhertz »

It's freezed inside deluge-console.exe unfortunetly - if using my zip archive I posted earlier, well you are as even works, then 'deluge\ui\console\cmdline\commands\info.py' is the file to edit, but the freezed version takes precedense - I was lazy and just included all the files, despite not all needed. I could be wrong, but believe i'm right, unless mistaken of-course. So if is, then would need change the source and then rebuild/freeze deluge afterwards, and replace deluge-console.exe afterwards, sadly.

Edit: Beaten by the good ambipro :)
phpjunkie
Member
Member
Posts: 14
Joined: Tue Dec 26, 2023 12:59 pm

Re: What python file generates this list?

Post by phpjunkie »

I've commented out a huge chunk of code to prevent the parsing of the files and the are still being parsed. The output in the console is still the same.

Code: Select all

def show_file_info(self, torrent_id, status):
    ...
    for index, torrent_file in enumerate(status['files']):
        ...
    
        # col_filename = indent + filename
        # col_size = ' ({!cyan!}%s{!input!})' % fsize(torrent_file['size'])
        # col_progress = ' {!input!}%.2f%%' % (status['file_progress'][index] * 100)
        #
        # col_priority = ' {!info!}Priority: '
        #
        # file_priority = FILE_PRIORITY[status['file_priorities'][index]]
        #
        # if status['file_progress'][index] != 1.0:
        #     if file_priority == 'Skip':
        #         col_priority += '{!error!}'
        #     else:
        #         col_priority += '{!success!}'
        # else:
        #     col_priority += '{!input!}'
        # col_priority += file_priority
        #
        # def tlen(string):
        #     return strwidth(remove_formatting(string))
        #
        # col_all_info = col_size + col_progress + col_priority
        # # Check how much space we've got left after writing all the info
        # space_left = cols - tlen(col_all_info)
        # # And how much we will potentially have with the longest possible column
        # maxlen_space_left = cols - tlen(' (1000.0 MiB) 100.00% Priority: Normal')
        # if maxlen_space_left > tlen(col_filename) + 1:
        #     # If there is enough space, pad it all nicely
        #     col_all_info = ''
        #     col_all_info += ' ('
        #     spaces_to_add = tlen(' (1000.0 MiB)') - tlen(col_size)
        #     col_all_info += ' ' * spaces_to_add
        #     col_all_info += col_size[2:]
        #     spaces_to_add = tlen(' 100.00%') - tlen(col_progress)
        #     col_all_info += ' ' * spaces_to_add
        #     col_all_info += col_progress
        #     spaces_to_add = tlen(' Priority: Normal') - tlen(col_priority)
        #     col_all_info += col_priority
        #     col_all_info += ' ' * spaces_to_add
        #     # And remember to put it to the left!
        #     col_filename = pad_string(
        #         col_filename, maxlen_space_left - 2, side='right'
        #     )
        # elif space_left > tlen(col_filename) + 1:
        #     # If there is enough space, put the info to the right
        #     col_filename = pad_string(col_filename, space_left - 2, side='right')
        # else:
        #     # And if there is not, shorten the name
        #     col_filename = trim_string(col_filename, space_left, True)
    self.console.write(filename)



def show_info(self, torrent_id, status, verbose=False, detailed=False):
    ...
    if verbose or detailed:
        ...
        if detailed:
            self.console.write('\n{!info!}Files in torrent')
            self.show_file_info(torrent_id, status)
            self.console.write('{!info!}Connected peers')
            self.show_peer_info(torrent_id, status)
phpjunkie
Member
Member
Posts: 14
Joined: Tue Dec 26, 2023 12:59 pm

Re: What python file generates this list?

Post by phpjunkie »

mhertz wrote: Sat Dec 30, 2023 7:07 pm It's freezed inside deluge-console.exe unfortunetly - if using my zip archive I posted earlier, well you are as even works, then 'deluge\ui\console\cmdline\commands\info.py' is the file to edit, but the freezed version takes precedense - I was lazy and just included all the files, despite not all needed. I could be wrong, but believe i'm right, unless mistaken of-course. So if is, then would need change the source and then rebuild/freeze deluge afterwards, and replace deluge-console.exe afterwards, sadly.

Edit: Beaten by the good ambipro :)
Heard
User avatar
ambipro
Moderator
Moderator
Posts: 446
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: What python file generates this list?

Post by ambipro »

It might be a width setting in your terminal/console itself or ssh session.
Post Reply