mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.3k stars 2.9k forks source link

Report bugs from the command line (Get system information automatically) #13968

Open forthrin opened 6 months ago

forthrin commented 6 months ago

Expected behavior of the wanted feature

To secure correction information about the local installation in bug reports, and save users from needless and error-prone work, implement mpv --report-bug, which opens the issue tracker with system information injected, eg.

  (`which -a mpv`.lines.map(&:chomp) + ['/Applications/mpv.app/Contents/MacOS/mpv']).each do |item|
    `#{item} --version 2>&1`.match(/(mpv) (\S+).*?built on ([^\n]*).*?(FFmpeg[^\n]*)/m)
    puts item.sub(/^#{Dir.home}/, '~')
    printf "%s version: git-%s-%s\n%s\n", $1, Time.parse($3).strftime('%Y-%m-%d'), $2, $4
    puts "#{'-' * 70}"
  end
  puts(`/usr/sbin/system_profiler SPSoftwareDataType SPHardwareDataType`.scan(/ {6}(.*?): (.*)/).to_h.slice('System Version', 'Model Identifier').map { |key, value| "#{key}: #{value}" })

Does GitHub have support for injecting templates with arguments from URL parameters? Eg.

https://github.com/mpv-player/mpv/issues/new?labels=os:mac&template=magic.md&sysinfo=#{sysinfo}

Alternative behavior of the wanted feature

If GitHub doesn't support injection, hard-code the template into the player (not ideal, but would work).

Should hook into the Menu Bar, eg. Help → Report issue...

See report-emacs-bug in Emacs for inspiration.

Log file

N/A

Obegg commented 6 months ago

that's actually a good idea, love it, i think i remember seeing something like that in the past - maybe in Jackett repo, this would ease up user issue reporting procedure, would be interesting to see.

Akemi commented 6 months ago

Does GitHub have support for injecting templates with arguments from URL parameters? Eg.

i believe this should be possible with github issue forms and the id field.

see also #13953