diff options
Diffstat (limited to 'apps/bookmark.c')
-rw-r--r-- | apps/bookmark.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c index b8d41c7464..b2ff1aafbc 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -94,7 +94,7 @@ static const char* get_bookmark_info(int list_index, | |||
94 | char *buffer, | 94 | char *buffer, |
95 | size_t buffer_len); | 95 | size_t buffer_len); |
96 | static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resume); | 96 | static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resume); |
97 | static bool system_check(void); | 97 | static bool is_bookmarkable_state(void); |
98 | static bool write_bookmark(bool create_bookmark_file, const char *bookmark); | 98 | static bool write_bookmark(bool create_bookmark_file, const char *bookmark); |
99 | static int get_bookmark_count(const char* bookmark_file_name); | 99 | static int get_bookmark_count(const char* bookmark_file_name); |
100 | 100 | ||
@@ -125,7 +125,7 @@ bool bookmark_create_menu(void) | |||
125 | /* ----------------------------------------------------------------------- */ | 125 | /* ----------------------------------------------------------------------- */ |
126 | bool bookmark_load_menu(void) | 126 | bool bookmark_load_menu(void) |
127 | { | 127 | { |
128 | if (system_check()) | 128 | if (is_bookmarkable_state()) |
129 | { | 129 | { |
130 | char* name = playlist_get_name(NULL, global_temp_buffer, | 130 | char* name = playlist_get_name(NULL, global_temp_buffer, |
131 | sizeof(global_temp_buffer)); | 131 | sizeof(global_temp_buffer)); |
@@ -167,11 +167,11 @@ bool bookmark_autobookmark(bool prompt_ok) | |||
167 | { | 167 | { |
168 | char* bookmark; | 168 | char* bookmark; |
169 | bool update = false; | 169 | bool update = false; |
170 | if (!system_check()) | 170 | if (!is_bookmarkable_state()) |
171 | return false; | 171 | return false; |
172 | 172 | ||
173 | audio_pause(); /* first pause playback */ | 173 | audio_pause(); /* first pause playback */ |
174 | if (global_settings.autoupdatebookmark && bookmark_exist()) | 174 | if (global_settings.autoupdatebookmark && bookmark_exists()) |
175 | update = true; | 175 | update = true; |
176 | bookmark = create_bookmark(); | 176 | bookmark = create_bookmark(); |
177 | /* Workaround for inability to speak when paused: all callers will | 177 | /* Workaround for inability to speak when paused: all callers will |
@@ -324,7 +324,7 @@ static char* create_bookmark() | |||
324 | int resume_index = 0; | 324 | int resume_index = 0; |
325 | char *file; | 325 | char *file; |
326 | 326 | ||
327 | if (!system_check()) | 327 | if (!is_bookmarkable_state()) |
328 | return NULL; /* something didn't happen correctly, do nothing */ | 328 | return NULL; /* something didn't happen correctly, do nothing */ |
329 | 329 | ||
330 | /* grab the currently playing track */ | 330 | /* grab the currently playing track */ |
@@ -1063,11 +1063,11 @@ static bool generate_bookmark_file_name(const char *in) | |||
1063 | /* ----------------------------------------------------------------------- */ | 1063 | /* ----------------------------------------------------------------------- */ |
1064 | /* Returns true if a bookmark file exists for the current playlist */ | 1064 | /* Returns true if a bookmark file exists for the current playlist */ |
1065 | /* ----------------------------------------------------------------------- */ | 1065 | /* ----------------------------------------------------------------------- */ |
1066 | bool bookmark_exist(void) | 1066 | bool bookmark_exists(void) |
1067 | { | 1067 | { |
1068 | bool exist=false; | 1068 | bool exist=false; |
1069 | 1069 | ||
1070 | if(system_check()) | 1070 | if(is_bookmarkable_state()) |
1071 | { | 1071 | { |
1072 | char* name = playlist_get_name(NULL, global_temp_buffer, | 1072 | char* name = playlist_get_name(NULL, global_temp_buffer, |
1073 | sizeof(global_temp_buffer)); | 1073 | sizeof(global_temp_buffer)); |
@@ -1084,7 +1084,7 @@ bool bookmark_exist(void) | |||
1084 | /* Checks the current state of the system and returns true if it is in a */ | 1084 | /* Checks the current state of the system and returns true if it is in a */ |
1085 | /* bookmarkable state. */ | 1085 | /* bookmarkable state. */ |
1086 | /* ----------------------------------------------------------------------- */ | 1086 | /* ----------------------------------------------------------------------- */ |
1087 | static bool system_check(void) | 1087 | static bool is_bookmarkable_state(void) |
1088 | { | 1088 | { |
1089 | int resume_index = 0; | 1089 | int resume_index = 0; |
1090 | 1090 | ||