Changeset View
Changeset View
Standalone View
Standalone View
src/extractors/taglibextractor.cpp
Show First 20 Lines • Show All 858 Lines • ▼ Show 20 Line(s) | 712 | if (!tags->isEmpty()) { | |||
---|---|---|---|---|---|
859 | 859 | | |||
860 | if (data.discNumber.isValid()) { | 860 | if (data.discNumber.isValid()) { | ||
861 | result->add(Property::DiscNumber, data.discNumber); | 861 | result->add(Property::DiscNumber, data.discNumber); | ||
862 | } | 862 | } | ||
863 | 863 | | |||
864 | if (data.rating.isValid()) { | 864 | if (data.rating.isValid()) { | ||
865 | result->add(Property::Rating, data.rating); | 865 | result->add(Property::Rating, data.rating); | ||
866 | } | 866 | } | ||
867 | } | ||||
867 | 868 | | |||
868 | TagLib::AudioProperties* audioProp = file.audioProperties(); | 869 | TagLib::AudioProperties* audioProp = file.audioProperties(); | ||
869 | if (audioProp) { | 870 | if (audioProp) { | ||
870 | if (audioProp->length()) { | 871 | if (audioProp->length()) { | ||
871 | // What about the xml duration? | 872 | // What about the xml duration? | ||
872 | result->add(Property::Duration, audioProp->length()); | 873 | result->add(Property::Duration, audioProp->length()); | ||
873 | } | 874 | } | ||
874 | 875 | | |||
875 | if (audioProp->bitrate()) { | 876 | if (audioProp->bitrate()) { | ||
876 | result->add(Property::BitRate, audioProp->bitrate() * 1000); | 877 | result->add(Property::BitRate, audioProp->bitrate() * 1000); | ||
877 | } | 878 | } | ||
878 | 879 | | |||
879 | if (audioProp->channels()) { | 880 | if (audioProp->channels()) { | ||
880 | result->add(Property::Channels, audioProp->channels()); | 881 | result->add(Property::Channels, audioProp->channels()); | ||
881 | } | 882 | } | ||
882 | 883 | | |||
883 | if (audioProp->sampleRate()) { | 884 | if (audioProp->sampleRate()) { | ||
884 | result->add(Property::SampleRate, audioProp->sampleRate()); | 885 | result->add(Property::SampleRate, audioProp->sampleRate()); | ||
885 | } | 886 | } | ||
886 | } | 887 | } | ||
887 | } | 888 | } | ||
888 | } | | |||
889 | 889 | | |||
890 | // TAG information (incomplete). | 890 | // TAG information (incomplete). | ||
891 | // https://xiph.org/vorbis/doc/v-comment.html | 891 | // https://xiph.org/vorbis/doc/v-comment.html | ||
892 | // http://help.mp3tag.de/main_tags.html | 892 | // http://help.mp3tag.de/main_tags.html | ||
893 | // http://id3.org/ | 893 | // http://id3.org/ | ||
894 | // https://www.legroom.net/2009/05/09/ogg-vorbis-and-flac-comment-field-recommendations | 894 | // https://www.legroom.net/2009/05/09/ogg-vorbis-and-flac-comment-field-recommendations | ||
895 | // https://kodi.wiki/view/Music_tagging#Tags_Kodi_reads | 895 | // https://kodi.wiki/view/Music_tagging#Tags_Kodi_reads | ||
896 | // -- FLAC/OGG -- | 896 | // -- FLAC/OGG -- | ||
Show All 19 Lines |