Skip to content

Instantly share code, notes, and snippets.

index dff29ca..d80a0f7 100644
--- a/deluge/core/torrent.py
+++ b/deluge/core/torrent.py
@@ -70,9 +70,9 @@ def clean_filename(filename):
newfilepath = clean_filename(filepath)
if folder is True:
- return newfilepath + '/'
+ return os.path.normpath(newfilepath) + os.path.sep
else:
commit 91c0e687c768ea4189849fce6a0dedcff4d55572
Author: Calum Lind <[email protected]>
Date: Mon Nov 26 19:07:12 2012 +0000
Change start_daemon to use subprocess.Popen cross-platform
diff --git a/deluge/ui/client.py b/deluge/ui/client.py
index ada16d4..bd7e880 100644
--- a/deluge/ui/client.py
+++ b/deluge/ui/client.py
#!/usr/bin/env python
#
# Copyright (C) 2012 Calum Lind <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
#!/usr/bin/env python
# Copyright Arvid Norberg 2008. Use, modification and distribution is
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
from __future__ import print_function
import libtorrent as lt
import time
import sys
#!/usr/bin/env python
# Copyright Arvid Norberg 2008. Use, modification and distribution is
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
from __future__ import print_function
import libtorrent as lt
import time
import sys
#!/usr/bin/env python2
#
# Find and replace tracker urls in a Deluge torrents.state
import os
import sys
import platform
import shutil
import cPickle
@cas--
cas-- / version.py
Last active December 27, 2017 12:31 — forked from dcreager/version.py
# -*- coding: utf-8 -*-
# Authors: Douglas Creager <[email protected]>
# Calum Lind <[email protected]>
#
# This file is placed into the public domain.
#
# Calculates the current version number by first checking output of “git describe”,
# modified to conform to PEP 386 versioning scheme. If “git describe” fails
# (likely due to using release tarball rather than git working copy), then fall
# back on reading the contents of the RELEASE-VERSION file.
#!/usr/bin/python
APPNAME = "My App"
ICON = "/usr/share/pixmaps/firefox.png"
from gi.repository import AppIndicator3 as AI
from gi.repository import Gtk
def sayhello(item):
#!/usr/bin/env python
#
# script to switch from metadate to attributes
#
#- <property name="label" translatable="yes">&lt;b&gt;From Infohash&lt;/b&gt;</property>
#- <property name="use_markup">True</property>
#+ <property name="label" translatable="yes">From Infohash</property>
#+ <attributes>
#+ <attribute name="weight" value="bold"/>
#+ </attributes>
@cas--
cas-- / znc.conf
Last active January 3, 2016 04:39
# znc - IRC Bouncer
description "ZNC IRC bouncer"
author "Calum Lind [email protected]"
start on runlevel [2345]
stop on runlevel [016]
respawn
respawn limit 15 5