Commit graph

141 commits

Author SHA1 Message Date
Alok Saboo
4eb83e8d97 Save track popularity during the import to save an API call 2022-05-13 09:58:12 -04:00
Alok Saboo
d465471308 Add force option in config 2022-05-13 08:42:17 -04:00
Alok Saboo
4c4cafbf04 Update spotify.py 2022-05-12 20:42:13 -04:00
Alok Saboo
9c9f52b7e5 remove logging 2022-05-12 20:40:03 -04:00
Alok Saboo
db1c77fb25 Update spotify.py 2022-05-12 20:38:01 -04:00
Alok Saboo
ba3a582483 Update spotify.py 2022-05-12 20:36:04 -04:00
Alok Saboo
e8de749eaf Clean up docstrings 2022-05-12 20:24:40 -04:00
Alok Saboo
b1ad49a054 Update spotify.py 2022-05-12 20:09:40 -04:00
Alok Saboo
1b02d65112 Fix return 2022-05-08 12:42:20 -04:00
Alok Saboo
1d43ea2dba Save Spotify album_id and track_id as flexible attributes 2022-05-08 12:21:44 -04:00
Dominik Schrempf
fd761cb1e6
fix spotify pagination
Basically, keep fetching tracks until there are no more available for
the specified album.

Fixes #4180.
2021-12-19 00:16:07 +01:00
Andrew Rogl
ee4268dabb Remove unused imports
Fix imports
Fix formatting
2021-08-26 20:59:48 +10:00
Andrew Rogl
1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
Rahul Ahuja
a5fadf0dcc Integrate MetadataSourcePlugin 2019-09-15 15:59:24 -07:00
Rahul Ahuja
7ec3632309 Fix year assignment with year-only release date 2019-08-03 19:07:56 -07:00
FichteFoll
c144141e9a
Update a few more http URLs to https that I missed
Should really be all now (pending the next commit).
2019-06-05 23:07:11 +02:00
Carl Suster
6382c364e2 confit: replace with confuse in plugins 2019-06-01 10:03:41 +10:00
Rahul Ahuja
5fbb28637d Set Spotify AlbumInfo.mediums 2019-01-23 19:54:14 -08:00
Rahul Ahuja
6a9b62a9c2 Specify None rtype in doscstrings 2019-01-22 20:54:46 -08:00
Rahul Ahuja
8c6cc6573c Unidecode query string 2019-01-22 19:42:25 -08:00
Rahul Ahuja
b91406b252 Backwords-compatible str/unicode 2019-01-22 18:59:15 -08:00
Rahul Ahuja
c6b8f6d143 Fix formatting/spelling 2019-01-22 18:09:10 -08:00
Rahul Ahuja
f7d20090e6 Fix _handle_response reauth bug and empty str query construction 2019-01-22 12:14:52 -08:00
Rahul Ahuja
7b57b0b608 Appease Flake8 2019-01-22 10:53:18 -08:00
Rahul Ahuja
3a67eae46d Use track attrs directly, better naming/docstrings 2019-01-22 10:41:18 -08:00
Rahul Ahuja
09fc53eaea Only parse Spotify ID when necessary 2019-01-21 23:53:19 -08:00
Rahul Ahuja
96fda0df0d Docstring formatting 2019-01-21 23:36:51 -08:00
Rahul Ahuja
77f9a930b7 Fix remaining test, use official doc wording 2019-01-21 23:15:08 -08:00
Rahul Ahuja
0527edbd48 Fix test index, add docstrings 2019-01-21 23:05:47 -08:00
Rahul Ahuja
f63beca39a Switch filter ordering in test 2019-01-21 22:35:12 -08:00
Rahul Ahuja
48401c60dc Switch query filter ordering for tests 2019-01-21 22:27:31 -08:00
Rahul Ahuja
42e852cc7e Clarify _search_spotify return type 2019-01-21 22:12:56 -08:00
Rahul Ahuja
aa18f9116d Refine doc wording 2019-01-21 22:01:30 -08:00
Rahul Ahuja
265fcc7cea utilize track_for_id in item_candidates 2019-01-21 21:45:50 -08:00
Rahul Ahuja
5472a49991 Add candidates and item_candidates, modularize Search API queries 2019-01-21 21:24:41 -08:00
Rahul Ahuja
dab62f2194 inline auth_header property 2019-01-21 09:23:38 -08:00
Rahul Ahuja
b50e148bec use official client ID/secret, remove usage from docs 2019-01-21 08:32:57 -08:00
Rahul Ahuja
cb8b0874d4 naming 2019-01-21 01:56:57 -08:00
Rahul Ahuja
415b21cbc1 fix var reference, add docstring 2019-01-21 01:30:37 -08:00
Rahul Ahuja
844b940832 capture TrackInfo.medium_total 2019-01-20 15:32:07 -08:00
Rahul Ahuja
dbf17f760e add TrackInfo.medium 2019-01-20 15:09:51 -08:00
Rahul Ahuja
78a46fd4d0 doc typo 2019-01-20 15:02:19 -08:00
Rahul Ahuja
b4d54b0950 set TrackInfo.index in track_for_id 2019-01-20 15:00:32 -08:00
Rahul Ahuja
082357b063 document new functionality, use Spotify ID for AlbumInfo.album_id 2019-01-20 12:40:11 -08:00
Rahul Ahuja
287c767a6d fix formatting 2019-01-20 11:24:33 -08:00
Rahul Ahuja
695dbfaf80 copy album_distance, track_distance from Beatport plugin 2019-01-20 03:20:18 -08:00
Rahul Ahuja
bb1ed67e2d use open.spotify.com URL for data_url 2019-01-20 02:43:54 -08:00
Rahul Ahuja
02aa79ae61 add more docstrings 2019-01-20 02:28:59 -08:00
Rahul Ahuja
b95eaa8ffe fix test, document Spotify ID 2019-01-20 02:20:10 -08:00
Rahul Ahuja
9a30000b56 better naming, formatting 2019-01-20 02:04:46 -08:00
Rahul Ahuja
60c9201e4a modularize Spotify ID parsing 2019-01-20 01:54:08 -08:00
Rahul Ahuja
91b2e33569 support album autotagging 2019-01-20 01:33:19 -08:00
Rahul Ahuja
e95b8a6ee0 add docstrings, separate TrackInfo generation 2019-01-20 00:41:14 -08:00
Rahul Ahuja
3309c555ed better naming, documentation 2019-01-20 00:05:56 -08:00
Rahul Ahuja
104f6185ab revert unnecessary double --> single quotes 2019-01-19 23:57:36 -08:00
Rahul Ahuja
337cf2a1c3 appease Flake8 2019-01-19 23:35:06 -08:00
Rahul Ahuja
dc77943da2 try oauth token mock 2019-01-19 23:21:02 -08:00
Rahul Ahuja
e6c8f79a07 resolve python2/3 bytes/str incompatibilities, simplify authentication 2019-01-19 22:55:40 -08:00
Rahul Ahuja
c1cb7a2941 address py3 compatibility later 2019-01-19 19:29:35 -08:00
Rahul Ahuja
8bdd927d20 try b64 encode/decode 2019-01-19 19:17:34 -08:00
Rahul Ahuja
160d66d05c b64encode with bytes 2019-01-19 19:04:15 -08:00
Rahul Ahuja
3639971391 remove unused import 2019-01-19 18:48:46 -08:00
Rahul Ahuja
1a9f20edfe unregister import_begin listener 2019-01-19 18:42:29 -08:00
Rahul Ahuja
82319734cb black -S -l 79 autoformat 2019-01-19 18:32:41 -08:00
Rahul Ahuja
204a1453c4 Update spotify.py 2019-01-19 18:06:17 -08:00
Johnny Robeson
fcbfce3984 replace deprecated log.warn() with log.warning() 2016-08-09 00:33:38 -04:00
Adrian Sampson
a8b039da78 Remove a spurious six use
I'm not sure what that `encode` was doing anyway.
2016-06-25 19:24:59 -07:00
Johnny Robeson
e8afcbe7ec replace unicode with six.text_type 2016-06-24 05:53:49 -04:00
Johnny Robeson
790b1b5153 replace some filter/map calls with list comps
These are places where the surrounding/calling code needs a list, not an iter.
2016-06-08 00:17:18 -04: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
30cf407074 Removed import of unicode_literals from plugins
* rewrite
* scrub
* smartplaylist
* spotify
* the
2016-02-20 14:31:27 +01:00
Peter Kessen
6b408507f6 added encoding as comment in files
added line like
# -*- coding: utf-8 -*-
to all files without license
2015-11-19 18:52:57 +01:00
Adrian Sampson
90178ab380 Always log a template literal (fix #1481)
Otherwise, we risk the user-provided string looking like a format string! If
it contains curly braces, it can behave unexpectedly.
2015-05-28 23:44:41 -04: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
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
Bruno Cauet
e14a54df05 Convert multiple plugins' logger usage (easy ones)
Those plugins only called methods and no function, which eases the
conversion.
2015-01-06 21:34:13 +01:00
Bruno Cauet
b8211a3c4c Every plugin uses its own logger
logging.getLogger(__name__) everywhere!
Several loggers prefixed every log message with [logername], which we
delete here.
2015-01-06 10:35:44 +01:00
Bruno Cauet
30f158a95e Move "from beets import logging" statements
Move the import next to other beets-related imports
2015-01-05 10:05:21 +01:00
Bruno Cauet
f5c5666729 Attain pep8-cleanliness
No more E12 or E501
2015-01-04 17:29:31 +01:00
Bruno Cauet
7df8bef8b7 Update logging imports: logging → beets.logging 2015-01-04 17:02:27 +01:00
Bruno Cauet
8cac47af2a Convert beets plugins to lazy logging 2015-01-04 17:02:27 +01:00
Ben Lumley
10d05a32be Trivial typo fix 2014-10-10 09:57:32 +01:00
Adrian Sampson
77f7d18c00 Remove stray comment from #909
Yes, it is necessary.
2014-09-14 13:15:42 -07:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
65de93941d flake8 cleanup
Cleanup after cleanup
2014-09-09 11:28:43 +10:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
66aee8094f Clean up of logging messages as described here
All logging now prefers the ' (single quote) over the " (double quote)

https://github.com/sampsyo/beets/wiki/Hacking
2014-09-09 11:28:43 +10:00
Adrian Sampson
4f2fe19e03 Flake8 fix in spotify 2014-08-19 09:53:26 -07:00
Adrian Sampson
d8c4be100d Spotify: Use logging (#892)
Instead of one-off logging functions. This also obviates the need for a
separate verbose flag.
2014-08-18 22:30:42 -07:00
Adrian Sampson
ff875c5d61 Spotify (#892): Simplify interface
This changes the flag from --show_failures to --show-failures, which is more
standard among Unixy CLIs. It also reduces some space and line noise in the
output.
2014-08-18 17:29:58 -07:00
Olin Gay
9330e49013 Change spottily plugin output to use syserr for everything except printing the plugin tracks. Allows output to be piped. 2014-08-17 10:36:41 -04:00
Olin Gay
d076e14515 Complete PEP8 cleanup of spotify plugin 2014-08-17 09:53:54 -04:00
Olin Gay
ce4b45ec76 Pull request for Spotify plugin development, see: https://groups.google.com/forum/#!topic/beets-users/2xsOZC-NMNk 2014-08-03 19:55:50 -04:00