public
Description: Lightweight console-based radio player for Last.FM radio streams.
Homepage: http://nex.scrapping.cc/code/shell-fm/
Clone URL: git://github.com/jkramer/shell-fm.git
Applied another patch from Lars-Dominik Braun, fixing the negative ETAs.
jkramer (author)
Fri Apr 25 08:32:54 -0700 2008
commit  72bff1f2748d2237de9a3e59592cd88af1a4df02
tree    1b59e4e23fa042d2ff4f66ebd897595a770aa8b7
parent  50aa9f76934b5456572af9099cd214fdffe8aebe
...
397
398
399
400
 
 
 
 
 
 
 
401
402
403
...
397
398
399
 
400
401
402
403
404
405
406
407
408
409
0
@@ -397,7 +397,13 @@ int main(int argc, char ** argv) {
0
       set(& track, "remain", remstr);
0
 
0
       if(!background) {
0
- printf("%c%02d:%02d%c", remain < 0 ? '-' : ' ', remain / 60, remain % 60, batch ? '\n' : '\r');
0
+ printf(
0
+ "%c%02d:%02d%c",
0
+ remain < 0 ? '-' : ' ',
0
+ (remain >= 0) ? (remain / 60) : (-remain / 60),
0
+ (remain >= 0) ? (remain % 60) : (-remain % 60),
0
+ batch ? '\n' : '\r'
0
+ );
0
         fflush(stdout);
0
       }
0
     }

Comments

    No one has commented yet.