~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to gui/win32/playlist.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
/* TODO: implement sort_playlist */
31
31
 
32
 
BOOL adddirtoplaylist(playlist_t *playlist, const char *path, BOOL recursive)
 
32
int adddirtoplaylist(playlist_t *playlist, const char *path, int recursive)
33
33
{
34
34
    HANDLE findHandle = INVALID_HANDLE_VALUE;
35
35
    WIN32_FIND_DATA finddata;
36
36
    char findpath[MAX_PATH], filename[MAX_PATH];
37
37
    char *filepart;
38
38
 
39
 
    sprintf(findpath, "%s\\*.*", path);
 
39
    sprintf(findpath, "%s/*.*", path);
40
40
 
41
41
    findHandle = FindFirstFile(findpath, &finddata);
42
42
 
43
 
    if (findHandle == INVALID_HANDLE_VALUE) return FALSE;
 
43
    if (findHandle == INVALID_HANDLE_VALUE) return 0;
44
44
    do
45
45
    {
46
46
        if (finddata.cFileName[0] == '.' || strstr(finddata.cFileName, "Thumbs.db")) continue;
47
 
        sprintf(findpath, "%s\\%s", path, finddata.cFileName);
 
47
        sprintf(findpath, "%s/%s", path, finddata.cFileName);
48
48
 
49
49
        if (GetFileAttributes(findpath) & FILE_ATTRIBUTE_DIRECTORY)
50
50
        {
58
58
        }
59
59
    } while (FindNextFile(findHandle, &finddata));
60
60
    FindClose(findHandle);
61
 
    return TRUE;
 
61
    return 1;
62
62
}
63
63
 
64
64
static void add_track(playlist_t *playlist, const char *filename, const char *artist, const char *title, int duration)