File tree Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ public class OPDS1Parser: Loggable {
9393 }
9494 let feed = Feed ( title: title)
9595
96+ feed. metadata. identifier = root. firstChild ( tag: " id " ) ? . stringValue
97+
9698 if let tmpDate = root. firstChild ( tag: " updated " ) ? . stringValue,
9799 let date = tmpDate. dateFromISO8601
98100 {
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Foundation
99/// OPDS metadata properties.
1010public class OpdsMetadata {
1111 public var title : String
12+ public var identifier : String ?
1213 public var numberOfItem : Int ?
1314 public var itemsPerPage : Int ?
1415 public var currentPage : Int ?
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ class readium_opds1_1_test: XCTestCase {
4646 }
4747
4848 func testMetadata( ) {
49+ XCTAssert ( feed!. metadata. identifier == " urn:uuid:433a5d6a-0b8c-4933-af65-4ca4f02763eb " )
4950 XCTAssert ( feed!. metadata. title == " Unpopular Publications " )
5051 // TODO: add more tests...
5152 }
You can’t perform that action at this time.
0 commit comments