Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release-2012.05.04'
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-weber committed May 5, 2012
2 parents 4d6f452 + a05c5f2 commit a6ec7c1
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 13 deletions.
3 changes: 2 additions & 1 deletion AUTHORS
@@ -1,5 +1,6 @@
Simon Weber anything not specified by other authors
David Dooling compatibility updates in protocol.py
Kevin Kwok metadata_pb2.py; upload_mp3s code in api.py derived from his work
Darryl Pogue PlaySession simplifications in api.py; .gitignore; tokenauth.py; clientlogin.py
mystilleef change to relative imports in api.py and protocol.py
Ryan Hsu slimmed down to_camel_case function in utils/utils.py
Ryan Hsu slimmed down to_camel_case function in utils/utils.py
7 changes: 2 additions & 5 deletions README.md
Expand Up @@ -12,12 +12,9 @@ For bugs reports, feature requests, and contributions, go ahead and [open an iss

##Features

**New in version 2012.04.03:**
**New in version 2012.05.04**

* full Windows support and a Windows installer
* upload support for all Google-support file formats
* faster retrieval of playlists
* better example code
* various fixes and compatibility updates

There were also numerous breaking changes needed to improve the Api interface. See the changelog and documentation for details.

Expand Down
5 changes: 5 additions & 0 deletions changelog
@@ -1,3 +1,8 @@
2012.05.04:
update allowed rating values to 1-5 (David Dooling)
update metajamId to matchedId (David Dooling)
fix broken expectation about disc/track numbering metadata

2012.04.03:
change to the 3-clause BSD license
add Kevin Kwok to AUTHORS
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Expand Up @@ -43,7 +43,7 @@
# built documents.
#
# The short X.Y version.
version = '2012.04.03'
version = '2012.05.04'
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Expand Up @@ -78,7 +78,7 @@ These dictionaries have up to 30 keys. Here is an example::
'durationMillis': 562000
'artistNorm': 'the cat empire',
'subjectToCuration': False,
'metajamId': '',
'matchedId': '',
(optional entry; exists if there is album art)
'albumArtUrl': '//lh6.googleusercontent.com/<long identifier>'
}
Expand Down
10 changes: 6 additions & 4 deletions gmusicapi/protocol.py
Expand Up @@ -194,7 +194,9 @@ class rating(_Metadata_Expectation):
#0 = no thumb
#1 = down thumb
#5 = up thumb
allowed_values = (0, 1, 5)
#all values 0-5 are allowed (and stars will be displayed if you enable
#it in Gear -> Music labs) 4 stars also means thumbs up
allowed_values = range(6)

#strings (the default value for val_type
class composer(_Metadata_Expectation):
Expand Down Expand Up @@ -262,7 +264,7 @@ class playlistEntryId(_Metadata_Expectation):
class subjectToCuration(_Metadata_Expectation):
mutable = False
val_type = "boolean"
class metajamId(_Metadata_Expectation):
class matchedId(_Metadata_Expectation):
mutable = False


Expand Down Expand Up @@ -803,13 +805,13 @@ def make_metadata_request(self, filenames):
if "tracknumber" in audio:
tracknumber = audio["tracknumber"][0].split("/")
track.track = int(tracknumber[0])
if len(tracknumber) == 2:
if len(tracknumber) == 2 and tracknumber[1]:
track.totalTracks = int(tracknumber[1])

if "discnumber" in audio:
discnumber = audio["discnumber"][0].split("/")
track.disc = int(discnumber[0])
if len(discnumber) == 2:
if len(discnumber) == 2 and discnumber[1]:
track.totalDiscs = int(discnumber[1])

return (metadata, filemap)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -28,7 +28,7 @@

setup(
name='gmusicapi',
version='2012.04.03',
version='2012.05.04',
author='Simon Weber',
author_email='simon@simonmweber.com',
url='http://pypi.python.org/pypi/gmusicapi/',
Expand Down

0 comments on commit a6ec7c1

Please sign in to comment.