Skip to content

Releases: ampache/python3-ampache

8.3.0

Choose a tag to compare

@lachlan-00 lachlan-00 released this 20 Oct 10:09
921d5e0

python3-ampache 8.3.0

Changed

Synced request parameters with the current server API spec:

  • handshake() gained client, geo_latitude, geo_longitude, geo_name
  • catalog_add(), catalog_create() gained beetsdb (for type='beets'/'beetsremote')
  • label_artists() gained include ('albums', 'songs')
  • now_playing() gained offset, limit
  • playlist_edit() gained sort
  • playlist_folder_create() gained folder_type
  • playlist_folder_edit() gained folder_type, hidden
  • playlist_remove_song() gained clear
  • podcasts(), shares() gained add, update timestamp filters
  • search() gained rule grouping (rule_N_group/group_operators), matching advanced_search()

Fixed

  • execute() dispatcher for playlist_remove_song was dropping song_id, track (and now clear)
  • execute() dispatcher for podcasts read a non-existent filter_id param instead of filter_str

8.2.0

Choose a tag to compare

@lachlan-00 lachlan-00 released this 04 Oct 05:22

python3-ampache 8.2.0

Added

  • quickconnect_initiate, quickconnect_status — QuickConnect pairing (API8+).

Fixed

  • user_update was defined twice and just forwarded to user_edit, which doesn't exist on API4/5 servers
  • execute() was missing dispatcher cases for the playlist folder methods, podcast_update

8.1.1

Choose a tag to compare

@lachlan-00 lachlan-00 released this 15 Sep 11:02
16f21b3

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), replaces playlist_remove_song
  • catalog_create, upload, random, sonic_match,
    set_post_secrets, post_request, debug_response

Changed

  • Breaking: HTTP error responses are no longer swallowed to False.
    On urllib.error.HTTPError the request layer now returns the parsed error response instead of False.
    Code that checked if not result: to detect a failed call will now get a truthy error object instead.
    Call set_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/transcode swapped, plus a new zip_container option.
  • get_indexes() gained a hide_search parameter, inserted as the 3rd positional argument (before exact).
    Positional callers passing exact as the 3rd argument will now set hide_search instead.
  • 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_VERSION default changed from '6.9.0' to '8.1.1'.
    Anyone relying on the default (not calling set_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 for browse/catalog_action).

Deprecated

  • get_indexes → use index
  • playlist_add_song → use playlist_add
  • playlist_remove_song → use playlist_remove (removed entirely in API9)
  • user_update → use user_edit

Removed

  • No public methods were deleted. Stale example fixtures for
    get_indexes and tag* under docs/json-responses and
    docs/xml-responses were 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:

  1. 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'.
  2. Check positional-argument call sites
    for users(), stream(), download(), and get_indexes()
    the parameter order changed (see Changed above).
    Keyword-argument callers are unaffected by the reordering.
  3. Review any code that treats a failed request as falsy
    HTTP error responses are now returned as the parsed error object rather than False.
    Call set_return_http_errors(False) to restore the old False-on-error behavior
    without touching your call sites.
  4. All newly added methods (folders, album disks, playlist folders, collections, etc.)
    are additive and API8-only they won't work against an API6 server.
  5. No dependency or Python version floor changed
    (requests>=2.28.1 unchanged).

6.9.2

Choose a tag to compare

@lachlan-00 lachlan-00 released this 24 Jul 06:33

python3-ampache 6.9.2

Match Ampache API 6.9.2 release

Added

  • API6
    • artists: Add exact parameter (0,1, if true filter is exact rather then fuzzy)
    • list: Add hide_search parameter (0,1, if true do not include searches/smartlists in the result)
    • podcasts: Add include parameter ('episodes' to include episodes in the response)
    • users: Add offset and limit parameters (paging for the user list)

6.9.1

Choose a tag to compare

@lachlan-00 lachlan-00 released this 19 Feb 09:51
c8b2da7

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 default parameter (Set as system default for new and public users)

Fixed

  • PyPi publishing
  • genre_update example error on save without permission

6.9.0

Choose a tag to compare

@lachlan-00 lachlan-00 released this 22 Dec 04:31
3cf83fa

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_VERSION last update
  • rate would overwrite non-string ratings with 0

6.8.0

Choose a tag to compare

@lachlan-00 lachlan-00 released this 27 Jun 02:57
e90a400

python3-ampache 6.8.0

Fixed

  • rate digit check on ints

6.7.3

Choose a tag to compare

@lachlan-00 lachlan-00 released this 12 Jun 06:33
787100e

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()
  • 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

Choose a tag to compare

@lachlan-00 lachlan-00 released this 22 May 08:24
e2ef6f0

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 action and method string into single variable to avoid copy/paste bugs
  • Return None on execute without matching method value

Full Changelog: 6.6.7...6.7.0

6.6.7

Choose a tag to compare

@lachlan-00 lachlan-00 released this 03 Apr 04:56
127b140

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 cond and sort parameters 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 include parameter

Full Changelog: 6.6.3...6.6.7