mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-30 01:38:59 +01:00
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:
parent
a97c102369
commit
fc614b9833
@ -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
|
||||
|
@ -262,6 +262,10 @@ class BookMetadata {
|
||||
{
|
||||
tag: 'tagASIN',
|
||||
key: 'asin'
|
||||
},
|
||||
{
|
||||
tag: 'tagOverdriveMediaMarker',
|
||||
key: 'overdriveMediaMarker'
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -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]) {
|
||||
|
Loading…
Reference in New Issue
Block a user