Closed ccolonna closed 2 years ago
Changing in song.service.ts
:
// import ApplicationData from '../assets/data/data_v1.json';
import ApplicationData from '../assets/data/data_v3.json';
Changing in video.component.ts
:
this.queueService.addToQueueByID('https://w3id.org/polifonia/resource/Recording/00001');
this.queueService.addToQueueByID('https://w3id.org/polifonia/resource/Recording/00002');
this.queueService.addToQueueByID('https://w3id.org/polifonia/resource/Recording/00003');
this.queueService.addToQueueByID('https://w3id.org/polifonia/resource/Recording/00004');
// this.queueService.addToQueueByID('1001');
// this.queueService.addToQueueByID('1002');
// this.queueService.addToQueueByID('1003');
// this.queueService.addToQueueByID('1004');
The video player correctly show new songs. In data_v3 all items have the same youtubeID. So it resolve always playing penny lane.
There is a problem yet, annotations are not shown.
This is an example annotation in the file data_v3
:
{
"id": "https://w3id.org/polifonia/resource/SpatialAnnotation/00001_edited_at",
"type": "spatial",
"description": "This track was edited at Abbey Road Studios: Studio 1",
"songID": "https://w3id.org/polifonia/resource/Recording/00001",
"timestamp": 15,
"metadata": {
"long": "-0.17835",
"lat": "51.53192",
"placeName": "Abbey Road Studios: Studio 1"
},
"relationships": [
{
"songID": "https://w3id.org/polifonia/resource/Recording/1002",
"type": "spatial",
"score": 0.910762874582187
}
]
}
An example in data_v1
:
{
"id": "2001",
"songID": "1001",
"timestamp": 5,
"type": "lyrics",
"relationships": [
{
"songID": "1002",
"type": "lyrics",
"score": 45
}
],
"description": "These lyrics refer to a barbershop in Liverpool"
},
Maybe @JaseMK do you have an idea of what happens? Just switching to this branch it's possible to reproduce the example.
The annotation service was still importing its application data from the v1 file. I have just pushed an update to this branch to fix that. Some annotations appear now, although there are some other bugs related to how and when they appear. I'm happy to investigate these issues this afternoon.
We should probably have a single config file that references the application data location and all other services and modules simply reference the config file.
Thanks! I saw the update.
I saw there are problems with the annotation id and the click to open the annotation. This is mainly due by the id being used as a selector in the html element. In the procedure to extract data we are mapping the resource URI to an application id. We can change this when we have new data, maybe assigning as id a unique random one. And keeping URI as annotationURI or removing it at all.
Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#flush-collapse-https://w3id.org/polifonia/resource/SpatialAnnotation/00001_recorded_at' is not a valid selector.
at n (https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js:6:1222)
at HTMLButtonElement.<anonymous> (https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js:6:20706)
at HTMLDocument.n (https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js:6:5308)
Another problem:
The song IDs in the related songs (in annotations) don’t exist in the songs DB. Songs are ‘00001’, ‘00002’ etc and related songs are ‘10001’, ‘10002’ etc.
We will take care of this when working on
Waiting for https://github.com/polifonia-project/sonar2021_demo/issues/27 to be completed. Temporary fastest solution.