Skip to content

Releases: ampache/python3-ampache

6.8.0

27 Jun 02:57
e90a400
Compare
Choose a tag to compare

python3-ampache 6.8.0

Fixed

  • rate digit check on ints

6.7.3

12 Jun 06:33
787100e
Compare
Choose a tag to compare

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

22 May 08:24
e2ef6f0
Compare
Choose a tag to compare

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

03 Apr 04:56
127b140
Compare
Choose a tag to compare

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

6.6.3

08 Oct 00:01
472c654
Compare
Choose a tag to compare

python3-ampache 6.6.3

This is a big one, we have now added ALL functions to execute. This allows you to use a dictionary of parameters for calls and makes it a lot easier to write your code.

Using get_config and save_config allows you to simplify the handshake process by storing your details and allowing you to just pull from history and get right back into it.

import ampache

ampache_connection = ampache.API()

if ampache_connection.get_config():
    ampache_session = ampache_connection.execute('handshake')

Note that for a password handshake you need to send a timestamp as well (and import time)

ampache_session = ampache_connection.execute('handshake', {'timestamp': int(time.time())}

Added

  • stream, download added stats parameter (enable/disable stat recording)
  • Added missing parameters to playlist_edit (owner, items, tracks)
  • Added a constant CLIENT_NAME for fallback name 'python3-ampache'

Changed

  • Updated requirement for requests to >=
  • Updated readme examples to use new functions (execute, config save/get)
  • playlist_create, playlist_edit parameter names changed to match each other (playlist_name, playlist_type)
  • username parameters require string
  • parameter names updated for a lot of methods
    • update_art
    • update_from_tags
    • update_artist_info

Full Changelog: 6.6.1...6.6.3

6.6.1

28 Aug 04:03
0db885b
Compare
Choose a tag to compare

python3-ampache 6.6.1

Bug update to fix a few things found in testing Ampache releases. Adding more checks to the build process has helped me find a few issues here.

The execute function allows simpler code creation. (Currently only supports handshake and ping but will be expanded to all methods)

The project readme and examples will be updated as this function expands support for other methods and will help reduce work connecting to Ampache servers.

Added

  • new function execute: execute(self, method: str, params=None)
  • new function set_version: set the class AMPACHE_VERSION variable
  • debug messages for some helper functions
  • flag: add date parameter
  • record_play: add date parameter

Fixed

  • get_id_list fixes for more types of returned data

Full Changelog: 6.6.0...6.6.1

6.6.0

22 Jul 06:50
961e5a8
Compare
Choose a tag to compare

python3-ampache 6.6.0

This is the first major update for a while. API6 has had a lot of updates since the last release.

Added

  • API6
    • New Method: now_playing
    • New Method: player
    • New Method playlist_hash

Changed

  • API6
    • playlists: added include parameter
    • download: added bitrate parameter
    • artist_albums: added album_artist parameter
    • Changed default client name from 'api' to 'python3-ampache'

Fixed

  • get_id_list and get_object_list functions are able to get data from all previous API versions

Full Changelog: 6.3.0...6.6.0

6.3.0

13 Mar 21:06
ca77c1b
Compare
Choose a tag to compare

python3-ampache 6.3.0

API6 continues it's run and has had a lot of new methods added.

Nothing major in the library beyond updates to match the Ampache release and expanded docs in the build script.

Added

  • API6
    • New Method: search_group (return multiple object types from a single set of search rules)
    • New Method: search (alias for advanced_search)
    • New Method: user_playlists (return user playlists and does not include smartlists)
    • New Method: user_smartlists (return user smartlists (searches) and does not include playlists)
    • New Method: playlist_add (add songs to a playlist, allowing different song parent types)
    • New Method: index (replaces get_indexes with a simpler list of id's. children can be included)
    • Add has_art parameter to any object with an art url
    • Add avatar url to user objects

Changed

  • API6
    • playlist_add_song: depreciated and will be removed in API7 (Use playlist_add)
    • share_create: add more valid types ('playlist', 'podcast', 'podcast_episode', 'video')
    • user: make username optional

Fixed

  • ALL
    • Userflag wasn't sending bool when cached in the database
    • Admin would always get everyones playlists when filtering
    • Stream methods would not send the bitrate correctly
  • API6
    • playlists method not respecting like for smartlists
    • playlist_edit method will decode html , separators

6.2.0

03 Nov 05:53
54f95a1
Compare
Choose a tag to compare

python3-ampache 6.2.0

Ampache 6.1.0 is the latest API6 release.

This release has two new methods have been added

The bookmark methods have had a bit of a rework as they were not very useful

Added

  • New Method: bookmark (Get single bookmark by bookmark_id)
  • New Method: lost_password (Allows a non-admin user to reset their password)
  • bookmark_create: Add include parameter (if true include the object in the bookmark)
  • bookmark_edit: Add include parameter (if true include the object in the bookmark)
  • get_bookmark
    • Add include parameter (if true include the object in the bookmark)
    • Add all parameter (if true include every bookmark for the object)
  • bookmarks
    • Add parameter client to filter by specific groups of bookmarks
    • Add include parameter (if true include the object in the bookmark)

Changed

  • get_bookmark
    • add bookmark as a valid object_type
    • Don't return single JSON bookmarks as an object
  • bookmark_create: Remove client parameter default value ('AmpacheAPI')
  • bookmark_edit
    • Remove client parameter default value ('AmpacheAPI')
    • show error on missing bookmark instead of empty object
    • add bookmark as a valid object_type
    • Don't return single JSON bookmarks as an object
  • bookmark_delete
    • Remove client parameter default value ('AmpacheAPI')
    • show error on missing bookmark instead of empty object
    • add bookmark as a valid object_type

Fixed

  • video: error type was song instead of filter

6.1.1

30 Aug 05:38
5a8ae20
Compare
Choose a tag to compare

python3-ampache 6.1.1

Ampache 6 is here and this lib is done for the initial release. there are a few changes that aren't completely compatible if you've been using 6.. version of the library.

Fixed

  • Fix preference methods returning all the preferences by @paulijar in #13