Added <dc:issued> field to OPDS entries

This commit is contained in:
Veloman Yunkan
2022-02-19 11:34:24 +04:00
parent 5c38300504
commit afb556bf64
5 changed files with 15 additions and 4 deletions

View File

@ -1081,8 +1081,9 @@ std::string maskVariableOPDSFeedData(std::string s)
}
#define OPDS_FEED_TAG \
"<feed xmlns=\"http://www.w3.org/2005/Atom\"" \
" xmlns:opds=\"http://opds-spec.org/2010/catalog\">\n"
"<feed xmlns=\"http://www.w3.org/2005/Atom\"\n" \
" xmlns:dc=\"http://purl.org/dc/terms/\"\n" \
" xmlns:opds=\"http://opds-spec.org/2010/catalog\">\n"
#define CATALOG_LINK_TAGS \
" <link rel=\"self\" href=\"\" type=\"application/atom+xml\" />\n" \
@ -1110,6 +1111,7 @@ std::string maskVariableOPDSFeedData(std::string s)
" <publisher>\n" \
" <name>Kiwix</name>\n" \
" </publisher>\n" \
" <dc:issued>2020-03-31T00:00:00Z</dc:issued>\n" \
" <link rel=\"http://opds-spec.org/acquisition/open-access\" type=\"application/x-zim\" href=\"https://github.com/kiwix/libkiwix/raw/master/test/data/zimfile%26other.zim\" length=\"569344\" />\n" \
" </entry>\n"
@ -1136,6 +1138,7 @@ std::string maskVariableOPDSFeedData(std::string s)
" <publisher>\n" \
" <name>Kiwix</name>\n" \
" </publisher>\n" \
" <dc:issued>2020-03-31T00:00:00Z</dc:issued>\n" \
" <link rel=\"http://opds-spec.org/acquisition/open-access\" type=\"application/x-zim\" href=\"https://github.com/kiwix/libkiwix/raw/master/test/data/zimfile.zim\" length=\"569344\" />\n" \
" </entry>\n"
@ -1159,6 +1162,7 @@ std::string maskVariableOPDSFeedData(std::string s)
" <publisher>\n" \
" <name>Kiwix</name>\n" \
" </publisher>\n" \
" <dc:issued>2020-03-31T00:00:00Z</dc:issued>\n" \
" <link rel=\"http://opds-spec.org/acquisition/open-access\" type=\"application/x-zim\" href=\"https://github.com/kiwix/libkiwix/raw/master/test/data/zimfile.zim\" length=\"125952\" />\n" \
" </entry>\n"
@ -1574,6 +1578,7 @@ TEST_F(LibraryServerTest, catalog_v2_languages)
#define CATALOG_V2_ENTRIES_PREAMBLE0(x) \
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
"<feed xmlns=\"http://www.w3.org/2005/Atom\"\n" \
" xmlns:dc=\"http://purl.org/dc/terms/\"\n" \
" xmlns:opds=\"https://specs.opds.io/opds-1.2\"\n" \
" xmlns:opensearch=\"http://a9.com/-/spec/opensearch/1.1/\">\n" \
" <id>12345678-90ab-cdef-1234-567890abcdef</id>\n" \