Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncation makes columns unreadable #1270

Open
Drest opened this issue Mar 20, 2024 · 1 comment
Open

Truncation makes columns unreadable #1270

Drest opened this issue Mar 20, 2024 · 1 comment

Comments

@Drest
Copy link

Drest commented Mar 20, 2024

Issue / Suggestion

The search results truncate the columns, making some of them completely incomprehensible.
The best example is the "Views" column. Even if it's the only column shown, it cuts off after only 4 characters.
How many views is "3,17"? Could be 3,170 or 3,170,000 or even 3,170,000,000.
Is there a column width setting I've overlooked?

My suggestion would be to either have a setting for column width, i.e., "set column_views 13"
...or use an abbreviation like 3.2K, 3.2M, 3.2B, etc., i.e., "set column_human_readable true" (more elegant IMHO)

There are libraries like azaitsev/millify that handle this.

On a side note, emojis in titles mess up the table alignment, but they aren't a fixed width so the only way to deal with that would be to just not display them, which could also be a setting, i.e., "set emojis false"

Your Environment

yt --version

yewtube version    : 2.10.4
yt_dlp version     : 2024.03.10
Python version     : 3.11.8 (main, Feb 28 2024, 00:00:00) [GCC 13.2.1 20231011 (Red Hat 13.2.1-4)]
Processor          : 
Machine type       : x86_64
Architecture       : 64bit, ELF
Platform           : Linux-6.7.9-100.fc38.x86_64-x86_64-with-glibc2.37
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : /home/xxxxxxx/.config/mps-youtube
dbus               : None
glib               : False
env:TERM           : xterm-256color
env:SHELL          : /bin/bash
env:LANG           : en_US.UTF-8

OS, etc

OS: Fedora release 38 (Thirty Eight) x86_64 
Host: 20246 Lenovo IdeaPad Yoga 11S 
Kernel: 6.7.9-100.fc38.x86_64 
Uptime: 3 hours, 1 min 
Packages: 2754 (rpm) 
Shell: bash 5.2.26 
Resolution: 1366x768 
DE: GNOME 44.9 
WM: Mutter 
WM Theme: Adwaita 
Theme: Adwaita [GTK2/3] 
Icons: Adwaita [GTK2/3] 
Terminal: gnome-terminal 
CPU: Intel i5-3339Y (4) @ 2.000GHz 
GPU: Intel 3rd Gen Core processor Graphics Controller 
Memory: 1957MiB / 3788MiB 

gnome-terminal --version
# GNOME Terminal 3.48.3 using VTE 0.72.4 +BIDI +GNUTLS +ICU +SYSTEMD

yt set

  order             : relevance                 
  user_order        :                           
  max_res           : 720p                      
  player            : mpv                       
  playerargs        :                           
  encoder           : 0 [None]                  
  notifier          :                           
  checkupdate       : True                      
  show_player_keys  : True                      
  fullscreen        : False                     
  show_status       : True                      
  always_repeat     : False                     
  columns           : views           
  ddir              : /home/xxxxxxx/Downloads/mps 
  overwrite         : True                      
  show_video        : False                     
  search_music      : False                     
  window_pos        :                           
  window_size       :                           
  download_command  :                           
  lookup_metadata   : True                      
  lastfm_username   :                           
  lastfm_password   :                           
  lastfm_api_key    :                           
  lastfm_api_secret :                           
  audio_format      : auto                      
  video_format      : auto                      
  pages             : 3                         
  autoplay          : False                     
  set_title         : True                      
  mpris             : True                      
  show_qrcode       : False                     
  history           : True                      
  input_history     : True                      
  vlc_dummy_interface : True                      
  show_subtitles    : True

mpv --version

mpv 0.35.1 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
FFmpeg library versions:
   libavutil       58.2.100
   libavcodec      60.3.100
   libavformat     60.3.100
   libswscale      7.1.100
   libavfilter     9.3.100
   libswresample   4.10.100
FFmpeg version: 6.0.1

@iamtalhaasghar
Copy link
Contributor

a screenshot would help,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants