[tasks] Fix when note is a string
This commit is contained in:
@ -721,9 +721,12 @@ def emacs_scrobble_update_task(
|
|||||||
|
|
||||||
notes_updated = False
|
notes_updated = False
|
||||||
for note in emacs_notes:
|
for note in emacs_notes:
|
||||||
|
try:
|
||||||
existing_note_ts = [
|
existing_note_ts = [
|
||||||
n.get("timestamp") for n in scrobble.log.get("notes", [])
|
n.get("timestamp") for n in scrobble.log.get("notes", [])
|
||||||
]
|
]
|
||||||
|
except AttributeError:
|
||||||
|
existing_note_ts = []
|
||||||
if not scrobble.log.get('notes"'):
|
if not scrobble.log.get('notes"'):
|
||||||
scrobble.log["notes"] = []
|
scrobble.log["notes"] = []
|
||||||
if note.get("timestamp") not in existing_note_ts:
|
if note.get("timestamp") not in existing_note_ts:
|
||||||
|
|||||||
Reference in New Issue
Block a user