Repository navigation
Releases: ampache/python3-ampache
Release list
8.3.0
python3-ampache 8.3.0
Changed
Synced request parameters with the current server API spec:
handshake()gainedclient,geo_latitude,geo_longitude,geo_namecatalog_add(),catalog_create()gainedbeetsdb(fortype='beets'/'beetsremote')label_artists()gainedinclude('albums', 'songs')now_playing()gainedoffset,limitplaylist_edit()gainedsortplaylist_folder_create()gainedfolder_typeplaylist_folder_edit()gainedfolder_type,hiddenplaylist_remove_song()gainedclearpodcasts(),shares()gainedadd,updatetimestamp filterssearch()gained rule grouping (rule_N_group/group_operators), matchingadvanced_search()
Fixed
execute()dispatcher forplaylist_remove_songwas droppingsong_id,track(and nowclear)execute()dispatcher forpodcastsread a non-existentfilter_idparam instead offilter_str
8.2.0
python3-ampache 8.2.0
Added
quickconnect_initiate,quickconnect_status— QuickConnect pairing (API8+).
Fixed
user_updatewas defined twice and just forwarded touser_edit, which doesn't exist on API4/5 serversexecute()was missing dispatcher cases for the playlist folder methods,podcast_update
8.1.1
python3-ampache 8.1.1
The library now targets Ampache API8. (Branch api8) We have diverged from the 6.9.2 release.
This is not an incremental 6.x bump and has breaking changes.
Methods for API6 that were removed in API8 have not been removed in this library to allow you to set your own version.
This should remain compatible with API6 servers so file a bug if you have an issue that is not covered in the changelog as a breaking change.
Added
New methods, all requiring API8+ on the server:
- Folders:
folder,folders - Album disks:
album_disk,album_disks,album_disk_songs - Playlist folders:
playlist_folders,playlist_folder,
playlist_folder_items,playlist_folder_create,
playlist_folder_edit,playlist_folder_delete,
playlist_folder_add,playlist_folder_remove - Collections:
collections,collection,collection_items,
collection_create,collection_edit,collection_delete,
collection_add,collection_remove playlist_remove— type-aware removal (object id + type, or track
number), replacesplaylist_remove_songcatalog_create,upload,random,sonic_match,
set_post_secrets,post_request,debug_response
Changed
- Breaking: HTTP error responses are no longer swallowed to
False.
Onurllib.error.HTTPErrorthe request layer now returns the parsed error response instead ofFalse.
Code that checkedif not result:to detect a failed call will now get a truthy error object instead.
Callset_return_http_errors(False)to restore the old behavior. - Breaking:
users()parameter order changed from(sort, cond, offset, limit)to(offset, limit, sort, cond).
Positional callers must update their call sites. - Breaking:
stream()signature changed from
(object_id, object_type, destination, stats=1)to
(object_id, object_type, destination, bitrate=False, transcode=False, offset=0, length=False, stats=1). - Breaking:
download()parameter order changed from
(object_id, object_type, destination, transcode='raw', bitrate=False, stats=1)to
(object_id, object_type, destination, bitrate=False, transcode='raw', stats=1, zip_container=False)
—bitrate/transcodeswapped, plus a newzip_containeroption. get_indexes()gained ahide_searchparameter, inserted as the 3rd positional argument (beforeexact).
Positional callers passingexactas the 3rd argument will now sethide_searchinstead.get_config()now loads each config key (ampache_url,ampache_user,ampache_apikey,ampache_bearer_token,
ampache_session,api_format) independently, so one missing key no longer aborts loading the rest.AMPACHE_VERSIONdefault changed from'6.9.0'to'8.1.1'.
Anyone relying on the default (not callingset_version()explicitly) will now advertise API8 to their server.browse,playlist_add,catalog_action,user_edit
internal behavior updated for API8 (no public signature change forbrowse/catalog_action).
Deprecated
get_indexes→ useindexplaylist_add_song→ useplaylist_addplaylist_remove_song→ useplaylist_remove(removed entirely in API9)user_update→ useuser_edit
Removed
- No public methods were deleted. Stale example fixtures for
get_indexesandtag*underdocs/json-responsesand
docs/xml-responseswere pruned; the underlying methods remain.
Fixed
get_config()no longer fails closed when a single config key is missing from the saved config file.
Upgrading if you're staying on an API6 server
You do not need to switch servers to take this library update, but:
- Call
set_version()explicitly
e.g.set_version('6.6.0')(or whatever your server reports)
the library's default changed to'8.1.1'. - Check positional-argument call sites
forusers(),stream(),download(), andget_indexes()
the parameter order changed (see Changed above).
Keyword-argument callers are unaffected by the reordering. - Review any code that treats a failed request as falsy
HTTP error responses are now returned as the parsed error object rather thanFalse.
Callset_return_http_errors(False)to restore the oldFalse-on-error behavior
without touching your call sites. - All newly added methods (folders, album disks, playlist folders, collections, etc.)
are additive and API8-only they won't work against an API6 server. - No dependency or Python version floor changed
(requests>=2.28.1unchanged).
6.9.2
python3-ampache 6.9.2
Match Ampache API 6.9.2 release
Added
- API6
- artists: Add
exactparameter (0,1, if true filter is exact rather then fuzzy) - list: Add
hide_searchparameter (0,1, if true do not include searches/smartlists in the result) - podcasts: Add
includeparameter ('episodes' to include episodes in the response) - users: Add
offsetandlimitparameters (paging for the user list)
- artists: Add
6.9.1
python3-ampache 6.9.1
Match Ampache API 6.9.1 release
Added
- API6
- New Method: smartlist (Return a single Smartlist)
- New Method: smartlists (Return smartlists based on filters)
- New Method: smartlist_songs (Return the songs for a smartlist)
- New Method: smartlist_delete (Delete a smartlist)
- preference_edit: Add
defaultparameter (Set as system default for new and public users)
Fixed
- PyPi publishing
- genre_update example error on save without permission
6.9.0
python3-ampache 6.9.0
Version bump to match Ampache API 6.9.0
Added
- API6
- New Method: get_lyrics (Return Database lyrics or search with plugins by Song id)
- New Method: search_rules (Get a list of valid search rules per search type)
- user_playlists: Add include parameter to get song data
- user_smartlists: Add include parameter to get song data
Fixed
- Didn't update
AMPACHE_VERSIONlast update - rate would overwrite non-string ratings with 0
6.8.0
python3-ampache 6.8.0
Fixed
- rate digit check on ints
6.7.3
python3-ampache 6.7.3
There is now decent Bearer token support for all functions.
import ampache
ampache_connection = ampache.API()
encrypted_key = ampache_connection.encrypt_string('apikey', 'username')
ampache_connection.set_debug(True)
ampache_connection.set_format('json')
ampache_connection.set_url('https://demo.ampache.dev')
ampache_connection.set_bearer_token(encrypted_key)
print(ampache_connection.execute('albums', {'limit': 1}))
When set; your token will be used for all calls so you don't need to keep an eye on your session limits.
Added
- Bearer token support
- Property name
AMPACHE_BEARER_TOKEN(string) - Function
set_bearer_token(bearer_token: str) - Save the token to config when using
save_config() - Load bearer token from
get_config()
- Property name
- Function
get_request(self, ampache_url, data, api_method)to reduce library size
Changed
- Return False for execute commands missing parameters instead of failing at the method call
Fixed
- Avoid errors on bad JSON decodes
- Avoid errors on bad XML decodes
6.7.0-1
python3-ampache 6.7.0-1
PyPI build from the wrong branch. re-upload and version add for PyPI
Minor update fixing some bugs with method and action string not matching and new API methods to Ampache 7.5.0
Added
- New Method: song_tags (Read and return all file and enabled plugin tags for the song)
- Add song_tags to execute as a valid method
Fixed
- Combined
actionandmethodstring into single variable to avoid copy/paste bugs - Return
Noneon execute without matching method value
Full Changelog: 6.6.7...6.7.0
6.6.7
python3-ampache 6.6.7
In this release all Browse functions that support sort and cond filters have been added.
Added
- New function get_external_metadata
- Add
condandsortparameters to all valid functions
Changed
- Don't force str and int typing in parameters to allow forcing False values
- Use isinstance to check for bad ampache_response's
Fixed
- bookmark_create missing
includeparameter
Full Changelog: 6.6.3...6.6.7