replaced mediathrobber with mediaiconservice
This commit is contained in:
+2
-2
@@ -288,7 +288,7 @@ bool LoadThread::load_worker(QFile& f, QXmlStreamReader& stream, int type) {
|
||||
item->set_footage(f);
|
||||
|
||||
if (folder == 0) {
|
||||
project_model.appendChild(nullptr, item);
|
||||
olive::project_model.appendChild(nullptr, item);
|
||||
} else {
|
||||
find_loaded_folder_by_id(folder)->appendChild(item);
|
||||
}
|
||||
@@ -645,7 +645,7 @@ void LoadThread::run() {
|
||||
Media* folder = loaded_folders.at(i);
|
||||
int parent = folder->temp_id2;
|
||||
if (folder->temp_id2 == 0) {
|
||||
project_model.appendChild(nullptr, folder);
|
||||
olive::project_model.appendChild(nullptr, folder);
|
||||
} else {
|
||||
find_loaded_folder_by_id(parent)->appendChild(folder);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "previewgenerator.h"
|
||||
|
||||
#include "ui/mediaiconservice.h"
|
||||
#include "project/media.h"
|
||||
#include "project/footage.h"
|
||||
#include "panels/viewer.h"
|
||||
@@ -189,12 +190,12 @@ void PreviewGenerator::finalize_media() {
|
||||
footage->ready = true;
|
||||
|
||||
if (!cancelled) {
|
||||
if (footage->video_tracks.size() == 0) {
|
||||
emit set_icon(ICON_TYPE_AUDIO, replace);
|
||||
if (footage->video_tracks.size() == 0) {
|
||||
olive::media_icon_service->SetMediaIcon(media, ICON_TYPE_AUDIO);
|
||||
} else if (contains_still_image) {
|
||||
emit set_icon(ICON_TYPE_IMAGE, replace);
|
||||
olive::media_icon_service->SetMediaIcon(media, ICON_TYPE_IMAGE);
|
||||
} else {
|
||||
emit set_icon(ICON_TYPE_VIDEO, replace);
|
||||
olive::media_icon_service->SetMediaIcon(media, ICON_TYPE_VIDEO);
|
||||
}
|
||||
|
||||
/*if (!contains_still_image || media->audio_tracks.size() > 0) {
|
||||
@@ -575,7 +576,7 @@ void PreviewGenerator::run() {
|
||||
if (!cancelled) {
|
||||
if (error) {
|
||||
media->update_tooltip(errorStr);
|
||||
emit set_icon(ICON_TYPE_ERROR, replace);
|
||||
olive::media_icon_service->SetMediaIcon(media, ICON_TYPE_ERROR);
|
||||
footage->invalid = true;
|
||||
footage->ready_lock.unlock();
|
||||
} else {
|
||||
|
||||
+1
-10
@@ -25,13 +25,6 @@
|
||||
#include <QSemaphore>
|
||||
#include <QDir>
|
||||
|
||||
enum IconType {
|
||||
ICON_TYPE_VIDEO,
|
||||
ICON_TYPE_AUDIO,
|
||||
ICON_TYPE_IMAGE,
|
||||
ICON_TYPE_ERROR
|
||||
};
|
||||
|
||||
#include "project/footage.h"
|
||||
#include "project/media.h"
|
||||
|
||||
@@ -48,9 +41,7 @@ class PreviewGenerator : public QThread
|
||||
public:
|
||||
PreviewGenerator(Media*, FootagePtr, bool);
|
||||
void run();
|
||||
void cancel();
|
||||
signals:
|
||||
void set_icon(int, bool);
|
||||
void cancel();
|
||||
private:
|
||||
void parse_media();
|
||||
bool retrieve_preview(const QString &hash);
|
||||
|
||||
Reference in New Issue
Block a user