Adrian Sampson
009c6a4f6d
Slightly clearer layout for #2593 , and comments
2017-06-15 17:51:14 -04:00
robot3498712
cafbb2438e
fixed failing test - line too long
2017-06-15 13:27:28 +02:00
robot3498712
bc8a8ecf5f
fix /issues/2592: web: Use Unicode paths to send files on Windows under Python 2
2017-06-15 12:49:00 +02:00
Adrian Sampson
b57c49d738
Add a period to a comment, simplify one expression
...
w.r.t. #2542
2017-05-04 09:29:27 -04:00
Mark Stenglein
22f07b91e9
web: __init__: _rep: Make the looping more pythonic
...
As suggested, changes around the for loop to make it a bit more
pythonic by using an if loop inside a normal for loop.
Signed-off-by: Mark Stenglein <mark@stengle.in>
2017-05-03 16:36:40 -04:00
Mark Stenglein
9394e0ac63
web: __init__: _rep: change to base64 encoding
...
As suggested, this commit adds base64 encoding for the bytes
encoding.
Signed-off-by: Mark Stenglein <mark@stengle.in>
2017-05-03 16:34:30 -04:00
Mark Stenglein
471d46d67e
web: __init__: _rep: Filter all bytes for serializer
...
This commit fixes issue #2532 by filtering out any byte values
added by any other extensions and decoding them to strings for the
JSON serializer.
It does not remove any of the keys, instead opting to just convert
them.
Signed-off-by: Mark Stenglein <mark@stengle.in>
2017-05-03 00:03:05 -04:00
Olivier Biesmans
cf384109f0
Make falke8 happy and reference flask doc for the ReverseProxied class
2017-03-19 21:16:26 +00:00
Olivier Biesmans
aa847e52ac
Add reverse proxy support
2017-03-19 20:08:39 +00:00
Steve Johnson
926dce241c
Use util.displayable_path instead of naive .decode()
2017-01-15 11:25:03 -08:00
Steve Johnson
e3707e45f3
Maybe fix code and tests for Windows
2017-01-15 11:21:59 -08:00
Steve Johnson
e2be6ba781
Query path with bytestring. Might fix tests.
2017-01-15 11:21:59 -08:00
Steve Johnson
4434569ddc
beets.library.Library adds custom bytelower function to all connections, not just one
2017-01-15 11:21:59 -08:00
Steve Johnson
866a650bc0
Rename /item/by_path to /item/path and use PathQuery instead of direct file access
2017-01-15 11:21:33 -08:00
Steve Johnson
05bc4996a8
Rename and invert new config option
2017-01-15 11:21:33 -08:00
Steve Johnson
50ea74635b
Fix tests I broke
2017-01-15 11:21:33 -08:00
Steve Johnson
f6cb46d490
Fix broken tests (no new ones yet)
2017-01-15 11:21:33 -08:00
Steve Johnson
43936cd84c
/item/at_path/ endpoint
...
More at_path
/item/by_path docs
2017-01-15 11:21:33 -08:00
Steve Johnson
29d61ca634
web.exclude_paths_from_items option
...
More exclude_paths_from_items
2017-01-15 11:21:33 -08:00
dopefishh
8bb703619f
use util.py3_path for web attachment filenames ( #2353 )
...
Web attachment filenames must be passed as a string for Python 3
2016-12-29 05:38:27 -05:00
Max Ammann
7242c5ed03
Revert "Expose the relative path to the library instead of omitting the 'path' variable"
...
This reverts commit 5e8ac9e4a5 , because of
a slowdown. Resolves #2182 .
2016-10-26 23:08:44 +02:00
Adrian Sampson
0833c82075
web: Fix a crash related to byte paths on Python 3
2016-08-12 19:59:07 +00:00
Max Ammann
5e8ac9e4a5
Expose the relative path to the library instead of omitting the 'path' variable
2016-06-26 19:53:57 +02:00
Max Ammann
2ae26548fc
Modified and simplified is_expand(...) method
2016-06-26 19:53:57 +02:00
Max Ammann
619344c813
Added documentation for the expand parameter
2016-06-26 19:53:57 +02:00
Max Ammann
041adf47ac
Fixed lines which are mor than 79 characters
2016-06-26 19:53:57 +02:00
Max Ammann
5831b99b9f
Adding 'expand' flag for json requests
...
This allows you to query the individual items of an album
2016-06-26 19:53:57 +02:00
Adrian Sampson
5efd5b21c5
Use new as_str method
...
Instead of `get(six.text_type)`, which was a surprisingly large portion of our
uses of six.
2016-06-25 19:16:14 -07:00
Johnny Robeson
e8afcbe7ec
replace unicode with six.text_type
2016-06-24 05:53:49 -04:00
Johnny Robeson
94bab42f97
use strings (not bytes) for flask responder names
2016-05-30 21:19:15 -04:00
Adrian Sampson
59435792e9
Merge pull request #2010 from sumpfralle/web-api-unique-results
...
web: add API functions for retrieving unique values of specific keys
2016-05-27 00:15:34 -07:00
Lars Kruse
d50923553d
web: add API functions for retrieving unique values of specific keys
...
the following API paths are added:
* /item/values/FIELD
* /album/values/FIELD
Both paths will deliver a json dictionary with the key 'values' containing a
list of unique values belonging to the requested table and field.
Sorting is possible by supplying the query argument "sort_key".
This feature is useful for remote clients, e.g. Mopidy-Beets:
* track genres: /item/unique/genre
* track languages: /album/unique/language
* album artists: /album/unique/albumartist?sort_key=albumartist_sort
* album years: /album/unique/year
2016-05-27 04:12:09 +02:00
Lars Kruse
be4dc227fc
web: handle missing art gracefully
2016-05-24 03:05:51 +02:00
Adrian Sampson
e54c7eec3d
Standardize __future__ imports without parentheses
...
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen
c2e7d59db7
Removed import of unicode_literals from plugin web
2016-02-20 14:36:56 +01:00
Jack Wilsdon
12cd5306b7
Update copyright dates to 2016
2015-12-30 15:42:06 +00:00
Peter Kessen
3eb8008b11
added encoding as comment in files
...
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00
Old T. Man
acd0a902bb
Fix search term encoding.
2015-05-23 13:19:28 -06:00
Adrian Sampson
b8dab9cf9f
Merge pull request #1247 from brunal/future
...
Use all __future__ imports in beets core
Conflicts:
beetsplug/web/__init__.py
test/test_embedart.py
2015-01-26 17:02:07 -08:00
Andre Miller
96e3d8b451
Replaced print with log.info
2015-01-21 19:31:02 +02:00
Bruno Cauet
545ba22f94
CORS init in web plugin: print → log
2015-01-21 10:18:13 +01:00
Bruno Cauet
c2f8cb9983
Merge branch 'master' into future
...
Conflicts:
test/test_plugins.py
2015-01-21 10:04:33 +01:00
Andre Miller
f815138758
Combined cors and cors_origin config options into one
2015-01-20 19:53:04 +02:00
Bruno Cauet
a5026100a3
All plugins use unicode_literals
...
Given that part of them has no test I may have broke them
2015-01-20 16:22:27 +01:00
Andre Miller
47ea4b7d8b
flake8 formatting updates
2015-01-20 16:06:16 +02:00
Andre Miller
f47be23658
CORS support now uses flask-cor extension
2015-01-20 15:33:33 +02:00
Andre Miller
c8880de52c
Fixes for flake8 validation
2015-01-20 00:38:26 +02:00
Andre Miller
bd63e1e386
Made CORS configurable and changed host default to 127.0.0.1
2015-01-20 00:20:26 +02:00
Bruno Cauet
90b388b775
Use __future__ imports but unicode_literals everywhere
...
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.
Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Andre Miller
9fe2bc1a38
Support for CORS
2015-01-18 10:23:49 +02:00