Add setting for Directory Cache Time

This commit is contained in:
Joshua Bahnsen 2013-05-25 23:06:10 -07:00
parent dc5e49212c
commit 7a9e96b071
8 changed files with 332 additions and 282 deletions

View File

@ -19,21 +19,23 @@ public final class R {
public static final int slide_out_to_top=0x7f040007;
}
public static final class array {
public static final int bufferLengthNames=0x7f0b000c;
public static final int bufferLengthNames=0x7f0b000e;
public static final int bufferLengthValues=0x7f0b0008;
public static final int cacheSizeNames=0x7f0b0005;
public static final int cacheSizeValues=0x7f0b0004;
public static final int chatRefreshNames=0x7f0b000b;
public static final int chatRefreshValues=0x7f0b000a;
public static final int directoryCacheTimeNames=0x7f0b000d;
public static final int directoryCacheTimeValues=0x7f0b000c;
public static final int incrementTimeValues=0x7f0b0009;
public static final int maxBitrateNames=0x7f0b0007;
public static final int maxBitrateValues=0x7f0b0006;
public static final int networkTimeoutNames=0x7f0b000e;
public static final int networkTimeoutValues=0x7f0b000d;
public static final int networkTimeoutNames=0x7f0b0010;
public static final int networkTimeoutValues=0x7f0b000f;
public static final int preloadCountNames=0x7f0b0003;
public static final int preloadCountValues=0x7f0b0002;
public static final int searchNames=0x7f0b0010;
public static final int searchValues=0x7f0b000f;
public static final int searchNames=0x7f0b0012;
public static final int searchValues=0x7f0b0011;
public static final int themeNames=0x7f0b0001;
public static final int themeValues=0x7f0b0000;
}
@ -901,19 +903,19 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
public static final int select_album_n_songs_unpinned=0x7f0d0002;
}
public static final class string {
public static final int background_task_loading=0x7f080126;
public static final int background_task_network_error=0x7f080128;
public static final int background_task_no_network=0x7f080127;
public static final int background_task_not_found=0x7f080129;
public static final int background_task_parse_error=0x7f08012a;
public static final int background_task_wait=0x7f080125;
public static final int background_task_loading=0x7f08012f;
public static final int background_task_network_error=0x7f080131;
public static final int background_task_no_network=0x7f080130;
public static final int background_task_not_found=0x7f080132;
public static final int background_task_parse_error=0x7f080133;
public static final int background_task_wait=0x7f08012e;
public static final int button_bar_browse=0x7f08001a;
public static final int button_bar_chat=0x7f08001c;
public static final int button_bar_home=0x7f080019;
public static final int button_bar_now_playing=0x7f08001e;
public static final int button_bar_playlists=0x7f08001d;
public static final int button_bar_search=0x7f08001b;
public static final int chat_send_a_message=0x7f080142;
public static final int chat_send_a_message=0x7f08014b;
public static final int common_appname=0x7f080006;
public static final int common_cancel=0x7f080009;
public static final int common_comment=0x7f080016;
@ -966,9 +968,9 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
public static final int download_repeat_single=0x7f080082;
public static final int download_visualizer_off=0x7f080084;
public static final int download_visualizer_on=0x7f080083;
public static final int equalizer_enabled=0x7f080137;
public static final int equalizer_label=0x7f080136;
public static final int equalizer_preset=0x7f080138;
public static final int equalizer_enabled=0x7f080140;
public static final int equalizer_label=0x7f08013f;
public static final int equalizer_preset=0x7f080141;
public static final int error_label=0x7f080093;
public static final int help_back=0x7f080048;
public static final int help_close=0x7f080049;
@ -1014,14 +1016,14 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
public static final int menu_settings=0x7f080038;
public static final int music_library_label=0x7f080057;
public static final int music_library_label_offline=0x7f080058;
public static final int music_service_retry=0x7f080124;
public static final int parser_artist_count=0x7f080132;
public static final int parser_not_authenticated=0x7f080130;
public static final int parser_not_authorized=0x7f080131;
public static final int parser_reading=0x7f08012c;
public static final int parser_reading_done=0x7f08012d;
public static final int parser_upgrade_client=0x7f08012e;
public static final int parser_upgrade_server=0x7f08012f;
public static final int music_service_retry=0x7f08012d;
public static final int parser_artist_count=0x7f08013b;
public static final int parser_not_authenticated=0x7f080139;
public static final int parser_not_authorized=0x7f08013a;
public static final int parser_reading=0x7f080135;
public static final int parser_reading_done=0x7f080136;
public static final int parser_upgrade_client=0x7f080137;
public static final int parser_upgrade_server=0x7f080138;
public static final int play_video_loading=0x7f08004c;
public static final int play_video_noplugin=0x7f08004d;
public static final int playlist_label=0x7f080042;
@ -1063,170 +1065,179 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
public static final int select_album_play_all=0x7f080060;
public static final int select_album_searching=0x7f08005f;
public static final int select_album_select=0x7f08005a;
public static final int select_artist_all_folders=0x7f080135;
public static final int select_artist_all_folders=0x7f08013e;
public static final int select_artist_empty=0x7f080068;
public static final int select_artist_folder=0x7f080134;
public static final int select_artist_refresh=0x7f080133;
public static final int select_artist_folder=0x7f08013d;
public static final int select_artist_refresh=0x7f08013c;
public static final int select_genre_empty=0x7f080069;
public static final int select_playlist_empty=0x7f08006a;
public static final int service_connecting=0x7f08012b;
public static final int settings_appearance_title=0x7f0800ae;
public static final int settings_buffer_length=0x7f0800e7;
public static final int settings_buffer_length_0=0x7f0800e9;
public static final int settings_buffer_length_1=0x7f0800ea;
public static final int settings_buffer_length_10=0x7f0800ee;
public static final int settings_buffer_length_12=0x7f0800ef;
public static final int settings_buffer_length_15=0x7f0800f0;
public static final int settings_buffer_length_2=0x7f0800eb;
public static final int settings_buffer_length_20=0x7f0800f1;
public static final int settings_buffer_length_30=0x7f0800f2;
public static final int settings_buffer_length_5=0x7f0800ec;
public static final int settings_buffer_length_60=0x7f0800f3;
public static final int settings_buffer_length_8=0x7f0800ed;
public static final int settings_cache_location=0x7f0800a6;
public static final int settings_cache_location_error=0x7f0800a7;
public static final int settings_cache_size=0x7f0800a5;
public static final int settings_cache_size_100=0x7f0800ce;
public static final int settings_cache_size_1000=0x7f0800d1;
public static final int settings_cache_size_10000=0x7f0800d4;
public static final int settings_cache_size_200=0x7f0800cf;
public static final int settings_cache_size_2000=0x7f0800d2;
public static final int settings_cache_size_20000=0x7f0800d5;
public static final int settings_cache_size_500=0x7f0800d0;
public static final int settings_cache_size_5000=0x7f0800d3;
public static final int settings_cache_size_unlimited=0x7f0800d6;
public static final int service_connecting=0x7f080134;
public static final int settings_appearance_title=0x7f0800af;
public static final int settings_buffer_length=0x7f0800e8;
public static final int settings_buffer_length_0=0x7f0800ea;
public static final int settings_buffer_length_1=0x7f0800eb;
public static final int settings_buffer_length_10=0x7f0800ef;
public static final int settings_buffer_length_12=0x7f0800f0;
public static final int settings_buffer_length_120=0x7f0800f5;
public static final int settings_buffer_length_15=0x7f0800f1;
public static final int settings_buffer_length_2=0x7f0800ec;
public static final int settings_buffer_length_20=0x7f0800f2;
public static final int settings_buffer_length_30=0x7f0800f3;
public static final int settings_buffer_length_5=0x7f0800ed;
public static final int settings_buffer_length_60=0x7f0800f4;
public static final int settings_buffer_length_8=0x7f0800ee;
public static final int settings_cache_location=0x7f0800a7;
public static final int settings_cache_location_error=0x7f0800a8;
public static final int settings_cache_size=0x7f0800a6;
public static final int settings_cache_size_100=0x7f0800cf;
public static final int settings_cache_size_1000=0x7f0800d2;
public static final int settings_cache_size_10000=0x7f0800d5;
public static final int settings_cache_size_200=0x7f0800d0;
public static final int settings_cache_size_2000=0x7f0800d3;
public static final int settings_cache_size_20000=0x7f0800d6;
public static final int settings_cache_size_500=0x7f0800d1;
public static final int settings_cache_size_5000=0x7f0800d4;
public static final int settings_cache_size_unlimited=0x7f0800d7;
public static final int settings_cache_title=0x7f0800a3;
public static final int settings_chat_refresh=0x7f0800a2;
public static final int settings_clear_search_history=0x7f0800d7;
public static final int settings_connection_failure=0x7f0800ab;
public static final int settings_default_albums=0x7f08011c;
public static final int settings_default_artists=0x7f08011b;
public static final int settings_default_songs=0x7f08011d;
public static final int settings_display_bitrate=0x7f0800c2;
public static final int settings_display_bitrate_summary=0x7f0800c3;
public static final int settings_download_transition=0x7f080104;
public static final int settings_download_transition_summary=0x7f080105;
public static final int settings_gapless_playback=0x7f080106;
public static final int settings_gapless_playback_summary=0x7f080107;
public static final int settings_hide_media_summary=0x7f0800e1;
public static final int settings_hide_media_title=0x7f0800e0;
public static final int settings_hide_media_toast=0x7f0800e2;
public static final int settings_increment_time=0x7f08011e;
public static final int settings_invalid_url=0x7f0800ac;
public static final int settings_invalid_username=0x7f0800ad;
public static final int settings_max_albums=0x7f08010a;
public static final int settings_max_artists=0x7f080119;
public static final int settings_max_bitrate_112=0x7f0800b9;
public static final int settings_max_bitrate_128=0x7f0800ba;
public static final int settings_max_bitrate_160=0x7f0800bb;
public static final int settings_max_bitrate_192=0x7f0800bc;
public static final int settings_max_bitrate_256=0x7f0800bd;
public static final int settings_max_bitrate_32=0x7f0800b5;
public static final int settings_max_bitrate_320=0x7f0800be;
public static final int settings_max_bitrate_64=0x7f0800b6;
public static final int settings_max_bitrate_80=0x7f0800b7;
public static final int settings_max_bitrate_96=0x7f0800b8;
public static final int settings_max_bitrate_mobile=0x7f0800b4;
public static final int settings_max_bitrate_unlimited=0x7f0800bf;
public static final int settings_max_bitrate_wifi=0x7f0800b3;
public static final int settings_max_songs=0x7f08011a;
public static final int settings_media_button_summary=0x7f0800e4;
public static final int settings_media_button_title=0x7f0800e3;
public static final int settings_network_timeout=0x7f0800e8;
public static final int settings_network_timeout_105000=0x7f0800fa;
public static final int settings_network_timeout_120000=0x7f0800fb;
public static final int settings_network_timeout_15000=0x7f0800f4;
public static final int settings_network_timeout_30000=0x7f0800f5;
public static final int settings_network_timeout_45000=0x7f0800f6;
public static final int settings_network_timeout_60000=0x7f0800f7;
public static final int settings_network_timeout_75000=0x7f0800f8;
public static final int settings_network_timeout_90000=0x7f0800f9;
public static final int settings_network_title=0x7f0800b2;
public static final int settings_other_title=0x7f0800d9;
public static final int settings_playback_control_title=0x7f0800db;
public static final int settings_clear_search_history=0x7f0800d8;
public static final int settings_connection_failure=0x7f0800ac;
public static final int settings_default_albums=0x7f080125;
public static final int settings_default_artists=0x7f080124;
public static final int settings_default_songs=0x7f080126;
public static final int settings_directory_cache_time=0x7f0800a5;
public static final int settings_directory_cache_time_0=0x7f0800f6;
public static final int settings_directory_cache_time_1=0x7f0800f7;
public static final int settings_directory_cache_time_10=0x7f0800fa;
public static final int settings_directory_cache_time_2=0x7f0800f8;
public static final int settings_directory_cache_time_30=0x7f0800fb;
public static final int settings_directory_cache_time_5=0x7f0800f9;
public static final int settings_directory_cache_time_60=0x7f0800fc;
public static final int settings_display_bitrate=0x7f0800c3;
public static final int settings_display_bitrate_summary=0x7f0800c4;
public static final int settings_download_transition=0x7f08010d;
public static final int settings_download_transition_summary=0x7f08010e;
public static final int settings_gapless_playback=0x7f08010f;
public static final int settings_gapless_playback_summary=0x7f080110;
public static final int settings_hide_media_summary=0x7f0800e2;
public static final int settings_hide_media_title=0x7f0800e1;
public static final int settings_hide_media_toast=0x7f0800e3;
public static final int settings_increment_time=0x7f080127;
public static final int settings_invalid_url=0x7f0800ad;
public static final int settings_invalid_username=0x7f0800ae;
public static final int settings_max_albums=0x7f080113;
public static final int settings_max_artists=0x7f080122;
public static final int settings_max_bitrate_112=0x7f0800ba;
public static final int settings_max_bitrate_128=0x7f0800bb;
public static final int settings_max_bitrate_160=0x7f0800bc;
public static final int settings_max_bitrate_192=0x7f0800bd;
public static final int settings_max_bitrate_256=0x7f0800be;
public static final int settings_max_bitrate_32=0x7f0800b6;
public static final int settings_max_bitrate_320=0x7f0800bf;
public static final int settings_max_bitrate_64=0x7f0800b7;
public static final int settings_max_bitrate_80=0x7f0800b8;
public static final int settings_max_bitrate_96=0x7f0800b9;
public static final int settings_max_bitrate_mobile=0x7f0800b5;
public static final int settings_max_bitrate_unlimited=0x7f0800c0;
public static final int settings_max_bitrate_wifi=0x7f0800b4;
public static final int settings_max_songs=0x7f080123;
public static final int settings_media_button_summary=0x7f0800e5;
public static final int settings_media_button_title=0x7f0800e4;
public static final int settings_network_timeout=0x7f0800e9;
public static final int settings_network_timeout_105000=0x7f080103;
public static final int settings_network_timeout_120000=0x7f080104;
public static final int settings_network_timeout_15000=0x7f0800fd;
public static final int settings_network_timeout_30000=0x7f0800fe;
public static final int settings_network_timeout_45000=0x7f0800ff;
public static final int settings_network_timeout_60000=0x7f080100;
public static final int settings_network_timeout_75000=0x7f080101;
public static final int settings_network_timeout_90000=0x7f080102;
public static final int settings_network_title=0x7f0800b3;
public static final int settings_other_title=0x7f0800da;
public static final int settings_playback_control_title=0x7f0800dc;
public static final int settings_preload=0x7f0800a4;
public static final int settings_preload_1=0x7f0800c8;
public static final int settings_preload_10=0x7f0800cc;
public static final int settings_preload_2=0x7f0800c9;
public static final int settings_preload_3=0x7f0800ca;
public static final int settings_preload_5=0x7f0800cb;
public static final int settings_preload_unlimited=0x7f0800cd;
public static final int settings_screen_lit_summary=0x7f0800e6;
public static final int settings_screen_lit_title=0x7f0800e5;
public static final int settings_scrobble_summary=0x7f0800dd;
public static final int settings_scrobble_title=0x7f0800dc;
public static final int settings_search_1=0x7f08010b;
public static final int settings_search_10=0x7f08010e;
public static final int settings_search_100=0x7f080116;
public static final int settings_search_15=0x7f08010f;
public static final int settings_search_20=0x7f080110;
public static final int settings_search_25=0x7f080111;
public static final int settings_search_250=0x7f080117;
public static final int settings_search_3=0x7f08010c;
public static final int settings_search_30=0x7f080112;
public static final int settings_search_40=0x7f080113;
public static final int settings_search_5=0x7f08010d;
public static final int settings_search_50=0x7f080114;
public static final int settings_search_500=0x7f080118;
public static final int settings_search_75=0x7f080115;
public static final int settings_search_history_cleared=0x7f0800d8;
public static final int settings_search_title=0x7f0800da;
public static final int settings_preload_1=0x7f0800c9;
public static final int settings_preload_10=0x7f0800cd;
public static final int settings_preload_2=0x7f0800ca;
public static final int settings_preload_3=0x7f0800cb;
public static final int settings_preload_5=0x7f0800cc;
public static final int settings_preload_unlimited=0x7f0800ce;
public static final int settings_screen_lit_summary=0x7f0800e7;
public static final int settings_screen_lit_title=0x7f0800e6;
public static final int settings_scrobble_summary=0x7f0800de;
public static final int settings_scrobble_title=0x7f0800dd;
public static final int settings_search_1=0x7f080114;
public static final int settings_search_10=0x7f080117;
public static final int settings_search_100=0x7f08011f;
public static final int settings_search_15=0x7f080118;
public static final int settings_search_20=0x7f080119;
public static final int settings_search_25=0x7f08011a;
public static final int settings_search_250=0x7f080120;
public static final int settings_search_3=0x7f080115;
public static final int settings_search_30=0x7f08011b;
public static final int settings_search_40=0x7f08011c;
public static final int settings_search_5=0x7f080116;
public static final int settings_search_50=0x7f08011d;
public static final int settings_search_500=0x7f080121;
public static final int settings_search_75=0x7f08011e;
public static final int settings_search_history_cleared=0x7f0800d9;
public static final int settings_search_title=0x7f0800db;
public static final int settings_server_add_server=0x7f08009c;
public static final int settings_server_address=0x7f08009f;
public static final int settings_server_name=0x7f08009b;
public static final int settings_server_number=0x7f08009d;
public static final int settings_server_password=0x7f0800a1;
public static final int settings_server_remove_server=0x7f08009e;
public static final int settings_server_scaling_summary=0x7f0800df;
public static final int settings_server_scaling_title=0x7f0800de;
public static final int settings_server_scaling_summary=0x7f0800e0;
public static final int settings_server_scaling_title=0x7f0800df;
public static final int settings_server_unused=0x7f080097;
public static final int settings_server_unused1=0x7f080098;
public static final int settings_server_unused2=0x7f080099;
public static final int settings_server_unused3=0x7f08009a;
public static final int settings_server_username=0x7f0800a0;
public static final int settings_servers_title=0x7f080096;
public static final int settings_show_lockscreen_controls=0x7f080100;
public static final int settings_show_lockscreen_controls_summary=0x7f080101;
public static final int settings_show_notification=0x7f0800fc;
public static final int settings_show_notification_always=0x7f0800fe;
public static final int settings_show_notification_always_summary=0x7f0800ff;
public static final int settings_show_notification_summary=0x7f0800fd;
public static final int settings_show_now_playing=0x7f080108;
public static final int settings_show_now_playing_summary=0x7f080109;
public static final int settings_show_track_number=0x7f0800c6;
public static final int settings_show_track_number_summary=0x7f0800c7;
public static final int settings_show_lockscreen_controls=0x7f080109;
public static final int settings_show_lockscreen_controls_summary=0x7f08010a;
public static final int settings_show_notification=0x7f080105;
public static final int settings_show_notification_always=0x7f080107;
public static final int settings_show_notification_always_summary=0x7f080108;
public static final int settings_show_notification_summary=0x7f080106;
public static final int settings_show_now_playing=0x7f080111;
public static final int settings_show_now_playing_summary=0x7f080112;
public static final int settings_show_track_number=0x7f0800c7;
public static final int settings_show_track_number_summary=0x7f0800c8;
public static final int settings_test_connection_title=0x7f080095;
public static final int settings_testing_connection=0x7f0800a8;
public static final int settings_testing_ok=0x7f0800a9;
public static final int settings_testing_unlicensed=0x7f0800aa;
public static final int settings_theme_dark=0x7f0800b1;
public static final int settings_theme_light=0x7f0800b0;
public static final int settings_theme_title=0x7f0800af;
public static final int settings_testing_connection=0x7f0800a9;
public static final int settings_testing_ok=0x7f0800aa;
public static final int settings_testing_unlicensed=0x7f0800ab;
public static final int settings_theme_dark=0x7f0800b2;
public static final int settings_theme_light=0x7f0800b1;
public static final int settings_theme_title=0x7f0800b0;
public static final int settings_title=0x7f080094;
public static final int settings_use_folder_for_album_artist=0x7f0800c4;
public static final int settings_use_folder_for_album_artist_summary=0x7f0800c5;
public static final int settings_use_id3=0x7f08011f;
public static final int settings_use_id3_summary=0x7f080120;
public static final int settings_use_stream_proxy=0x7f080102;
public static final int settings_use_stream_proxy_summary=0x7f080103;
public static final int settings_wifi_required_summary=0x7f0800c1;
public static final int settings_wifi_required_title=0x7f0800c0;
public static final int shuffle_endYear=0x7f080122;
public static final int shuffle_genre=0x7f080123;
public static final int shuffle_startYear=0x7f080121;
public static final int settings_use_folder_for_album_artist=0x7f0800c5;
public static final int settings_use_folder_for_album_artist_summary=0x7f0800c6;
public static final int settings_use_id3=0x7f080128;
public static final int settings_use_id3_summary=0x7f080129;
public static final int settings_use_stream_proxy=0x7f08010b;
public static final int settings_use_stream_proxy_summary=0x7f08010c;
public static final int settings_wifi_required_summary=0x7f0800c2;
public static final int settings_wifi_required_title=0x7f0800c1;
public static final int shuffle_endYear=0x7f08012b;
public static final int shuffle_genre=0x7f08012c;
public static final int shuffle_startYear=0x7f08012a;
public static final int song_details_all=0x7f080090;
public static final int song_details_kbps=0x7f080091;
public static final int updated_playlist=0x7f08008c;
public static final int updated_playlist_error=0x7f08008d;
public static final int util_bytes_format_byte=0x7f08013f;
public static final int util_bytes_format_gigabyte=0x7f08013c;
public static final int util_bytes_format_kilobyte=0x7f08013e;
public static final int util_bytes_format_megabyte=0x7f08013d;
public static final int util_no_time=0x7f080140;
public static final int util_zero_time=0x7f080141;
public static final int widget_initial_text=0x7f080139;
public static final int widget_sdcard_busy=0x7f08013a;
public static final int widget_sdcard_missing=0x7f08013b;
public static final int util_bytes_format_byte=0x7f080148;
public static final int util_bytes_format_gigabyte=0x7f080145;
public static final int util_bytes_format_kilobyte=0x7f080147;
public static final int util_bytes_format_megabyte=0x7f080146;
public static final int util_no_time=0x7f080149;
public static final int util_zero_time=0x7f08014a;
public static final int widget_initial_text=0x7f080142;
public static final int widget_sdcard_busy=0x7f080143;
public static final int widget_sdcard_missing=0x7f080144;
}
public static final class style {
public static final int MenuDrawer=0x7f0a0005;

View File

@ -5,12 +5,10 @@
<item>light</item>
<item>dark</item>
</string-array>
<string-array name="themeNames">
<item>@string/settings.theme_light</item>
<item>@string/settings.theme_dark</item>
</string-array>
<string-array name="preloadCountValues">
<item>1</item>
<item>2</item>
@ -19,7 +17,6 @@
<item>10</item>
<item>-1</item>
</string-array>
<string-array name="preloadCountNames">
<item>@string/settings.preload_1</item>
<item>@string/settings.preload_2</item>
@ -28,7 +25,6 @@
<item>@string/settings.preload_10</item>
<item>@string/settings.preload_unlimited</item>
</string-array>
<string-array name="cacheSizeValues">
<item>100</item>
<item>200</item>
@ -40,7 +36,6 @@
<item>20000</item>
<item>-1</item>
</string-array>
<string-array name="cacheSizeNames">
<item>@string/settings.cache_size_100</item>
<item>@string/settings.cache_size_200</item>
@ -52,7 +47,6 @@
<item>@string/settings.cache_size_20000</item>
<item>@string/settings.cache_size_unlimited</item>
</string-array>
<string-array name="maxBitrateValues">
<item>32</item>
<item>64</item>
@ -66,7 +60,6 @@
<item>320</item>
<item>0</item>
</string-array>
<string-array name="maxBitrateNames">
<item>@string/settings.max_bitrate_32</item>
<item>@string/settings.max_bitrate_64</item>
@ -80,125 +73,136 @@
<item>@string/settings.max_bitrate_320</item>
<item>@string/settings.max_bitrate_unlimited</item>
</string-array>
<string-array name="bufferLengthValues">
<item>1</item>
<item>2</item>
<item>5</item>
<item>8</item>
<item>10</item>
<item>12</item>
<item>15</item>
<item>20</item>
<item>30</item>
<item>1</item>
<item>2</item>
<item>5</item>
<item>8</item>
<item>10</item>
<item>12</item>
<item>15</item>
<item>20</item>
<item>30</item>
</string-array>
<string-array name="incrementTimeValues">
<item>1000</item>
<item>2000</item>
<item>5000</item>
<item>8000</item>
<item>10000</item>
<item>12000</item>
<item>15000</item>
<item>20000</item>
<item>30000</item>
<item>1000</item>
<item>2000</item>
<item>5000</item>
<item>8000</item>
<item>10000</item>
<item>12000</item>
<item>15000</item>
<item>20000</item>
<item>30000</item>
</string-array>
<string-array name="chatRefreshValues">
<item>0</item>
<item>1000</item>
<item>2000</item>
<item>5000</item>
<item>8000</item>
<item>10000</item>
<item>12000</item>
<item>15000</item>
<item>20000</item>
<item>30000</item>
<item>60000</item>
<item>0</item>
<item>1000</item>
<item>2000</item>
<item>5000</item>
<item>8000</item>
<item>10000</item>
<item>12000</item>
<item>15000</item>
<item>20000</item>
<item>30000</item>
<item>60000</item>
<item>120000</item>
</string-array>
<string-array name="chatRefreshNames">
<item>@string/settings.buffer_length_0</item>
<item>@string/settings.buffer_length_1</item>
<item>@string/settings.buffer_length_2</item>
<item>@string/settings.buffer_length_5</item>
<item>@string/settings.buffer_length_8</item>
<item>@string/settings.buffer_length_10</item>
<item>@string/settings.buffer_length_12</item>
<item>@string/settings.buffer_length_15</item>
<item>@string/settings.buffer_length_20</item>
<item>@string/settings.buffer_length_30</item>
<item>@string/settings.buffer_length_60</item>
<string-array name="chatRefreshNames">
<item>@string/settings.buffer_length_0</item>
<item>@string/settings.buffer_length_1</item>
<item>@string/settings.buffer_length_2</item>
<item>@string/settings.buffer_length_5</item>
<item>@string/settings.buffer_length_8</item>
<item>@string/settings.buffer_length_10</item>
<item>@string/settings.buffer_length_12</item>
<item>@string/settings.buffer_length_15</item>
<item>@string/settings.buffer_length_20</item>
<item>@string/settings.buffer_length_30</item>
<item>@string/settings.buffer_length_60</item>
<item>@string/settings.buffer_length_120</item>
</string-array>
<string-array name="bufferLengthNames">
<item>@string/settings.buffer_length_1</item>
<item>@string/settings.buffer_length_2</item>
<item>@string/settings.buffer_length_5</item>
<item>@string/settings.buffer_length_8</item>
<item>@string/settings.buffer_length_10</item>
<item>@string/settings.buffer_length_12</item>
<item>@string/settings.buffer_length_15</item>
<item>@string/settings.buffer_length_20</item>
<item>@string/settings.buffer_length_30</item>
<string-array name="directoryCacheTimeValues">
<item>0</item>
<item>60</item>
<item>120</item>
<item>300</item>
<item>600</item>
<item>1800</item>
<item>3600</item>
</string-array>
<string-array name="directoryCacheTimeNames">
<item>@string/settings.directory_cache_time_0</item>
<item>@string/settings.directory_cache_time_1</item>
<item>@string/settings.directory_cache_time_2</item>
<item>@string/settings.directory_cache_time_5</item>
<item>@string/settings.directory_cache_time_10</item>
<item>@string/settings.directory_cache_time_30</item>
<item>@string/settings.directory_cache_time_60</item>
</string-array>
<string-array name="bufferLengthNames">
<item>@string/settings.buffer_length_1</item>
<item>@string/settings.buffer_length_2</item>
<item>@string/settings.buffer_length_5</item>
<item>@string/settings.buffer_length_8</item>
<item>@string/settings.buffer_length_10</item>
<item>@string/settings.buffer_length_12</item>
<item>@string/settings.buffer_length_15</item>
<item>@string/settings.buffer_length_20</item>
<item>@string/settings.buffer_length_30</item>
</string-array>
<string-array name="networkTimeoutValues">
<item>15000</item>
<item>30000</item>
<item>45000</item>
<item>60000</item>
<item>75000</item>
<item>90000</item>
<item>105000</item>
<item>120000</item>
<item>15000</item>
<item>30000</item>
<item>45000</item>
<item>60000</item>
<item>75000</item>
<item>90000</item>
<item>105000</item>
<item>120000</item>
</string-array>
<string-array name="networkTimeoutNames">
<item>@string/settings.network_timeout_15000</item>
<item>@string/settings.network_timeout_30000</item>
<item>@string/settings.network_timeout_45000</item>
<item>@string/settings.network_timeout_60000</item>
<item>@string/settings.network_timeout_75000</item>
<item>@string/settings.network_timeout_90000</item>
<item>@string/settings.network_timeout_105000</item>
<item>@string/settings.network_timeout_120000</item>
<item>@string/settings.network_timeout_15000</item>
<item>@string/settings.network_timeout_30000</item>
<item>@string/settings.network_timeout_45000</item>
<item>@string/settings.network_timeout_60000</item>
<item>@string/settings.network_timeout_75000</item>
<item>@string/settings.network_timeout_90000</item>
<item>@string/settings.network_timeout_105000</item>
<item>@string/settings.network_timeout_120000</item>
</string-array>
<string-array name="searchValues">
<item>1</item>
<item>3</item>
<item>5</item>
<item>10</item>
<item>15</item>
<item>20</item>
<item>25</item>
<item>30</item>
<item>40</item>
<item>50</item>
<item>75</item>
<item>100</item>
<item>250</item>
<item>500</item>
<item>1</item>
<item>3</item>
<item>5</item>
<item>10</item>
<item>15</item>
<item>20</item>
<item>25</item>
<item>30</item>
<item>40</item>
<item>50</item>
<item>75</item>
<item>100</item>
<item>250</item>
<item>500</item>
</string-array>
<string-array name="searchNames">
<item>@string/settings.search_1</item>
<item>@string/settings.search_3</item>
<item>@string/settings.search_5</item>
<item>@string/settings.search_10</item>
<item>@string/settings.search_15</item>
<item>@string/settings.search_20</item>
<item>@string/settings.search_25</item>
<item>@string/settings.search_30</item>
<item>@string/settings.search_40</item>
<item>@string/settings.search_50</item>
<item>@string/settings.search_75</item>
<item>@string/settings.search_100</item>
<item>@string/settings.search_250</item>
<item>@string/settings.search_500</item>
<item>@string/settings.search_1</item>
<item>@string/settings.search_3</item>
<item>@string/settings.search_5</item>
<item>@string/settings.search_10</item>
<item>@string/settings.search_15</item>
<item>@string/settings.search_20</item>
<item>@string/settings.search_25</item>
<item>@string/settings.search_30</item>
<item>@string/settings.search_40</item>
<item>@string/settings.search_50</item>
<item>@string/settings.search_75</item>
<item>@string/settings.search_100</item>
<item>@string/settings.search_250</item>
<item>@string/settings.search_500</item>
</string-array>
</resources>
</resources>

View File

@ -159,6 +159,7 @@
<string name="settings.chat_refresh">Chat Refresh Interval</string>
<string name="settings.cache_title">Music Cache</string>
<string name="settings.preload">Songs To Preload</string>
<string name="settings.directory_cache_time">Directory Cache Time</string>
<string name="settings.cache_size">Cache Size</string>
<string name="settings.cache_location">Cache Location</string>
<string name="settings.cache_location_error">Invalid cache location. Using default.</string>
@ -237,7 +238,26 @@
<string name="settings.buffer_length_15">15 seconds</string>
<string name="settings.buffer_length_20">20 seconds</string>
<string name="settings.buffer_length_30">30 seconds</string>
<string name="settings.buffer_length_60">60 seconds</string>
<string name="settings.buffer_length_60">1 minute</string>
<string name="settings.buffer_length_120">2 minutes</string>
<string name="settings.buffer_length_0">Disabled</string>
<string name="settings.directory_cache_time_0">Disabled</string>
<string name="settings.directory_cache_time_1">1 minute</string>
<string name="settings.directory_cache_time_2">2 minutes</string>
<string name="settings.directory_cache_time_5">5 minutes</string>
<string name="settings.directory_cache_time_10">10 minutes</string>
<string name="settings.directory_cache_time_30">30 minutes</string>
<string name="settings.directory_cache_time_60">1 hour</string>
<string name="settings.buffer_length_2">2 seconds</string>
<string name="settings.buffer_length_5">5 seconds</string>
<string name="settings.buffer_length_8">8 seconds</string>
<string name="settings.buffer_length_10">10 seconds</string>
<string name="settings.buffer_length_12">12 seconds</string>
<string name="settings.buffer_length_15">15 seconds</string>
<string name="settings.buffer_length_20">20 seconds</string>
<string name="settings.buffer_length_30">30 seconds</string>
<string name="settings.buffer_length_60">1 minute</string>
<string name="settings.buffer_length_120">2 minutes</string>
<string name="settings.network_timeout_15000">15 seconds</string>
<string name="settings.network_timeout_30000">30 seconds</string>
<string name="settings.network_timeout_45000">45 seconds</string>

View File

@ -144,6 +144,12 @@
a:entryValues="@array/preloadCountValues"
a:key="preloadCount"
a:title="@string/settings.preload" />
<ListPreference
a:defaultValue="300"
a:entries="@array/directoryCacheTimeNames"
a:entryValues="@array/directoryCacheTimeValues"
a:key="directoryCacheTime"
a:title="@string/settings.directory_cache_time" />
</PreferenceCategory>
<PreferenceCategory a:title="@string/settings.search_title" >
<ListPreference

View File

@ -78,6 +78,7 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
private ListPreference defaultSongs;
private ListPreference defaultArtists;
private ListPreference chatRefreshInterval;
private ListPreference directoryCacheTime;
private CheckBoxPreference mediaButtonsEnabled;
private CheckBoxPreference lockScreenEnabled;
private CheckBoxPreference gaplessPlaybackEnabled;
@ -153,6 +154,7 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
defaultSongs = (ListPreference) findPreference(Constants.PREFERENCES_KEY_DEFAULT_SONGS);
defaultAlbums = (ListPreference) findPreference(Constants.PREFERENCES_KEY_DEFAULT_ALBUMS);
chatRefreshInterval = (ListPreference) findPreference(Constants.PREFERENCES_KEY_CHAT_REFRESH_INTERVAL);
directoryCacheTime = (ListPreference) findPreference(Constants.PREFERENCES_KEY_DIRECTORY_CACHE_TIME);
mediaButtonsEnabled = (CheckBoxPreference) findPreference(Constants.PREFERENCES_KEY_MEDIA_BUTTONS);
lockScreenEnabled = (CheckBoxPreference) findPreference(Constants.PREFERENCES_KEY_SHOW_LOCK_SCREEN_CONTROLS);
gaplessPlaybackEnabled = (CheckBoxPreference) findPreference(Constants.PREFERENCES_KEY_GAPLESS_PLAYBACK);
@ -406,6 +408,7 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
defaultArtists.setSummary(defaultArtists.getEntry());
defaultSongs.setSummary(defaultSongs.getEntry());
chatRefreshInterval.setSummary(chatRefreshInterval.getEntry());
directoryCacheTime.setSummary(directoryCacheTime.getEntry());
if (!mediaButtonsEnabled.isChecked()) {
lockScreenEnabled.setChecked(false);

View File

@ -33,7 +33,6 @@ import com.thejoshwa.ultrasonic.androidapp.domain.Indexes;
import com.thejoshwa.ultrasonic.androidapp.domain.JukeboxStatus;
import com.thejoshwa.ultrasonic.androidapp.domain.Lyrics;
import com.thejoshwa.ultrasonic.androidapp.domain.MusicDirectory;
import com.thejoshwa.ultrasonic.androidapp.domain.MusicDirectory.Entry;
import com.thejoshwa.ultrasonic.androidapp.domain.MusicFolder;
import com.thejoshwa.ultrasonic.androidapp.domain.Playlist;
import com.thejoshwa.ultrasonic.androidapp.domain.SearchCritera;
@ -51,8 +50,7 @@ import com.thejoshwa.ultrasonic.androidapp.util.Util;
*/
public class CachedMusicService implements MusicService {
private static final int MUSIC_DIR_CACHE_SIZE = 50;
private static final int TTL_MUSIC_DIR = 5 * 60; // Five minutes
private static final int MUSIC_DIR_CACHE_SIZE = 100;
private final MusicService musicService;
private final LRUCache<String, TimeLimitedCache<MusicDirectory>> cachedMusicDirectories;
@ -138,10 +136,12 @@ public class CachedMusicService implements MusicService {
public MusicDirectory getMusicDirectory(String id, String name, boolean refresh, Context context, ProgressListener progressListener) throws Exception {
checkSettingsChanged(context);
TimeLimitedCache<MusicDirectory> cache = refresh ? null : cachedMusicDirectories.get(id);
MusicDirectory dir = cache == null ? null : cache.get();
if (dir == null) {
dir = musicService.getMusicDirectory(id, name, refresh, context, progressListener);
cache = new TimeLimitedCache<MusicDirectory>(TTL_MUSIC_DIR, TimeUnit.SECONDS);
cache = new TimeLimitedCache<MusicDirectory>(Util.getDirectoryCacheTime(context), TimeUnit.SECONDS);
cache.set(dir);
cachedMusicDirectories.put(id, cache);
}
@ -155,7 +155,7 @@ public class CachedMusicService implements MusicService {
MusicDirectory dir = cache == null ? null : cache.get();
if (dir == null) {
dir = musicService.getArtist(id, name, refresh, context, progressListener);
cache = new TimeLimitedCache<MusicDirectory>(TTL_MUSIC_DIR, TimeUnit.SECONDS);
cache = new TimeLimitedCache<MusicDirectory>(Util.getDirectoryCacheTime(context), TimeUnit.SECONDS);
cache.set(dir);
cachedArtist.put(id, cache);
}
@ -169,7 +169,7 @@ public class CachedMusicService implements MusicService {
MusicDirectory dir = cache == null ? null : cache.get();
if (dir == null) {
dir = musicService.getAlbum(id, name, refresh, context, progressListener);
cache = new TimeLimitedCache<MusicDirectory>(TTL_MUSIC_DIR, TimeUnit.SECONDS);
cache = new TimeLimitedCache<MusicDirectory>(Util.getDirectoryCacheTime(context), TimeUnit.SECONDS);
cache.set(dir);
cachedAlbum.put(id, cache);
}

View File

@ -117,6 +117,7 @@ public final class Constants {
public static final String PREFERENCES_KEY_ID3_TAGS = "useId3Tags";
public static final String PREFERENCES_KEY_TEMP_LOSS = "tempLoss";
public static final String PREFERENCES_KEY_CHAT_REFRESH_INTERVAL = "chatRefreshInterval";
public static final String PREFERENCES_KEY_DIRECTORY_CACHE_TIME = "directoryCacheTime";
// Name of the preferences file.
public static final String PREFERENCES_FILE_NAME = "com.thejoshwa.ultrasonic.androidapp_preferences";

View File

@ -1242,6 +1242,11 @@ public class Util extends DownloadActivity {
return Integer.parseInt(prefs.getString(Constants.PREFERENCES_KEY_CHAT_REFRESH_INTERVAL, "5000"));
}
public static int getDirectoryCacheTime(Context context) {
SharedPreferences prefs = getPreferences(context);
return Integer.parseInt(prefs.getString(Constants.PREFERENCES_KEY_DIRECTORY_CACHE_TIME, "300"));
}
public static boolean isNullOrWhiteSpace(String string) {
return string == null || string.isEmpty() || string.trim().isEmpty();
}