From b91cf28e38ce237aa76446cb149ed01b9dfe7b52 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 11 Mar 2016 11:28:33 -0500 Subject: [PATCH] Blu-ray format support. - Resolves VUFIND-1156. - Thanks to Jay Roos. --- import/index_scripts/format.bsh | 12 +++++++++++- import/translation_maps/format_map.properties | 1 + languages/en.ini | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/import/index_scripts/format.bsh b/import/index_scripts/format.bsh index 72c5b54bf0b..863e167722c 100644 --- a/import/index_scripts/format.bsh +++ b/import/index_scripts/format.bsh @@ -24,6 +24,7 @@ public Set getFormat(Record record){ String formatString; char formatCode = ' '; char formatCode2 = ' '; + char formatCode4 = ' '; // check if there's an h in the 245 if (title != null) { @@ -45,6 +46,7 @@ public Set getFormat(Record record){ formatString = formatField.getData().toUpperCase(); formatCode = formatString.length() > 0 ? formatString.charAt(0) : ' '; formatCode2 = formatString.length() > 1 ? formatString.charAt(1) : ' '; + formatCode4 = formatString.length() > 4 ? formatString.charAt(4) : ' '; switch (formatCode) { case 'A': switch(formatCode2) { @@ -187,7 +189,15 @@ public Set getFormat(Record record){ result.add("VideoCartridge"); break; case 'D': - result.add("VideoDisc"); + switch(formatCode4) { + case 'S': + result.add("BRDisc"); + break; + case 'V': + default: + result.add("VideoDisc"); + break; + } break; case 'F': result.add("VideoCassette"); diff --git a/import/translation_maps/format_map.properties b/import/translation_maps/format_map.properties index 18a0a6cd10a..fcad78c6b24 100644 --- a/import/translation_maps/format_map.properties +++ b/import/translation_maps/format_map.properties @@ -34,6 +34,7 @@ SoundCassette = Cassette SoundRecording = Audio VideoCartridge = Video VideoDisc = DVD +BRDisc = Blu-ray Disc VideoCassette = VHS VideoReel = Video Video = Video diff --git a/languages/en.ini b/languages/en.ini index 4cd8b2ea910..5dade8c31ab 100644 --- a/languages/en.ini +++ b/languages/en.ini @@ -95,6 +95,7 @@ Be the first to leave a comment = "Be the first to leave a comment" Be the first to tag this record = "Be the first to tag this record" Bibliographic Details = "Bibliographic Details" Bibliography = "Bibliography" +Blu-ray Disc = "Blu-ray Disc" Book = "Book" Book Bag = "Book Bag" Book Chapter = "Book Chapter" -- GitLab