+ const char *path = edl->path;
+ Track *track=edl->tracks->first;
+ for(; (!path || !*path) && track; track=track->next ) {
+ if( !track->record ) continue;
+ Edit *edit = track->edits->editof(start, PLAY_FORWARD, 0);
+ if( !edit ) continue;
+ Indexable *indexable = edit->get_source();
+ if( !indexable ) continue;
+ path = indexable->path;
+ }
+
+ time_t now; time(&now);
+ struct tm *tm = localtime(&now);
+ char *cp = new_edl->local_session->clip_notes;
+ int n, sz = sizeof(new_edl->local_session->clip_notes)-1;
+ if( txt && *txt ) {
+ n = snprintf(cp, sz, "%s", txt);
+ cp += n; sz -= n;
+ }
+ n = snprintf(cp, sz,
+ "%02d/%02d/%02d %02d:%02d:%02d, +%s\n",
+ tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec, duration);
+ cp += n; sz -= n;
+ if( path && *path ) {
+ FileSystem fs;
+ char title[BCTEXTLEN];
+ fs.extract_name(title, path);
+ n = snprintf(cp, sz, "%s", title);
+ cp += n; sz -= n;
+ }
+ cp[n] = 0;