public static void StartScanner()
        {
            Hyena.Log.DebugFormat("[RippedFileScanner] <StartScanner> Started. Dir: {0}", basepath);

            if (folder_scanner == null)
            {
                folder_scanner = new Thread(ScannerThread);

                if (Directory.Exists(basepath))
                {
                    RippedFileScanner.SetScanDirectory(basepath);
                    folder_scanner.Start();
                }
            }
        }
        /// <summary>
        /// Initializes all parameters for recording a track
        /// </summary>
        /// <param name="track_in">
        /// A <see cref="TrackInfo"/> that is to be recorded
        /// </param>
        /// <returns>
        /// A <see cref="System.Boolean"/> indicating if all parameters could successfully be initialized
        /// </returns>
        private bool InitStreamrecorderProcess(TrackInfo track_in)
        {
            if (String.IsNullOrEmpty(output_directory))
            {
                output_directory = Banshee.ServiceStack.ServiceManager.SourceManager.MusicLibrary.BaseDirectory
                                   + Path.DirectorySeparatorChar + "ripped";
                Hyena.Log.DebugFormat("[StreamrecorderService] <InitStreamrecorderProcess> output directory not set, using: {0}", output_directory);
            }

            if (!Directory.Exists(output_directory))
            {
                Hyena.Log.Debug("[StreamrecorderService] <InitStreamrecorderProcess> output directory does not exist, creating.");
                Directory.CreateDirectory(output_directory);
            }

            if (track_in == null)
            {
                return(false);
            }

            if (track_in.Uri == null || track_in.Uri.IsLocalPath)
            {
                Hyena.Log.Debug("[StreamrecorderService] <InitStreamrecorderProcess> Not recording local files");
                return(false);
            }

            DateTime       dt      = DateTime.Now;
            string         datestr = String.Format("{0:d_M_yyyy_HH_mm_ss}", dt);
            string         filename;
            RadioTrackInfo radio_track = track as RadioTrackInfo;

            //split only if Artist AND Title are present, i.e. stream sends complete metadata
            //do not set extension, will be done by recorder!
            if (is_splitting_enabled && track.ArtistName != null && track.ArtistName.Length > 0)
            {
                filename = recorder.SetMetadataFilename(track.TrackTitle, track.ArtistName);
            }
            else
            {
                filename = (radio_track.ParentTrack == null ? track.TrackTitle : radio_track.ParentTrack.TrackTitle) + "_" + datestr;
            }

            recorder.SetOutputParameters(output_directory, filename);

            RippedFileScanner.SetScanDirectory(output_directory);

            return(true);
        }
 /// <summary>
 /// stops the folder scanner
 /// </summary>
 public void StopFolderScanner()
 {
     RippedFileScanner.StopScanner();
 }
 /// <summary>
 /// starts the folder scanner
 /// </summary>
 public void StartFolderScanner()
 {
     RippedFileScanner.StartScanner();
 }