Skip to content

Commit

Permalink
Merge pull request #1450 from philborman/master
Browse files Browse the repository at this point in the history
Fix for #1448,  Add a link to rss feeds for apps that use page scraping
  • Loading branch information
philborman authored Jun 4, 2018
2 parents c7de4d7 + b893a79 commit eb985a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion data/interfaces/bookstrap/audio.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
%endif
<a href="audioWall" class="button btn btn-sm btn-primary"><i class="fa fa-calendar-check"></i> Recent AudioBooks</a>
%if lazylibrarian.CONFIG['USER_ACCOUNTS'] == True:
<a href="rssFeed?user=${user}&type=AudioBook&limit=10.xml" type="application/rss+xml" class="button btn btn-sm btn-primary" data-toggle="tooltip" title="RSS feed of recent downloads"><i class="fa fa-rss"></i></a>
<a href="rssFeed?user=${user}&type=AudioBook&limit=10.xml" class="button btn btn-sm btn-primary" data-toggle="tooltip" title="RSS feed of recent downloads"><i class="fa fa-rss"></i></a>
<link rel="alternate" type="application/rss+xml" title="LazyLibrarian latest AudioBooks" href="rssFeed?user=${user}&type=AudioBook&limit=10.xml">
%endif
</div>
<div class="col-xs-2">
Expand Down
3 changes: 2 additions & 1 deletion data/interfaces/bookstrap/books.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<a href="bookWall?have=0" class="button btn btn-sm btn-primary"><i class="fa fa-calendar-plus"></i> Additions</a>
<a href="bookWall?have=1" class="button btn btn-sm btn-primary"><i class="fa fa-calendar-alt"></i> Downloads</a>
%if lazylibrarian.CONFIG['USER_ACCOUNTS'] == True:
<a href="rssFeed?user=${user}&type=eBook&limit=10.xml" type="application/rss+xml" class="button btn btn-sm btn-primary" data-toggle="tooltip" title="RSS feed of recent downloads"><i class="fa fa-rss"></i></a>
<a href="rssFeed?user=${user}&type=eBook&limit=10.xml" class="button btn btn-sm btn-primary" data-toggle="tooltip" title="RSS feed of recent downloads"><i class="fa fa-rss"></i></a>
<link rel="alternate" type="application/rss+xml" title="LazyLibrarian latest eBooks" href="rssFeed?user=${user}&type=eBook&limit=10.xml">
%endif
</div>
%if len(languages) > 1:
Expand Down
3 changes: 2 additions & 1 deletion data/interfaces/bookstrap/magazines.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
%endif
<a href="magWall" class="button btn btn-sm btn-primary"><i class="fa fa-calendar-check"></i> Recent Issues</a>
%if lazylibrarian.CONFIG['USER_ACCOUNTS'] == True:
<a href="rssFeed?user=${user}&type=Magazine&limit=10.xml" type="application/rss+xml" class="button btn btn-sm btn-primary" data-toggle="tooltip" title="RSS feed of recent downloads"><i class="fa fa-rss"></i></a>
<a href="rssFeed?user=${user}&type=Magazine&limit=10.xml" class="button btn btn-sm btn-primary" data-toggle="tooltip" title="RSS feed of recent downloads"><i class="fa fa-rss"></i></a>
<link rel="alternate" type="application/rss+xml" title="LazyLibrarian latest magazines" href="rssFeed?user=${user}&type=Magazine&limit=10.xml">
%endif
</div>
<div class="clearfix visible-xs"><hr/></div>
Expand Down
3 changes: 2 additions & 1 deletion lazylibrarian/qbittorrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# along with Lazylibrarian. If not, see <http://www.gnu.org/licenses/>.


import json
import mimetypes
import os
import platform
Expand Down Expand Up @@ -120,7 +121,7 @@ def _command(self, command, args=None, content_type=None, files=None):

# some commands return json
if contentType == 'application/json':
return response.json()
return json.loads(response.read())
else:
# some commands return plain text
resp = response.read()
Expand Down

0 comments on commit eb985a9

Please sign in to comment.