mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +02:00
Added filename as fallback for audio files while export chat history.
Fixed #28920.
This commit is contained in:
parent
7cf832a2f4
commit
c4b37950a9
1 changed files with 6 additions and 4 deletions
|
@ -2323,10 +2323,12 @@ MediaData HtmlWriter::Wrap::prepareMediaData(
|
|||
} else if (data.isVideoFile) {
|
||||
// At least try to pushVideoFileMedia.
|
||||
} else if (data.isAudioFile) {
|
||||
result.title = (data.songPerformer.isEmpty()
|
||||
|| data.songTitle.isEmpty())
|
||||
? QByteArray("Audio file")
|
||||
: data.songPerformer + " \xe2\x80\x93 " + data.songTitle;
|
||||
result.title = (!data.songPerformer.isEmpty()
|
||||
&& !data.songTitle.isEmpty())
|
||||
? (data.songPerformer + " \xe2\x80\x93 " + data.songTitle)
|
||||
: !data.name.isEmpty()
|
||||
? data.name
|
||||
: QByteArray("Audio file");
|
||||
result.status = FormatDuration(data.duration);
|
||||
if (!hasFile) {
|
||||
result.status += ", " + FormatFileSize(data.file.size);
|
||||
|
|
Loading…
Add table
Reference in a new issue