Add support for overdrive media marker file tag

This commit adds serverside support for grabbing the
overdrive_media_marker file tag that exists on mp3 files from overdrive
This commit is contained in:
jmt-gh 2022-06-11 02:00:07 -07:00
parent a97c102369
commit fc614b9833
3 changed files with 10 additions and 1 deletions

View File

@ -20,6 +20,7 @@ class AudioMetaTags {
this.tagIsbn = null
this.tagLanguage = null
this.tagASIN = null
this.tagOverdriveMediaMarker = null
if (metadata) {
this.construct(metadata)
@ -58,6 +59,7 @@ class AudioMetaTags {
this.tagIsbn = metadata.tagIsbn || null
this.tagLanguage = metadata.tagLanguage || null
this.tagASIN = metadata.tagASIN || null
this.tagOverdriveMediaMarker = metadata.tagOverdriveMediaMarker || null
}
// Data parsed in prober.js
@ -82,6 +84,7 @@ class AudioMetaTags {
this.tagIsbn = payload.file_tag_isbn || null
this.tagLanguage = payload.file_tag_language || null
this.tagASIN = payload.file_tag_asin || null
this.tagOverdriveMediaMarker = payload.file_tag_overdrive_media_marker || null
}
updateData(payload) {
@ -105,7 +108,8 @@ class AudioMetaTags {
tagEncodedBy: payload.file_tag_encodedby || null,
tagIsbn: payload.file_tag_isbn || null,
tagLanguage: payload.file_tag_language || null,
tagASIN: payload.file_tag_asin || null
tagASIN: payload.file_tag_asin || null,
tagOverdriveMediaMarker: payload.file_tag_overdrive_media_marker || null,
}
var hasUpdates = false

View File

@ -262,6 +262,10 @@ class BookMetadata {
{
tag: 'tagASIN',
key: 'asin'
},
{
tag: 'tagOverdriveMediaMarker',
key: 'overdriveMediaMarker'
}
]

View File

@ -192,6 +192,7 @@ function parseTags(format, verbose) {
file_tag_movement: tryGrabTags(format, 'movement', 'mvin'),
file_tag_genre1: tryGrabTags(format, 'tmp_genre1', 'genre1'),
file_tag_genre2: tryGrabTags(format, 'tmp_genre2', 'genre2'),
file_tag_overdrive_media_marker: tryGrabTags(format, 'OverDrive MediaMarkers'),
}
for (const key in tags) {
if (!tags[key]) {