Skip to content

Commit

Permalink
updated boost, numpy, patch open folder bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fastrizwaan committed May 5, 2021
1 parent 3d35b74 commit 1bc73f5
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 4 deletions.
15 changes: 11 additions & 4 deletions org.deluge_torrent.deluge.yaml
Expand Up @@ -33,8 +33,8 @@ modules:
buildsystem: simple
sources:
- type: archive
url: https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.bz2
sha256: 953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb
url: https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2
sha256: f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41
build-commands:
- ./bootstrap.sh --prefix="${FLATPAK_DEST}" --with-python=python3
- ./b2 stage -j $FLATPAK_BUILDER_N_JOBS variant=release threading=multi link=shared debug-symbols=off
Expand Down Expand Up @@ -284,8 +284,8 @@ modules:
- python3 setup.py install --prefix=/app --root=/
sources:
- type: archive
url: https://files.pythonhosted.org/packages/c5/63/a48648ebc57711348420670bb074998f79828291f68aebfff1642be212ec/numpy-1.19.4.zip
sha256: 141ec3a3300ab89c7f2b0775289954d193cc8edb621ea05f99db9cb181530512
url: https://files.pythonhosted.org/packages/82/a8/1e0f86ae3f13f7ce260e9f782764c16559917f24382c74edfb52149897de/numpy-1.20.2.zip
sha256: 878922bf5ad7550aa044aa9301d417e2d3ae50f0f577de92051d739ac6096cee

- name: twisted
buildsystem: simple
Expand Down Expand Up @@ -398,11 +398,18 @@ modules:
- mkdir -p /app/share/metainfo
- install -Dm644 org.deluge_torrent.deluge.metainfo.xml /app/share/metainfo/

# Fix open download folder bug
# https://dev.deluge-torrent.org/changeset/833b5a1f306dad600d0f64a5c897407ba1584830/
- patch -p1 < open_download_folder.patch /app/lib/python3.8/site-packages/deluge/common.py

sources:
- type: archive
url: https://ftp.osuosl.org/pub/deluge/source/2.0/deluge-2.0.3.tar.xz
sha256: 7e7ae8e6ca2a2bf0d487227cecf81e27332f0b92b567cc2bda38e47d859da891

- type: file
path: org.deluge_torrent.deluge.metainfo.xml
- type: file
path: patches/open_download_folder.patch


66 changes: 66 additions & 0 deletions patches/open_download_folder.patch
@@ -0,0 +1,66 @@
83a84,86
> DBUS_FM_ID = 'org.freedesktop.FileManager1'
> DBUS_FM_PATH = '/org/freedesktop/FileManager1'
>
357a361
>
360,371c364,377
< filemanager1 = bus.get_object(
< 'org.freedesktop.FileManager1', '/org/freedesktop/FileManager1'
< )
< paths = [urljoin('file:', pathname2url(path))]
< filemanager1.ShowItems(
< paths, startup_id, dbus_interface='org.freedesktop.FileManager1'
< )
< else:
< env = os.environ.copy()
< env['DESKTOP_STARTUP_ID'] = startup_id.replace('dbus', 'xdg-open')
< # No option in xdg to highlight a file so just open parent folder.
< subprocess.Popen(['xdg-open', os.path.dirname(path.rstrip('/'))], env=env)
---
> try:
> filemanager1 = bus.get_object(DBUS_FM_ID, DBUS_FM_PATH)
> except dbus.exceptions.DBusException as ex:
> log.debug('Unable to get dbus file manager: %s', ex)
> # Fallback to xdg-open
> else:
> paths = [urljoin('file:', pathname2url(path))]
> filemanager1.ShowItems(paths, startup_id, dbus_interface=DBUS_FM_ID)
> return
>
> env = os.environ.copy()
> env['DESKTOP_STARTUP_ID'] = startup_id.replace('dbus', 'xdg-open')
> # No option in xdg to highlight a file so just open parent folder.
> subprocess.Popen(['xdg-open', os.path.dirname(path.rstrip('/'))], env=env)
376c382
< Opens a url in the desktop's default browser
---
> Opens a URL in the desktop's default browser
378c384
< :param url: the url to open
---
> :param url: the URL to open
698c704
< :param url: the url to test
---
> :param url: the URL to test
734c740
< A check to determine if a uri is a valid bittorrent magnet uri
---
> A check to determine if a URI is a valid bittorrent magnet URI
736c742
< :param uri: the uri to check
---
> :param uri: the URI to check
822c828
< """Creates a magnet uri
---
> """Creates a magnet URI
830c836
< str: A magnet uri string.
---
> str: A magnet URI string.
1178c1184
< """Grabs the localclient auth line from the 'auth' file and creates a localhost uri.
---
> """Grabs the localclient auth line from the 'auth' file and creates a localhost URI.

0 comments on commit 1bc73f5

Please sign in to comment.