From 0278810cb59b984c3a0d0110b602cb6cc6013d2d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 23 Mar 2020 17:18:43 -0400 Subject: [PATCH] Fix radioBroadcast/tvBroadcast CSL-JSON round-trip after 52d5b68564 'podcast' is now the first mapped type for 'broadcast', per https://forums.zotero.org/discussion/comment/351113/#Comment_351113, so we need to check for fields not available in 'podcast'. 'radioBroadcast' will be converted to 'tvBroadcast' on re-import, but that was the case before. --- chrome/content/zotero/xpcom/utilities.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index e21719bb8e..bdd4a09df1 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -1641,6 +1641,16 @@ Zotero.Utilities = { if (cslItem.type == 'bill' && (cslItem.publisher || cslItem['number-of-volumes'])) { zoteroType = 'hearing'; } + else if (cslItem.type == 'broadcast' + && (cslItem['archive'] + || cslItem['archive_location'] + || cslItem['container-title'] + || cslItem['event-place'] + || cslItem['publisher'] + || cslItem['publisher-place'] + || cslItem['source'])) { + zoteroType = 'tvBroadcast'; + } else if (cslItem.type == 'book' && cslItem.version) { zoteroType = 'computerProgram'; }