Releases: ampache/python3-ampache
6.6.3
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
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
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'
- playlists: added
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
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 anart
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
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)
- Add
- bookmarks
- Add parameter
client
to filter by specific groups of bookmarks - Add
include
parameter (if true include the object in the bookmark)
- Add parameter
Changed
- get_bookmark
- add bookmark as a valid
object_type
- Don't return single JSON bookmarks as an object
- add bookmark as a valid
- 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
- Remove
- bookmark_delete
- Remove
client
parameter default value ('AmpacheAPI') - show error on missing bookmark instead of empty object
- add bookmark as a valid
object_type
- Remove
Fixed
- video: error type was song instead of filter
6.1.1
6.1.0
python3-ampache 6.1.0
Ampache 6 is nearly 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.
Full Changelog: 6.0.1...6.1.0
Added
- Check for a bool in get_indexes parameter
include
- Added
random
to playlist_songs
Changed
- Extended user_edit parameters
fullname_public
reset_apikey
reset_streamtoken
clear_stats
deletes all your play history so don't do that lightly
6.0.1
python3-ampache 6.0.1
This release fixes up some cosmetic issues and cleans up the bool parameters which should be sent as int's
Full Changelog: 6.0.0...6.0.1
Added
- Add back the exact parameter to album_songs (Allow backwards compatability with previous api versions)
Fixed
- Int parameters that were set as bool parameters
6.0.0
python3-ampache 6.0.0
This release adds in support for API6 and still includes backward compatibility to previous versions.
Added
- API6 (Based on API5)
- API6::browse: List server contents in a directory-style listing (Music, Podcast and Video catalogs)
- API6::list: Replace get_indexes with a faster lookup and similar parameters returning
id
,name
,prefix
andbasename
- API6::catalog_add: Create a catalog (Require: 75)
- API6::catalog_delete: Delete a catalog (Require: 75)
- API6::live_stream_create: Create a new live stream (radio station)
- API6::live_stream_edit: Edit a live stream
- API6::live_stream_delete: Delete a stream buy ID
- API6::register: Allow users to register an account (if enabled)
- API6::playlist_create: Return an error if the playlist name already exists for that user
- API6::user_edit (previously user_create):
- Add
group
parameter to pick a catalog filter group - Add
fullname_public
to enable/disable using fullname in public display - Add
reset_apikey
to reset a user Api Key - Add
reset_streamtoken
to reset a user Stream Token - Add
clear_stats
reset all stats for this user be very sure about this one!
- Add
- Add
prefix
(Prefix for Full Name) to album & artist responses - Add
basename
(Name without prefix) to album & artist responses - Add
bitrate
to Democratic objects - Add
format
to Song and Democratic objects - Add
stream_format
,stream_bitrate
,stream_mime
to Song objects (This is the transcoded output for a stream)
- JSON responses
- Cast bool fields to
true
andfalse
instead of "1" & "0" - Add
total_count
to resonses to give clients an idea of the total possible objects
- Cast bool fields to
- advanced_search
- Add
album_disk
as a search type (uses album rules) - Add
song_genre
to album and artist searches - Add
possible_duplicate_album
to song search - Add
mbid_artist
to album search - Add
barcode
to album search - Add
catalog_number
to album search - Add
smartplaylist
to album search - Add
duplicate_tracks
to album and song search (MIN & MAX id for song search) - Alias
possible_duplicate_album
=>possible_duplicate
for album search - Alias
album_genre
=>genre
for album search - Alias
mbid_album
=>mbid
for album search - Alias
mbid_artist
=>mbid
for artist search - Alias
song_genre
=>genre
for song search
- Add
Changed
- Renamed user_update to user_edit (user_update still works and will be depreciated in API7)
- Albums with no album_artist may now return 0 artist called 'Various'
- Don't send AlbumDisk objects to the API
- XML responses
- Api6 XML success and error response messages are put in a
message
element (like json) - For data responses id is the only attribute and everything else is an element
- Name was not set as an attribute OR an element so now it's always an element
- Return original XML output (that may be malformed) when loadxml fails.
- Api6 XML success and error response messages are put in a
- Api6::get_indexes: This method is depreciated and will be removed in Ampache 7.0.0 (Use Api6::list instead)
Removed
- preciserating removed from all objects (use rating)
- Api6::album_songs remove
exact
as a parameter - Api6::stream remove
podcast
as a validtype
value - Warning of depreciated methods from API5 have been removed from API6
- Api6::tag
- Api6::tags
- Api6::tag_albums
- Api6::tag_artists
- Api6::tag_songs
Fixed
- advanced_search methods were breaking with various offset and limits
- JSON responses
- Share and Bookmark object id's were not strings
5.5.0
This release allows you to access any supported API version using the same library
Added
- Fully support API3, API4 and API5 responses based on version string sent.
- set_debug_path function to allow generating docs in different places