1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 Jerome Kuptz
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
30 #include "backlight.h"
33 #include "filetypes.h"
38 #include "gwps-common.h"
45 #ifdef HAVE_LCD_BITMAP
47 #include "peakmeter.h"
58 #include "ata_idle_notify.h"
59 #include "root_menu.h"
61 #include "quickscreen.h"
62 #include "pitchscreen.h"
63 #include "appevents.h"
66 #include "option_select.h"
69 #define RESTORE_WPS_INSTANTLY 0l
70 #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick))
72 #define DEFAULT_SKIP_TRESH 3000ul
75 /* currently only one wps_state is needed */
76 struct wps_state wps_state
;
77 struct gui_wps gui_wps
[NB_SCREENS
];
78 static struct wps_data wps_datas
[NB_SCREENS
];
80 /* initial setup of wps_data */
81 static void wps_state_init(void);
82 static void track_changed_callback(void *param
);
83 static void nextid3available_callback(void* param
);
86 #if defined(HAVE_BACKLIGHT) || defined(HAVE_REMOTE_LCD)
87 static void gwps_caption_backlight(struct wps_state
*state
)
89 if (state
&& state
->id3
)
92 if (global_settings
.caption_backlight
)
94 /* turn on backlight n seconds before track ends, and turn it off n
95 seconds into the new track. n == backlight_timeout, or 5s */
96 int n
= global_settings
.backlight_timeout
* 1000;
99 n
= 5000; /* use 5s if backlight is always on or off */
101 if (((state
->id3
->elapsed
< 1000) ||
102 ((state
->id3
->length
- state
->id3
->elapsed
) < (unsigned)n
)) &&
103 (state
->paused
== false))
107 #ifdef HAVE_REMOTE_LCD
108 if (global_settings
.remote_caption_backlight
)
110 /* turn on remote backlight n seconds before track ends, and turn it
111 off n seconds into the new track. n == remote_backlight_timeout,
113 int n
= global_settings
.remote_backlight_timeout
* 1000;
116 n
= 5000; /* use 5s if backlight is always on or off */
118 if (((state
->id3
->elapsed
< 1000) ||
119 ((state
->id3
->length
- state
->id3
->elapsed
) < (unsigned)n
)) &&
120 (state
->paused
== false))
121 remote_backlight_on();
129 static void change_dir(int direction
)
131 if (global_settings
.prevent_skip
)
136 else if (direction
> 0)
140 static void prev_track(unsigned long skip_thresh
)
142 if (wps_state
.id3
->elapsed
< skip_thresh
)
149 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
)
151 curr_cuesheet_skip(-1, wps_state
.id3
->elapsed
);
155 if (!wps_state
.paused
)
156 #if (CONFIG_CODEC == SWCODEC)
157 audio_pre_ff_rewind();
164 #if (CONFIG_CODEC != SWCODEC)
165 if (!wps_state
.paused
)
171 static void next_track(void)
173 /* take care of if we're playing a cuesheet */
174 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
)
176 if (curr_cuesheet_skip(1, wps_state
.id3
->elapsed
))
178 /* if the result was false, then we really want
179 to skip to the next track */
187 static void play_hop(int direction
)
189 unsigned long step
= ((unsigned long)global_settings
.skip_length
)*1000;
190 unsigned long elapsed
= wps_state
.id3
->elapsed
;
191 unsigned long remaining
= wps_state
.id3
->length
- elapsed
;
193 if (!global_settings
.prevent_skip
&&
195 (direction
> 0 && step
>= remaining
) ||
196 (direction
< 0 && elapsed
< DEFAULT_SKIP_TRESH
)))
197 { /* Do normal track skipping */
200 else if (direction
< 0)
201 prev_track(DEFAULT_SKIP_TRESH
);
205 if (direction
== 1 && step
>= remaining
)
207 #if CONFIG_CODEC == SWCODEC
208 if(global_settings
.beep
)
209 pcmbuf_beep(1000, 150, 1500*global_settings
.beep
);
213 else if ((direction
== -1 && elapsed
< step
))
219 elapsed
+= step
* direction
;
221 if((audio_status() & AUDIO_STATUS_PLAY
) && !wps_state
.paused
)
223 #if (CONFIG_CODEC == SWCODEC)
224 audio_pre_ff_rewind();
229 audio_ff_rewind(wps_state
.id3
->elapsed
= elapsed
);
230 #if (CONFIG_CODEC != SWCODEC)
231 if (!wps_state
.paused
)
236 static void gwps_fix_statusbars(void)
238 #ifdef HAVE_LCD_BITMAP
240 wpsbars
= VP_SB_HIDE_ALL
;
244 if (gui_wps
[i
].data
->wps_sb_tag
)
245 draw
= gui_wps
[i
].data
->show_sb_on_wps
;
246 else if (global_settings
.statusbar
)
247 wpsbars
|= VP_SB_ONSCREEN(i
);
249 wpsbars
|= (VP_SB_ONSCREEN(i
) | VP_SB_IGNORE_SETTING(i
));
252 wpsbars
= VP_SB_ALLSCREENS
;
256 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
258 * If the user is unable to see the wps, because the display is deactivated,
259 * we surpress updates until the wps gets actived again (the lcd driver will
260 * call this hook to issue an instant update)
262 static void wps_lcd_activation_hook(void)
264 wps_state
.do_full_update
= true;
265 /* force timeout in wps main loop, so that the update is instantly */
266 queue_post(&button_queue
, BUTTON_NONE
, 0);
270 static void gwps_leave_wps(void)
272 int i
, oldbars
= VP_SB_HIDE_ALL
;
275 gui_wps
[i
].display
->stop_scroll();
276 if (global_settings
.statusbar
)
277 oldbars
= VP_SB_ALLSCREENS
;
280 show_main_backdrop();
282 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
283 show_remote_main_backdrop();
285 viewportmanager_set_statusbar(oldbars
);
286 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
287 /* Play safe and unregister the hook */
288 lcd_activation_set_hook(NULL
);
292 void gwps_draw_statusbars(void)
294 viewportmanager_set_statusbar(wpsbars
);
296 #ifdef HAVE_TOUCHSCREEN
297 int wps_get_touchaction(struct wps_data
*data
)
301 int type
= action_get_touchscreen_press(&x
, &y
);
303 static int last_action
= ACTION_NONE
;
304 struct touchregion
*r
;
305 bool repeated
= (type
== BUTTON_REPEAT
);
306 bool released
= (type
== BUTTON_REL
);
307 for (i
=0; i
<data
->touchregion_count
; i
++)
309 r
= &data
->touchregion
[i
];
310 /* make sure this region's viewport is visible */
311 if (r
->wvp
->hidden_flags
&VP_DRAW_HIDDEN
)
313 /* reposition the touch inside the viewport */
314 vx
= x
- r
->wvp
->vp
.x
;
315 vy
= y
- r
->wvp
->vp
.y
;
316 /* check if its inside this viewport */
317 if (vx
>= 0 && vx
< r
->wvp
->vp
.x
+ r
->wvp
->vp
.width
&&
318 vy
>= 0 && vy
< r
->wvp
->vp
.y
+ r
->wvp
->vp
.height
)
320 /* now see if the point is inside this region */
321 if (vx
>= r
->x
&& vx
< r
->x
+r
->width
&&
322 vy
>= r
->y
&& vy
< r
->y
+r
->height
)
324 if ((repeated
&& r
->repeat
) ||
325 (released
&& !r
->repeat
))
327 last_action
= r
->action
;
333 if ((last_action
== ACTION_WPS_SEEKBACK
|| last_action
== ACTION_WPS_SEEKFWD
))
334 return ACTION_WPS_STOPSEEK
;
335 last_action
= ACTION_TOUCHSCREEN
;
336 return ACTION_TOUCHSCREEN
;
339 /* The WPS can be left in two ways:
340 * a) call a function, which draws over the wps. In this case, the wps
341 * will be still active (i.e. the below function didn't return)
342 * b) return with a value evaluated by root_menu.c, in this case the wps
343 * is really left, and root_menu will handle the next screen
345 * In either way, call gwps_leave_wps(), in order to restore the correct
346 * "main screen" backdrops and statusbars
348 long gui_wps_show(void)
352 long restoretimer
= RESTORE_WPS_INSTANTLY
; /* timer to delay screen redraw temporarily */
354 bool bookmark
= false;
357 long last_left
= 0, last_right
= 0;
359 #ifdef HAVE_LCD_CHARCELLS
360 status_set_audio(true);
361 status_set_param(false);
364 #ifdef AB_REPEAT_ENABLE
372 bool audio_paused
= (audio_status() & AUDIO_STATUS_PAUSE
)?true:false;
374 /* did someone else (i.e power thread) change audio pause mode? */
375 if (wps_state
.paused
!= audio_paused
) {
376 wps_state
.paused
= audio_paused
;
378 /* if another thread paused audio, we are probably in car mode,
379 about to shut down. lets save the settings. */
380 if (wps_state
.paused
) {
382 #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
383 call_storage_idle_notifys(true);
388 #ifdef HAVE_LCD_BITMAP
389 /* when the peak meter is enabled we want to have a
390 few extra updates to make it look smooth. On the
391 other hand we don't want to waste energy if it
396 if(gui_wps
[i
].data
->peak_meter_enabled
)
401 long next_refresh
= current_tick
;
402 long next_big_refresh
= current_tick
+ HZ
/ 5;
403 button
= BUTTON_NONE
;
404 while (TIME_BEFORE(current_tick
, next_big_refresh
)) {
405 button
= get_action(CONTEXT_WPS
|ALLOW_SOFTLOCK
,TIMEOUT_NOBLOCK
);
406 if (button
!= ACTION_NONE
) {
410 sleep(0); /* Sleep until end of current tick. */
412 if (TIME_AFTER(current_tick
, next_refresh
)) {
415 if(gui_wps
[i
].data
->peak_meter_enabled
)
416 gui_wps_redraw(&gui_wps
[i
], 0,
417 WPS_REFRESH_PEAK_METER
);
418 next_refresh
+= HZ
/ PEAK_METER_FPS
;
425 /* The peak meter is disabled
426 -> no additional screen updates needed */
430 button
= get_action(CONTEXT_WPS
|ALLOW_SOFTLOCK
,
431 restore
? HZ
/100 : HZ
/5);
434 /* Exit if audio has stopped playing. This happens e.g. at end of
435 playlist or if using the sleep timer. */
436 if (!(audio_status() & AUDIO_STATUS_PLAY
))
438 #ifdef HAVE_TOUCHSCREEN
439 if (button
== ACTION_TOUCHSCREEN
)
440 button
= wps_get_touchaction(gui_wps
[SCREEN_MAIN
].data
);
442 /* The iPods/X5/M5 use a single button for the A-B mode markers,
443 defined as ACTION_WPSAB_SINGLE in their config files. */
444 #ifdef ACTION_WPSAB_SINGLE
445 if (!global_settings
.party_mode
&& ab_repeat_mode_enabled())
447 static int wps_ab_state
= 0;
448 if (button
== ACTION_WPSAB_SINGLE
)
450 switch (wps_ab_state
)
452 case 0: /* set the A spot */
453 button
= ACTION_WPS_ABSETA_PREVDIR
;
455 case 1: /* set the B spot */
456 button
= ACTION_WPS_ABSETB_NEXTDIR
;
459 button
= ACTION_WPS_ABRESET
;
462 wps_ab_state
= (wps_ab_state
+1) % 3;
468 case ACTION_WPS_CONTEXT
:
471 /* if music is stopped in the context menu we want to exit the wps */
472 if (onplay(wps_state
.id3
->path
,
473 FILE_ATTR_AUDIO
, CONTEXT_WPS
) == ONPLAY_MAINMENU
480 case ACTION_WPS_BROWSE
:
481 #ifdef HAVE_LCD_CHARCELLS
482 status_set_record(false);
483 status_set_audio(false);
486 return GO_TO_PREVIOUS_BROWSER
;
490 case ACTION_WPS_PLAY
:
491 if (global_settings
.party_mode
)
493 if ( wps_state
.paused
)
495 wps_state
.paused
= false;
496 if ( global_settings
.fade_on_stop
)
503 wps_state
.paused
= true;
504 if ( global_settings
.fade_on_stop
)
509 #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
510 call_storage_idle_notifys(true); /* make sure resume info is saved */
515 case ACTION_WPS_VOLUP
:
518 gui_wps
[i
].data
->button_time_volume
= current_tick
;
519 global_settings
.volume
++;
524 if(update_onvol_change(&gui_wps
[i
]))
529 restoretimer
= RESTORE_WPS_NEXT_SECOND
;
533 case ACTION_WPS_VOLDOWN
:
536 gui_wps
[i
].data
->button_time_volume
= current_tick
;
537 global_settings
.volume
--;
542 if(update_onvol_change(&gui_wps
[i
]))
547 restoretimer
= RESTORE_WPS_NEXT_SECOND
;
552 OR next dir if this is straight after ACTION_WPS_SKIPNEXT */
553 case ACTION_WPS_SEEKFWD
:
554 if (global_settings
.party_mode
)
556 if (current_tick
-last_right
< HZ
)
558 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
)
568 ffwd_rew(ACTION_WPS_SEEKFWD
);
569 last_right
= last_left
= 0;
572 OR prev dir if this is straight after ACTION_WPS_SKIPPREV,*/
573 case ACTION_WPS_SEEKBACK
:
574 if (global_settings
.party_mode
)
576 if (current_tick
-last_left
< HZ
)
578 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
)
580 if (!wps_state
.paused
)
581 #if (CONFIG_CODEC == SWCODEC)
582 audio_pre_ff_rewind();
594 ffwd_rew(ACTION_WPS_SEEKBACK
);
595 last_left
= last_right
= 0;
599 case ACTION_WPS_SKIPPREV
:
600 if (global_settings
.party_mode
)
602 last_left
= current_tick
;
603 #ifdef AB_REPEAT_ENABLE
604 /* if we're in A/B repeat mode and the current position
605 is past the A marker, jump back to the A marker... */
606 if ( ab_repeat_mode_enabled() )
608 if ( ab_after_A_marker(wps_state
.id3
->elapsed
) )
610 ab_jump_to_A_marker();
612 #if (AB_REPEAT_ENABLE == 2)
619 /* ...otherwise, do it normally */
625 OR if skip length set, hop by predetermined amount. */
626 case ACTION_WPS_SKIPNEXT
:
627 if (global_settings
.party_mode
)
629 last_right
= current_tick
;
630 #ifdef AB_REPEAT_ENABLE
631 /* if we're in A/B repeat mode and the current position is
632 before the A marker, jump to the A marker... */
633 if ( ab_repeat_mode_enabled() )
635 if ( ab_before_A_marker(wps_state
.id3
->elapsed
) )
637 ab_jump_to_A_marker();
639 #if (AB_REPEAT_ENABLE == 2)
646 /* ...otherwise, do it normally */
650 /* next / prev directories */
651 /* and set A-B markers if in a-b mode */
652 case ACTION_WPS_ABSETB_NEXTDIR
:
653 if (global_settings
.party_mode
)
655 #if defined(AB_REPEAT_ENABLE)
656 if (ab_repeat_mode_enabled())
658 ab_set_B_marker(wps_state
.id3
->elapsed
);
659 ab_jump_to_A_marker();
667 case ACTION_WPS_ABSETA_PREVDIR
:
668 if (global_settings
.party_mode
)
670 #if defined(AB_REPEAT_ENABLE)
671 if (ab_repeat_mode_enabled())
672 ab_set_A_marker(wps_state
.id3
->elapsed
);
679 /* menu key functions */
680 case ACTION_WPS_MENU
:
686 #ifdef HAVE_QUICKSCREEN
687 case ACTION_WPS_QUICKSCREEN
:
690 if (quick_screen_quick(button
))
691 return SYS_USB_CONNECTED
;
695 #endif /* HAVE_QUICKSCREEN */
697 /* screen settings */
702 if (quick_screen_f3(BUTTON_F3
))
703 return SYS_USB_CONNECTED
;
707 #endif /* BUTTON_F3 */
710 #ifdef HAVE_PITCHSCREEN
711 case ACTION_WPS_PITCHSCREEN
:
714 if (1 == gui_syncpitchscreen_run())
715 return SYS_USB_CONNECTED
;
719 #endif /* HAVE_PITCHSCREEN */
721 #ifdef AB_REPEAT_ENABLE
722 /* reset A&B markers */
723 case ACTION_WPS_ABRESET
:
724 if (ab_repeat_mode_enabled())
730 #endif /* AB_REPEAT_ENABLE */
732 /* stop and exit wps */
733 case ACTION_WPS_STOP
:
734 if (global_settings
.party_mode
)
740 case ACTION_WPS_ID3SCREEN
:
747 #ifdef HAVE_TOUCHSCREEN
748 case ACTION_TOUCH_SHUFFLE
: /* toggle shuffle mode */
750 global_settings
.playlist_shuffle
=
751 !global_settings
.playlist_shuffle
;
752 #if CONFIG_CODEC == SWCODEC
753 dsp_set_replaygain();
755 if (global_settings
.playlist_shuffle
)
756 playlist_randomise(NULL
, current_tick
, true);
758 playlist_sort(NULL
, true);
761 case ACTION_TOUCH_REPMODE
: /* cycle the repeat mode setting */
763 const struct settings_list
*rep_setting
=
764 find_setting(&global_settings
.repeat_mode
, NULL
);
765 option_select_next_val(rep_setting
, false, true);
766 audio_flush_and_reload_tracks();
769 #endif /* HAVE_TOUCHSCREEN */
770 case ACTION_REDRAW
: /* yes are locked, just redraw */
771 wps_state
.do_full_update
= true;
773 case ACTION_NONE
: /* Timeout, do a partial update */
775 ffwd_rew(button
); /* hopefully fix the ffw/rwd bug */
777 #ifdef HAVE_RECORDING
783 default_event_handler(SYS_POWEROFF
);
787 if(default_event_handler(button
) == SYS_USB_CONNECTED
)
793 if (wps_state
.do_full_update
|| update
)
795 #if defined(HAVE_BACKLIGHT) || defined(HAVE_REMOTE_LCD)
796 gwps_caption_backlight(&wps_state
);
800 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
802 #ifdef HAVE_REMOTE_LCD
803 /* currently, all remotes are readable without backlight
804 * so still update those */
805 || (i
== SCREEN_REMOTE
)
810 gui_wps_update(&gui_wps
[i
]);
813 wps_state
.do_full_update
= false;
817 if (restore
&& wps_state
.id3
&&
818 ((restoretimer
== RESTORE_WPS_INSTANTLY
) ||
819 TIME_AFTER(current_tick
, restoretimer
)))
822 restoretimer
= RESTORE_WPS_INSTANTLY
;
823 gwps_fix_statusbars();
824 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
825 lcd_activation_set_hook(wps_lcd_activation_hook
);
829 screens
[i
].stop_scroll();
830 gui_wps_display(&gui_wps
[i
]);
835 #ifdef HAVE_LCD_CHARCELLS
836 status_set_record(false);
837 status_set_audio(false);
839 if (global_settings
.fade_on_stop
)
843 bookmark_autobookmark();
845 #ifdef AB_REPEAT_ENABLE
849 #ifdef HAVE_RECORDING
850 if (button
== ACTION_WPS_REC
)
851 return GO_TO_RECSCREEN
;
853 if (global_settings
.browse_current
)
854 return GO_TO_PREVIOUS_BROWSER
;
855 return GO_TO_PREVIOUS
;
858 if (button
&& !IS_SYSEVENT(button
) )
861 return GO_TO_ROOT
; /* unreachable - just to reduce compiler warnings */
864 /* this is called from the playback thread so NO DRAWING! */
865 static void track_changed_callback(void *param
)
867 wps_state
.id3
= (struct mp3entry
*)param
;
868 wps_state
.nid3
= audio_next_track();
870 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
871 && strcmp(wps_state
.id3
->path
, curr_cue
->audio_filename
))
873 /* the current cuesheet isn't the right one any more */
874 /* We need to parse the new cuesheet */
875 char cuepath
[MAX_PATH
];
877 if (look_for_cuesheet_file(wps_state
.id3
->path
, cuepath
) &&
878 parse_cuesheet(cuepath
, curr_cue
))
880 wps_state
.id3
->cuesheet_type
= 1;
881 strcpy(curr_cue
->audio_filename
, wps_state
.id3
->path
);
884 cue_spoof_id3(curr_cue
, wps_state
.id3
);
886 wps_state
.do_full_update
= true;
888 static void nextid3available_callback(void* param
)
891 wps_state
.nid3
= audio_next_track();
892 wps_state
.do_full_update
= true;
897 static void wps_state_init(void)
899 wps_state
.ff_rewind
= false;
900 wps_state
.paused
= false;
901 if(audio_status() & AUDIO_STATUS_PLAY
)
903 wps_state
.id3
= audio_current_track();
904 wps_state
.nid3
= audio_next_track();
908 wps_state
.id3
= NULL
;
909 wps_state
.nid3
= NULL
;
911 /* We'll be updating due to restore initialized with true */
912 wps_state
.do_full_update
= false;
913 /* add the WPS track event callbacks */
914 add_event(PLAYBACK_EVENT_TRACK_CHANGE
, false, track_changed_callback
);
915 add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE
, false, nextid3available_callback
);
920 #ifdef HAVE_LCD_BITMAP
921 static void statusbar_toggle_handler(void *data
)
925 gwps_fix_statusbars();
929 struct viewport
*vp
= &gui_wps
[i
].data
->viewports
[0].vp
;
930 bool draw
= wpsbars
& (VP_SB_ONSCREEN(i
) | VP_SB_IGNORE_SETTING(i
));
934 vp
->height
= screens
[i
].lcdheight
;
938 vp
->y
= STATUSBAR_HEIGHT
;
939 vp
->height
= screens
[i
].lcdheight
- STATUSBAR_HEIGHT
;
945 void gui_sync_wps_init(void)
950 wps_data_init(&wps_datas
[i
]);
952 wps_datas
[i
].wps_uses_albumart
= 0;
954 #ifdef HAVE_REMOTE_LCD
955 wps_datas
[i
].remote_wps
= (i
!= 0);
957 gui_wps
[i
].data
= &wps_datas
[i
];
958 gui_wps
[i
].display
= &screens
[i
];
959 /* Currently no seperate wps_state needed/possible
960 so use the only aviable ( "global" ) one */
961 gui_wps
[i
].state
= &wps_state
;
963 #ifdef HAVE_LCD_BITMAP
964 add_event(GUI_EVENT_STATUSBAR_TOGGLE
, false, statusbar_toggle_handler
);
967 unload_wps_backdrop();
969 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
970 unload_remote_wps_backdrop();
975 /* Returns true if at least one of the gui_wps screens has an album art
976 tag in its wps structure */
977 bool gui_sync_wps_uses_albumart(void)
981 struct gui_wps
*gwps
= &gui_wps
[i
];
982 if (gwps
->data
&& (gwps
->data
->wps_uses_albumart
!= WPS_ALBUMART_NONE
))