mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 12:58:26 +00:00
2nd attempt to fix title bug
This commit is contained in:
parent
42c83aa084
commit
f6e311f056
2 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from plexapi import X_PLEX_CONTAINER_SIZE, log, utils
|
||||
from plexapi.base import PlexObject
|
||||
from plexapi.compat import quote_plus, unquote, urlencode
|
||||
from plexapi.compat import quote, quote_plus, unquote, urlencode
|
||||
from plexapi.exceptions import BadRequest, NotFound
|
||||
from plexapi.media import MediaTag
|
||||
from plexapi.settings import Setting
|
||||
|
@ -94,7 +94,7 @@ class Library(PlexObject):
|
|||
"""
|
||||
args = {}
|
||||
if title:
|
||||
args['title'] = quote_plus(title)
|
||||
args['title'] = title
|
||||
if libtype:
|
||||
args['type'] = utils.searchType(libtype)
|
||||
for attr, value in kwargs.items():
|
||||
|
@ -438,7 +438,7 @@ class LibrarySection(PlexObject):
|
|||
Parameters:
|
||||
title (str): Title of the item to return.
|
||||
"""
|
||||
key = '/library/sections/%s/all?title=%s' % (self.key, title)
|
||||
key = '/library/sections/%s/all?title=%s' % (self.key, quote(title, safe=''))
|
||||
return self.fetchItem(key, title__iexact=title)
|
||||
|
||||
def all(self, sort=None, **kwargs):
|
||||
|
@ -580,7 +580,7 @@ class LibrarySection(PlexObject):
|
|||
for category, value in kwargs.items():
|
||||
args[category] = self._cleanSearchFilter(category, value, libtype)
|
||||
if title is not None:
|
||||
args['title'] = quote_plus(title)
|
||||
args['title'] = title
|
||||
if sort is not None:
|
||||
args['sort'] = self._cleanSearchSort(sort)
|
||||
if libtype is not None:
|
||||
|
|
|
@ -100,7 +100,7 @@ def joinArgs(args):
|
|||
arglist = []
|
||||
for key in sorted(args, key=lambda x: x.lower()):
|
||||
value = compat.ustr(args[key])
|
||||
arglist.append('%s=%s' % (key, compat.quote(value)))
|
||||
arglist.append('%s=%s' % (key, compat.quote(value, safe='')))
|
||||
return '?%s' % '&'.join(arglist)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue