GNU bug report logs - #26538
[PATCH 0/1] gnu: Add youtube-dl-gui.

Previous Next

Package: guix-patches;

Reported by: Chris Marusich <cmmarusich <at> gmail.com>

Date: Mon, 17 Apr 2017 01:32:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26538 in the body.
You can then email your comments to 26538 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#26538; Package guix-patches. (Mon, 17 Apr 2017 01:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chris Marusich <cmmarusich <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 17 Apr 2017 01:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Chris Marusich <cmmarusich <at> gmail.com>
Subject: [PATCH 0/1] gnu: Add youtube-dl-gui.
Date: Sun, 16 Apr 2017 18:30:43 -0700
Hi,

This patch adds youtube-dl-gui.  I've confirmed that it works on
GuixSD and a foreign distro.  I've confirmed that downloading a video
in the default format works, and I've confirmed that converting the
video to an audio-only MP3 file works, too.  I didn't exhaustively
test all combinations of the various options, but the program seems to
be working well enough.

There was one minor issue that really bugged me which I couldn't
figure out.  It only happens when running youtube-dl-gui on a foreign
distro - Ubuntu, to be exact.  The issue is this: when downloading a
video that contains Japanese characters in the title [1], the title of
the video displayed in the youtube-dl-gui application contains boxes
instead of Japanese characters.  These boxes contain hexadecimal
values, which I suppose are the Unicode code points for the Japanese
characters.  It's as if youtube-dl-gui (or one of its dependencies)
failed to find a Japanese font.  In any case, once the file has been
saved to the local file system, other applications (e.g., Ubuntu's
file browser) display the Japanese characters in the file name
correctly.

This only happens on a foreign distro.  In GuixSD, youtube-dl-gui
displays the Japanese characters correctly.  To fix the issue, I tried
installing Japanese fonts to Ubuntu via apt-get.  I tried installing
Japanese fonts into my Guix profile.  Nothing worked; youtube-dl-gui
continued to display boxes instead of Japanese characters.  If anybody
has any ideas for how to fix this, please let me know.

[1] Example: https://www.youtube.com/watch?v=k4xGqY5IDBE

Chris Marusich (1):
  gnu: Add youtube-dl-gui.

 gnu/packages/video.scm | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

-- 
2.12.0





Information forwarded to guix-patches <at> gnu.org:
bug#26538; Package guix-patches. (Mon, 17 Apr 2017 01:41:02 GMT) Full text and rfc822 format available.

Message #8 received at 26538 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: 26538 <at> debbugs.gnu.org
Cc: Chris Marusich <cmmarusich <at> gmail.com>
Subject: [PATCH 1/1] gnu: Add youtube-dl-gui.
Date: Sun, 16 Apr 2017 18:39:28 -0700
* gnu/packages/video.scm (youtube-dl-gui): New variable.
---
 gnu/packages/video.scm | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index b64664176..a80d187be 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2016 Eric Bavier <bavier <at> member.fsf.org>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2017 Feng Shu <tumashu <at> 163.com>
+;;; Copyright © 2017 Chris Marusich <cmmarusich <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -95,6 +96,7 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages webkit)
+  #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
@@ -1024,6 +1026,92 @@ YouTube.com and a few more sites.")
     (home-page "https://yt-dl.org")
     (license license:public-domain)))
 
+(define-public youtube-dl-gui
+  (package
+    (name "youtube-dl-gui")
+    (version "0.3.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/MrS0m30n3/youtube-dl-gui/archive/"
+                           version
+                           ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256 (base32 "1kaq3nrr7l52s9lvrqqywsk8yd6f2lciwj1hd40h8hs4463yrrqc"))))
+    (build-system python-build-system)
+    (arguments
+     ;; In Guix, wxpython has not yet been packaged for Python 3.
+     `(#:python ,python-2
+       ;; This package has no tests.
+       #:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'patch-source
+                              (lambda* (#:key inputs #:allow-other-keys)
+                                ;; The youtube-dl-gui program lets you
+                                ;; configure options.  Some of them are
+                                ;; problematic, so we change their defaults.
+                                (substitute* "youtube_dl_gui/optionsmanager.py"
+                                  ;; When this is true, the builder process will
+                                  ;; try (and fail) to write logs to the builder
+                                  ;; user's home directory.
+                                  (("'enable_log': True") "'enable_log': False")
+                                  ;; This determines which youtube-dl program
+                                  ;; youtube-dl-gui will run.  If we don't set
+                                  ;; this, then youtube-dl-gui might download
+                                  ;; an arbitrary copy from the Internet into
+                                  ;; the user's home directory and run it, so
+                                  ;; let's make sure youtube-dl-gui uses the
+                                  ;; youtube-dl from the inputs by default.
+                                  (("'youtubedl_path': self.config_path")
+                                   (string-append "'youtubedl_path': '"
+                                                  (assoc-ref inputs "youtube-dl")
+                                                  "/bin'"))
+                                  ;; When this is True, when youtube-dl-gui is
+                                  ;; finished downloading a file, it will try
+                                  ;; (and possibly fail) to open the directory
+                                  ;; containing the downloaded file.  This can
+                                  ;; fail because it assumes that xdg-open is
+                                  ;; in PATH.  Unfortunately, simply adding
+                                  ;; xdg-utils to the propagated inputs is not
+                                  ;; enough to make this work, so for now we
+                                  ;; set the default to False.
+                                  (("'open_dl_dir': True") "'open_dl_dir': False"))
+                                ;; The youtube-dl program from the inputs is
+                                ;; actually a wrapper script written in bash,
+                                ;; so attempting to invoke it as a python
+                                ;; script will fail.
+                                (substitute* "youtube_dl_gui/downloaders.py"
+                                  (("cmd = \\['python', self\\.youtubedl_path\\]")
+                                   "cmd = [self.youtubedl_path]"))
+                                ;; Use relative paths for installing data
+                                ;; files so youtube-dl-gui installs the files
+                                ;; relative to its prefix in the store, rather
+                                ;; than relative to /.  Also, instead of
+                                ;; installing data files into
+                                ;; $prefix/usr/share, install them into
+                                ;; $prefix/share for consistency (see:
+                                ;; (standards) Directory Variables).
+                                (substitute* "setup.py"
+                                  (("= '/usr/share") "= 'share"))
+                                ;; Update get_locale_file() so it finds the
+                                ;; installed localization files.
+                                (substitute* "youtube_dl_gui/utils.py"
+                                  (("os\\.path\\.join\\('/usr', 'share'")
+                                   (string-append "os.path.join('"
+                                                  (assoc-ref %outputs "out")
+                                                  "', 'share'"))))))))
+    (inputs
+     `(("python2-wxpython" ,python2-wxpython)
+       ("youtube-dl" ,youtube-dl)))
+    (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
+    (synopsis
+     "GUI (Graphical User Interface) for @command{youtube-dl}")
+    (description
+     "Youtube-dlG is a GUI (Graphical User Interface) for
+@command{youtube-dl}.  You can use it to download videos from YouTube and any
+other sites that youtube-dl supports.")
+    (license license:unlicense)))
+
 (define-public you-get
   (package
     (name "you-get")
-- 
2.12.0





Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Mon, 17 Apr 2017 19:48:02 GMT) Full text and rfc822 format available.

Notification sent to Chris Marusich <cmmarusich <at> gmail.com>:
bug acknowledged by developer. (Mon, 17 Apr 2017 19:48:02 GMT) Full text and rfc822 format available.

Message #13 received at 26538-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 26538-done <at> debbugs.gnu.org
Subject: Re: bug#26538: [PATCH 1/1] gnu: Add youtube-dl-gui.
Date: Mon, 17 Apr 2017 15:47:31 -0400
[Message part 1 (text/plain, inline)]
On Sun, Apr 16, 2017 at 06:39:28PM -0700, Chris Marusich wrote:
> * gnu/packages/video.scm (youtube-dl-gui): New variable.

Thanks! I pushed as 794223bc776aeaf94da2d5b5f330c71fc404b238 with the
following changes:

> +       (uri (string-append "https://github.com/MrS0m30n3/youtube-dl-gui/archive/"
> +                           version
> +                           ".tar.gz"))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256 (base32 "1kaq3nrr7l52s9lvrqqywsk8yd6f2lciwj1hd40h8hs4463yrrqc"))))

It fetches the source from PyPi.

> +       #:phases (modify-phases %standard-phases
> +                  (add-before 'build 'patch-source
> +                              (lambda* (#:key inputs #:allow-other-keys)

I adjusted the indentation to be less severe! :)

> +     "Youtube-dlG is a GUI (Graphical User Interface) for
> +@command{youtube-dl}.  You can use it to download videos from YouTube and any
> +other sites that youtube-dl supports.")

s/sites/site
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26538; Package guix-patches. (Fri, 21 Apr 2017 19:16:01 GMT) Full text and rfc822 format available.

Message #16 received at 26538 <at> debbugs.gnu.org (full text, mbox):

From: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 26538 <at> debbugs.gnu.org
Subject: Re: bug#26538: [PATCH 0/1] gnu: Add youtube-dl-gui.
Date: Fri, 21 Apr 2017 21:15:05 +0200
On Sun, 16 Apr 2017 18:30:43 -0700
Chris Marusich <cmmarusich <at> gmail.com> wrote:

> Hi,
> 
> This patch adds youtube-dl-gui.  I've confirmed that it works on
> GuixSD and a foreign distro.  I've confirmed that downloading a video
> in the default format works, and I've confirmed that converting the
> video to an audio-only MP3 file works, too.  I didn't exhaustively
> test all combinations of the various options, but the program seems to
> be working well enough.

I tried it out and it looks good, except for this:

There is an "Update" button which tries to download and install the
newest version of itself. I tried the button with network offline and
it has a status message of "Network is unreachable." I don't know what
exactly happens here when the network is reachable.

The software should only be updated via Guix. Would it be possible with
a patch to remove or disable the button?

Björn




Information forwarded to guix-patches <at> gnu.org:
bug#26538; Package guix-patches. (Fri, 21 Apr 2017 19:37:02 GMT) Full text and rfc822 format available.

Message #19 received at 26538 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
Cc: 26538 <at> debbugs.gnu.org, Chris Marusich <cmmarusich <at> gmail.com>
Subject: Re: bug#26538: [PATCH 0/1] gnu: Add youtube-dl-gui.
Date: Fri, 21 Apr 2017 15:36:54 -0400
[Message part 1 (text/plain, inline)]
On Fri, Apr 21, 2017 at 09:15:05PM +0200, Björn Höfling wrote:
> There is an "Update" button which tries to download and install the
> newest version of itself. I tried the button with network offline and
> it has a status message of "Network is unreachable." I don't know what
> exactly happens here when the network is reachable.

Probably, it will try to overwrite the files in /gnu/store and fail.

> The software should only be updated via Guix. Would it be possible with
> a patch to remove or disable the button?

Can you suggest it upstream?
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 May 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.