• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/minidlna/minidlna.07.26/

Lines Matching defs:path

58 	char *path;	/* watched path */
73 return w->path;
81 add_watch(int fd, const char * path)
86 wd = inotify_add_watch(fd, path, IN_CREATE|IN_CLOSE_WRITE|IN_DELETE|IN_MOVE);
89 DPRINTF(E_ERROR, L_INOTIFY, "inotify_add_watch(%s) [%s]\n", path, strerror(errno));
101 nw->path = strdup(path);
118 remove_watch(int fd, const char * path)
124 if( strcmp(path, w->path) == 0 )
195 add_watch(fd, media_path->path);
220 if( w->path )
221 free(w->path);
230 int add_dir_watch(int fd, char * path, char * filename)
239 asprintf(&buf, "%s/%s", path, filename);
241 buf = strdup(path);
278 inotify_insert_file(char * name, const char * path)
283 char * last_dir = strdup(path);
284 char * path_buf = strdup(path);
285 char * base_name = malloc(strlen(path));
295 if( is_image(path) )
296 update_if_album_art(path);
297 else if( ends_with(path, ".srt") )
298 check_for_captions(path, 0);
303 if( strncmp(path, media_path->path, strlen(media_path->path)) == 0 )
313 if( !is_image(path) &&
314 !is_audio(path) &&
315 !is_video(path) &&
316 !is_playlist(path) )
320 if( !is_audio(path) &&
321 !is_playlist(path) )
325 if( !is_video(path) )
329 if( !is_image(path) )
338 if( stat(path, &st) != 0 )
341 sql = sqlite3_mprintf("SELECT TIMESTAMP from DETAILS where PATH = '%q'", path);
348 DPRINTF(E_DEBUG, L_INOTIFY, "%s is newer than the last db entry.\n", path);
361 else if( is_playlist(path) && (sql_get_int_field(db, "SELECT ID from PLAYLISTS where PATH = '%q'", path) > 0) )
363 DPRINTF(E_DEBUG, L_INOTIFY, "Re-reading modified playlist.\n", path);
374 strcpy(path_buf, path);
412 strcpy(path_buf, path);
421 insert_file(name, path, id+2, get_next_available_id("OBJECTS", id));
423 if( (is_audio(path) || is_playlist(path)) && next_pl_fill != 1 )
433 inotify_insert_directory(int fd, char *name, const char * path)
447 parent_buf = dirname(strdup(path));
453 insert_directory(name, path, BROWSEDIR_ID, id+2, get_next_available_id("OBJECTS", id));
459 wd = add_watch(fd, path);
466 DPRINTF(E_INFO, L_INOTIFY, "Added watch to %s [%d]\n", path, wd);
472 if( strncmp(path, media_path->path, strlen(media_path->path)) == 0 )
480 ds = opendir(path);
493 asprintf(&path_buf, "%s/%s", path, e->d_name);
524 inotify_remove_file(const char * path)
534 playlist = is_playlist(path);
535 sql = sqlite3_mprintf("SELECT ID from %s where PATH = '%q'", playlist?"PLAYLISTS":"DETAILS", path);
595 asprintf(&art_cache, "%s/art_cache%s", db_path, path);
603 inotify_remove_directory(int fd, const char * path)
610 remove_watch(fd, path);
612 " UNION ALL SELECT ID from DETAILS where PATH = '%q'", path, path);
629 sql_exec(db, "DELETE from ALBUM_ART where PATH glob '%q/*'", path);