Added fixes for audio and video path. On sankore 3.1 version 1.0.0 the absolute path has been introduced. Big mistake

preferencesAboutTextFull
Claudio Valerio 14 years ago
parent ff54dfa57b
commit 8635c7724a
  1. 14
      src/adaptors/UBSvgSubsetAdaptor.cpp

@ -1801,6 +1801,13 @@ UBGraphicsAudioItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::audioItemFromSvg()
QString href = audioHref.toString();
//Claudio this is necessary to fix the absolute path added on Sankore 3.1 1.00.00
//The absoult path doesn't work when you want to share Sankore documents.
if(!href.startsWith("audios/")){
int indexOfAudioDirectory = href.lastIndexOf("audios");
href = href.right(href.length() - indexOfAudioDirectory);
}
UBGraphicsAudioItem* audioItem = new UBGraphicsAudioItem(href);
graphicsItemFromSvg(audioItem);
QStringRef ubPos = mXmlReader.attributes().value(mNamespaceUri, "position");
@ -1828,6 +1835,13 @@ UBGraphicsVideoItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::videoItemFromSvg()
QString href = videoHref.toString();
//Claudio this is necessary to fix the absolute path added on Sankore 3.1 1.00.00
//The absoult path doesn't work when you want to share Sankore documents.
if(!href.startsWith("videos/")){
int indexOfAudioDirectory = href.lastIndexOf("videos");
href = href.right(href.length() - indexOfAudioDirectory);
}
UBGraphicsVideoItem* videoItem = new UBGraphicsVideoItem(href);
graphicsItemFromSvg(videoItem);
QStringRef ubPos = mXmlReader.attributes().value(mNamespaceUri, "position");

Loading…
Cancel
Save