fix up album art if it's in the music file itself and not fetched
This commit is contained in:
parent
ca538f6f8c
commit
cf2b383f0c
|
@ -666,7 +666,6 @@ video_file_set(Evas_Object *obj, const char *file)
|
|||
eina_stringshare_replace(&(sd->artfile), NULL);
|
||||
emotion_object_file_set(sd->o_vid, sd->file);
|
||||
video_position_set(obj, 0.0);
|
||||
printf("set %p %s %i\n", obj, file, sd->doart);
|
||||
if (sd->doart)
|
||||
{
|
||||
const char *extn = strchr(sd->file, '.');
|
||||
|
|
|
@ -282,7 +282,6 @@ _local_artwork_get(void *data)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -420,6 +419,7 @@ static void
|
|||
_restart_vid(Evas_Object *win, Evas_Object *lay, Evas_Object *vid, const char *file, const char *sub)
|
||||
{
|
||||
const char *extn = strchr(file, '.');
|
||||
win_newfile(win);
|
||||
if ((extn) &&
|
||||
((!strcasecmp(extn, ".mp3")) ||
|
||||
(!strcasecmp(extn, ".m4a")) ||
|
||||
|
@ -766,6 +766,13 @@ win_art(Evas_Object *win, const char *path)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
win_newfile(Evas_Object *win)
|
||||
{
|
||||
Inf *inf = evas_object_data_get(win, "inf");
|
||||
inf->newfile = EINA_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
win_show(Evas_Object *win, int w, int h)
|
||||
{
|
||||
|
@ -789,14 +796,25 @@ win_show(Evas_Object *win, int w, int h)
|
|||
}
|
||||
|
||||
if (!video_has_video_get(inf->vid))
|
||||
{
|
||||
if (inf->newfile)
|
||||
elm_layout_signal_emit(inf->lay, "state,novideo", "rage");
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_layout_signal_emit(inf->lay, "state,video", "rage");
|
||||
}
|
||||
if (!video_has_audio_get(inf->vid))
|
||||
{
|
||||
if (inf->newfile)
|
||||
elm_layout_signal_emit(inf->lay, "state,noaudio", "rage");
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_layout_signal_emit(inf->lay, "state,audio", "rage");
|
||||
}
|
||||
inf->newfile = EINA_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
win_aspect_adjust(Evas_Object *win)
|
||||
|
|
|
@ -27,6 +27,7 @@ struct _Inf
|
|||
Eina_Bool dragging : 1;
|
||||
Eina_Bool browse_mode : 1;
|
||||
Eina_Bool down : 1;
|
||||
Eina_Bool newfile : 1;
|
||||
};
|
||||
|
||||
// ui high level controls
|
||||
|
@ -49,6 +50,7 @@ Eina_Bool win_video_have_prev(Evas_Object *win);
|
|||
Evas_Object *win_add(void);
|
||||
void win_focus(Evas_Object *win);
|
||||
void win_title_update(Evas_Object *win);
|
||||
void win_newfile(Evas_Object *win);
|
||||
void win_show(Evas_Object *win, int w, int h);
|
||||
void win_art(Evas_Object *win, const char *path);
|
||||
void win_aspect_adjust(Evas_Object *win);
|
||||
|
|
Loading…
Reference in New Issue