Changes

Jump to navigation Jump to search
1,434 bytes added ,  00:24, 26 November 2007
→‎kPlaylist Usage: added cronjob
Line 134: Line 134:  
  $cfg['getid3include'] = '/opt/kplaylist/getid3/getid3/getid3.php';
 
  $cfg['getid3include'] = '/opt/kplaylist/getid3/getid3/getid3.php';
 
Save the file and check if it's working: log in as a admin to kPlaylist, click on Settings and then on 'Filehandling'. If 'Write id3v2 with stream' is not disabled, getid3 should be working. You should also see the version number in the right.
 
Save the file and check if it's working: log in as a admin to kPlaylist, click on Settings and then on 'Filehandling'. If 'Write id3v2 with stream' is not disabled, getid3 should be working. You should also see the version number in the right.
 +
==Cron job==
 +
A cron job can be created to update kPlaylist's database. This has the same effect of clicking on "Update" button in Administration console.
 +
 +
Edit '''''/opt/kplaylist/html/index.php''''' and modify following lines:
 +
*Line 125, enable autoupdate
 +
$cfg['autoupdate'] = 1;
 +
*Optionnaly, uncomment lines 8977, 8978 and 8979
 +
$options['deleteunused'] = 1;  # Uncomment if you want to remove deleted files from the database
 +
$options['rebuildid3'] = 1;    # Uncomment
 +
$options['debugmode'] = 1;    # Uncomment if you want to enable debug mode
 +
You can check that it's working at http://yourserver/kplaylist/index.php?update=5000&user=autooperate
 +
 +
You should get this message: '''Wrong host (YOUR IP) or user (autooperate) for update.'''
 +
 +
 +
Create a template called ''kplaylist'' in '''''/etc/e-smith/templates/etc/cron.d/''''' and paste the following code in it:
 +
# kPlaylist database update cron job
 +
 +
# ___________ Minute      (from 0 to 59)
 +
#|  ________ Hour        (from 0 to 23)
 +
#|  |  ______ Day        (from 1 to 31)
 +
#|  | |  ____ Month      (from 1 to 12)
 +
#|  | | |  __ Day of week (from 0 to 6 - 0 is sunday)
 +
#|  | | | |
 +
#v  v v v v
 +
30 23 * * * /usr/bin/lynx -dump "http://127.0.0.1/kplaylist/index.php?update=5000&user=autooperate"
 +
Save the file and apply modifications with the following command:
 +
expand-template /etc/cron.d/kplaylist
 +
Now each day at 23:30 the server will auto-update kPlaylist database.
    
=Additional information=
 
=Additional information=
498

edits

Navigation menu