Skip to content

Commit

Permalink
Code cleanup. Adds download directory to feeds list
Browse files Browse the repository at this point in the history
  • Loading branch information
archangelic committed Aug 21, 2016
1 parent 6e3f8f9 commit 6b4e24e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions cistern/cistern.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ def add_feed(name, url, directory):
torrent = ''
feed_data = feedparser.parse(url)
entries = feed_data.entries
e = entries[0]
try:
e = entries[0]
except IndexError:
raise click.BadParameter("No entries found for this feed. Please check the URL and try again.")
for each in e:
try:
if e[each].startswith('magnet:'):
Expand Down Expand Up @@ -185,10 +188,10 @@ def lister(list_type):
enabled = 'Yes'
else:
enabled = "No"
feed_list.append([feed.id, feed.name, feed.url, enabled])
feed_list.append([feed.id, feed.name, feed.url, feed.download_dir, enabled])
tab = tabulate(
feed_list,
['ID', 'Name', 'URL', 'Enabled']
['ID', 'Name', 'URL', 'Download Directory', 'Enabled']
)
click.echo(tab)
elif list_type == 'torrents':
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
version="0.1.0",
license="MIT",
url="https://github.com/archangelic/cistern",
description=("Command line tool for downloading torrents from RSS feeds."),
description="Command line tool for downloading torrents from RSS feeds.",
author="Michael Hancock",
author_email="[email protected]",
download_url=(
Expand Down Expand Up @@ -36,8 +36,6 @@
'Topic :: Internet',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
Expand Down

0 comments on commit 6b4e24e

Please sign in to comment.