fix for breadcrumbs not linking correctly.

This commit is contained in:
2018-04-26 11:54:37 +01:00
parent 134c3cb761
commit bc6504088f
2 changed files with 4 additions and 4 deletions

View File

@@ -4,8 +4,8 @@ This is for if you have a collection of comics on a media server and want to rea
# Requirments
- [Django 1.10](https://www.djangoproject.com/)
- [python 3.5](https://www.python.org/)
- [Django 2.0](https://www.djangoproject.com/)
- [python 3.5+](https://www.python.org/)
- [rarfile python library by Marko Kreen](https://github.com/markokr/rarfile) (included)
- [Unrar by winrar](http://rarlabs.com)
- [django-recaptcha by praekelt](https://github.com/praekelt/django-recaptcha)

View File

@@ -56,12 +56,12 @@ def generate_breadcrumbs_from_path(directory=False, book=False):
for item in folders[::-1]:
bc = Breadcrumb()
bc.name = item.name
bc.url = b'/comic/' + urlsafe_base64_encode(item.selector.bytes)
bc.url = '/comic/' + urlsafe_base64_encode(item.selector.bytes).decode()
output.append(bc)
if book:
bc = Breadcrumb()
bc.name = book.file_name
bc.url = b'/read/' + urlsafe_base64_encode(book.selector.bytes)
bc.url = '/read/' + urlsafe_base64_encode(book.selector.bytes).decode()
output.append(bc)
return output