Commit 1eeca0bc authored by Sam Thursfield's avatar Sam Thursfield

Merge branch 'wip/carlosg/fix-gstreamer-toc' into 'master'

tracker-extract: Relate contained audio tracks and container file both ways

Closes #60

See merge request !57
parents ccd4c046 fb87cd28
Pipeline #72193 passed with stage
in 1 minute and 25 seconds
[ExtractorRule]
ModulePath=libextract-flac.so
MimeTypes=audio/x-flac
FallbackRdfTypes=nmm:MusicPiece;nfo:Audio;
FallbackRdfTypes=nfo:Audio;
[ExtractorRule]
ModulePath=libextract-gstreamer.so
MimeTypes=audio/*;
FallbackRdfTypes=nmm:MusicPiece;nfo:Audio;
FallbackRdfTypes=nfo:Audio;
......@@ -875,13 +875,6 @@ extract_metadata (MetadataExtractor *extractor,
if (extractor->mime == EXTRACT_MIME_AUDIO) {
album_disc = extractor_maybe_get_album_disc (extractor, extractor->tagcache);
extractor_apply_audio_metadata (extractor,
extractor->tagcache,
resource,
performer,
composer,
album_disc);
/* If the audio file contains multiple tracks, we create the tracks
* as abstract information element types and relate them to the
* concrete nfo:FileDataObject using nie:isStoredAs.
......@@ -892,10 +885,18 @@ extract_metadata (MetadataExtractor *extractor,
track = extract_track (extractor, node->data, file_url, album_disc);
tracker_resource_set_relation (track, "nie:isStoredAs", resource);
g_object_unref (track);
tracker_resource_set_relation (track, "nie:isLogicalPartOf", resource);
tracker_resource_add_take_relation (resource, "nie:hasLogicalPart", track);
}
tracker_resource_set_string (resource, "nie:url", file_url);
} else {
extractor_apply_audio_metadata (extractor,
extractor->tagcache,
resource,
performer,
composer,
album_disc);
}
if (album_disc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment