Compare commits
No commits in common. "9d334f1e9b8608d065d1e84cbfb0afbe5eab48f8" and "5120d131175ca1bf1d25a72bb422f6fe41ed894e" have entirely different histories.
9d334f1e9b
...
5120d13117
2 changed files with 10 additions and 78 deletions
|
@ -1,63 +1,4 @@
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"ol_id": "OL20374699W",
|
|
||||||
"title": "Overcoming Evil",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"ol_id": "OL1009182A",
|
|
||||||
"name": "Ervin Staub"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"subjects": [
|
|
||||||
"Conflict management",
|
|
||||||
"Genocide",
|
|
||||||
"Violence",
|
|
||||||
"Aggressiveness",
|
|
||||||
"Social groups",
|
|
||||||
"Terrorism, prevention",
|
|
||||||
"Violence, prevention"
|
|
||||||
],
|
|
||||||
"date_added": "2024-03-17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ol_id": "OL17798579W",
|
|
||||||
"title": "Fundamentals of Genocide and Mass Atrocity Prevention",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"ol_id": "OL6963633A",
|
|
||||||
"name": "Scott Straus"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"subjects": [
|
|
||||||
"Verbrechen gegen die Menschlichkeit",
|
|
||||||
"Kriegsverbrechen",
|
|
||||||
"Vertreibung",
|
|
||||||
"Pra vention",
|
|
||||||
"Genocide",
|
|
||||||
"Vo lkermord",
|
|
||||||
"Atrocities",
|
|
||||||
"Prevention",
|
|
||||||
"Pr\u00e4vention",
|
|
||||||
"V\u00f6lkermord"
|
|
||||||
],
|
|
||||||
"date_added": "2024-03-17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ol_id": "OL17478608W",
|
|
||||||
"title": "Crap Days Out",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"ol_id": "OL7325839A",
|
|
||||||
"name": "Gareth Rubin"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"subjects": [
|
|
||||||
"Humor, topic, marriage & family",
|
|
||||||
"Family recreation",
|
|
||||||
"Humor"
|
|
||||||
],
|
|
||||||
"date_added": "2024-03-17"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"ol_id": "OL23279299W",
|
"ol_id": "OL23279299W",
|
||||||
"title": "Soldier box",
|
"title": "Soldier box",
|
||||||
|
|
|
@ -178,28 +178,19 @@ def add_item_to_log(item_id: str, media_type: str, log: str) -> None:
|
||||||
raise Exception("No item found")
|
raise Exception("No item found")
|
||||||
|
|
||||||
if "books" == media_type:
|
if "books" == media_type:
|
||||||
new_item = None
|
new_item, log_to_delete = check_for_existing(
|
||||||
if "work" in "ol_id":
|
item["work"]["ol_id"], media_type, log
|
||||||
new_item, log_to_delete = check_for_existing(
|
)
|
||||||
item["work"]["ol_id"], media_type, log
|
|
||||||
)
|
|
||||||
|
|
||||||
if new_item is None:
|
if new_item is None:
|
||||||
if "ol_id" in item:
|
new_item, log_to_delete = check_for_existing(item["ol_id"], media_type, log)
|
||||||
new_item, log_to_delete = check_for_existing(item["ol_id"], media_type, log)
|
|
||||||
|
|
||||||
if new_item is None:
|
if new_item is None:
|
||||||
if "isbn_13" in item:
|
new_item, log_to_delete = check_for_existing(
|
||||||
new_item, log_to_delete = check_for_existing(
|
item["isbn_13"], media_type, log
|
||||||
item["isbn_13"], media_type, log
|
)
|
||||||
)
|
|
||||||
|
|
||||||
if new_item is None:
|
if new_item is None:
|
||||||
if "isbn_10" in item:
|
new_item, log_to_delete = check_for_existing(
|
||||||
new_item, log_to_delete = check_for_existing(
|
item["isbn_10"], media_type, log
|
||||||
item["isbn_10"], media_type, log
|
)
|
||||||
)
|
|
||||||
|
|
||||||
item = new_item if new_item is not None else item
|
item = new_item if new_item is not None else item
|
||||||
|
|
||||||
if log in ["log", "current"]:
|
if log in ["log", "current"]:
|
||||||
|
|
Loading…
Reference in a new issue