Skip to content

Commit

Permalink
Handle products without a human_name (#43)
Browse files Browse the repository at this point in the history
* Handle products without human_name

* Bump version to 0.15.0
  • Loading branch information
smbl64 authored Jun 23, 2024
1 parent ed211c2 commit 1a86d7d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "humble-cli"
authors = ["Mohammad Banisaeid <[email protected]>"]
version = "0.14.1"
version = "0.15.0"
license = "MIT"
description = "The missing CLI for downloading your Humble Bundle purchases"
documentation = "https://github.com/smbl64/humble-cli"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ After that you will have access to the following sub-commands:

```
$ humble-cli --help
humble-cli 0.14.1
humble-cli 0.15.0
The missing Humble Bundle CLI
USAGE:
Expand Down
5 changes: 1 addition & 4 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ impl Bundle {
let mut result = vec![];
for tpk in tpks {
let redeemed = tpk["redeemed_key_val"].is_string();
let human_name = tpk["human_name"]
.as_str()
.expect("expected human_name to be a string")
.to_owned();
let human_name = tpk["human_name"].as_str().unwrap_or("").to_owned();

result.push(ProductKey {
redeemed,
Expand Down

0 comments on commit 1a86d7d

Please sign in to comment.