Beispiel #1
0
        private void SetTransferFilename(FileTransfer ft)
        {
            if (ft != null)
            {
                string uri = ServiceManager.DbConnection.Query <string> (
                    "SELECT Uri FROM CoreTracks WHERE TrackID = ?", ft.OriginalFilename);

                if (uri != null)
                {
                    ft.Filename = new SafeUri(uri).LocalPath;
                    ft.Start();
                }
                else
                {
                    Log.DebugFormat("Unable to get Uri for FileTransfer. Closing transfer.");
                    ft.Close();
                }
            }
        }