EditTagDialog: Disable fields for unsupported tags
This commit is contained in:
@@ -351,6 +351,73 @@ void Song::set_embedded_cover() { d->art_automatic_ = QUrl::fromLocalFile(kEmbed
|
||||
void Song::clear_art_automatic() { d->art_automatic_.clear(); }
|
||||
void Song::clear_art_manual() { d->art_manual_.clear(); }
|
||||
|
||||
bool Song::additional_tags_supported() const {
|
||||
return d->filetype_ == FileType_FLAC ||
|
||||
d->filetype_ == FileType_WavPack ||
|
||||
d->filetype_ == FileType_OggFlac ||
|
||||
d->filetype_ == FileType_OggVorbis ||
|
||||
d->filetype_ == FileType_OggOpus ||
|
||||
d->filetype_ == FileType_OggSpeex ||
|
||||
d->filetype_ == FileType_MPEG ||
|
||||
d->filetype_ == FileType_MP4 ||
|
||||
d->filetype_ == FileType_MPC ||
|
||||
d->filetype_ == FileType_APE;
|
||||
}
|
||||
|
||||
bool Song::albumartist_supported() const {
|
||||
return additional_tags_supported();
|
||||
}
|
||||
|
||||
bool Song::composer_supported() const {
|
||||
return additional_tags_supported();
|
||||
}
|
||||
|
||||
bool Song::performer_supported() const {
|
||||
return d->filetype_ == FileType_FLAC ||
|
||||
d->filetype_ == FileType_WavPack ||
|
||||
d->filetype_ == FileType_OggFlac ||
|
||||
d->filetype_ == FileType_OggVorbis ||
|
||||
d->filetype_ == FileType_OggOpus ||
|
||||
d->filetype_ == FileType_OggSpeex ||
|
||||
d->filetype_ == FileType_MPEG ||
|
||||
d->filetype_ == FileType_MPC ||
|
||||
d->filetype_ == FileType_APE;
|
||||
}
|
||||
|
||||
bool Song::grouping_supported() const {
|
||||
return additional_tags_supported();
|
||||
}
|
||||
|
||||
bool Song::genre_supported() const {
|
||||
return additional_tags_supported();
|
||||
}
|
||||
|
||||
bool Song::compilation_supported() const {
|
||||
return additional_tags_supported();
|
||||
}
|
||||
|
||||
bool Song::rating_supported() const {
|
||||
return d->filetype_ == FileType_FLAC ||
|
||||
d->filetype_ == FileType_WavPack ||
|
||||
d->filetype_ == FileType_OggFlac ||
|
||||
d->filetype_ == FileType_OggVorbis ||
|
||||
d->filetype_ == FileType_OggOpus ||
|
||||
d->filetype_ == FileType_OggSpeex ||
|
||||
d->filetype_ == FileType_MPEG ||
|
||||
d->filetype_ == FileType_MP4 ||
|
||||
d->filetype_ == FileType_ASF ||
|
||||
d->filetype_ == FileType_MPC ||
|
||||
d->filetype_ == FileType_APE;
|
||||
}
|
||||
|
||||
bool Song::comment_supported() const {
|
||||
return additional_tags_supported();
|
||||
}
|
||||
|
||||
bool Song::lyrics_supported() const {
|
||||
return additional_tags_supported();
|
||||
}
|
||||
|
||||
bool Song::save_embedded_cover_supported(const FileType filetype) {
|
||||
|
||||
return filetype == FileType_FLAC ||
|
||||
|
||||
@@ -298,6 +298,17 @@ class Song {
|
||||
static bool save_embedded_cover_supported(const FileType filetype);
|
||||
bool save_embedded_cover_supported() const { return url().isLocalFile() && save_embedded_cover_supported(filetype()) && !has_cue(); };
|
||||
|
||||
bool additional_tags_supported() const;
|
||||
bool albumartist_supported() const;
|
||||
bool composer_supported() const;
|
||||
bool performer_supported() const;
|
||||
bool grouping_supported() const;
|
||||
bool genre_supported() const;
|
||||
bool compilation_supported() const;
|
||||
bool rating_supported() const;
|
||||
bool comment_supported() const;
|
||||
bool lyrics_supported() const;
|
||||
|
||||
const QUrl &stream_url() const;
|
||||
const QUrl &effective_stream_url() const;
|
||||
bool init_from_file() const;
|
||||
|
||||
Reference in New Issue
Block a user