data-mp3.c
branchtrunk
changeset 22 93aaf15c145a
parent 19 306cc35c7faa
child 29 640ce9201139
equal deleted inserted replaced
21:e47abd1f520f 22:93aaf15c145a
     1 /*
     1 /*
     2  * MP3/MPlayer plugin to VDR (C++)
     2  * MP3/MPlayer plugin to VDR (C++)
     3  *
     3  *
     4  * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
     4  * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or
     6  * This code is free software; you can redistribute it and/or
     7  * modify it under the terms of the GNU General Public License
     7  * modify it under the terms of the GNU General Public License
     8  * as published by the Free Software Foundation; either version 2
     8  * as published by the Free Software Foundation; either version 2
     9  * of the License, or (at your option) any later version.
     9  * of the License, or (at your option) any later version.
   139   decoder=0; user=0; image=0; conv=0; queueStat=0;
   139   decoder=0; user=0; image=0; conv=0; queueStat=0;
   140   fromDOS=decoderFailed=false;
   140   fromDOS=decoderFailed=false;
   141   obj->Source()->Block();
   141   obj->Source()->Block();
   142 }
   142 }
   143 
   143 
   144 #if APIVERSNUM >= 10315
       
   145 int cSong::Compare(const cListObject &ListObject) const
   144 int cSong::Compare(const cListObject &ListObject) const
   146 #else
       
   147 bool cSong::operator<(const cListObject &ListObject)
       
   148 #endif
       
   149 {
   145 {
   150   cSong *song=(cSong *)&ListObject;
   146   cSong *song=(cSong *)&ListObject;
   151 #if APIVERSNUM >= 10315
       
   152   return strcasecmp(obj->Path(),song->obj->Path());
   147   return strcasecmp(obj->Path(),song->obj->Path());
   153 #else
       
   154   return strcasecmp(obj->Path(),song->obj->Path())<0;
       
   155 #endif
       
   156 }
   148 }
   157 
   149 
   158 cSongInfo *cSong::Info(bool get)
   150 cSongInfo *cSong::Info(bool get)
   159 {
   151 {
   160   Decoder();
   152   Decoder();
   403     int l=strlen(basename)-strlen(PLAYLISTEXT);
   395     int l=strlen(basename)-strlen(PLAYLISTEXT);
   404     if(l>0 && !strcasecmp(basename+l,PLAYLISTEXT)) basename[l]=0;
   396     if(l>0 && !strcasecmp(basename+l,PLAYLISTEXT)) basename[l]=0;
   405     }
   397     }
   406 }
   398 }
   407 
   399 
   408 #if APIVERSNUM >= 10315
       
   409 int cPlayList::Compare(const cListObject &ListObject) const
   400 int cPlayList::Compare(const cListObject &ListObject) const
   410 #else
       
   411 bool cPlayList::operator<(const cListObject &ListObject)
       
   412 #endif
       
   413 {
   401 {
   414   cPlayList *list=(cPlayList *)&ListObject;
   402   cPlayList *list=(cPlayList *)&ListObject;
   415 #if APIVERSNUM >= 10315
       
   416   return strcasecmp(obj->Name(),list->obj->Name());
   403   return strcasecmp(obj->Name(),list->obj->Name());
   417 #else
       
   418   return strcasecmp(obj->Name(),list->obj->Name())<0;
       
   419 #endif
       
   420 }
   404 }
   421 
   405 
   422 bool cPlayList::Load(void)
   406 bool cPlayList::Load(void)
   423 {
   407 {
   424   Clear();
   408   Clear();