Exemplo n.º 1
0
        /// <summary>
        /// Imports the specified input folder.
        /// </summary>
        /// <param name="inputFolder">The input folder.</param>
        private void Import(string inputFolder)
        {
            File.WriteAllLines(@"C:\Users\proud\Desktop\args.txt", new[] { inputFolder });
            var destPath = this.MoveTargetFolder(inputFolder);

            Debug.WriteLine(destPath);
            FileBot.GetSubtitles(destPath);
            PlexMediaScanner.Update();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Called when [new file downloaded].
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="e">The <see cref="FileSystemEventArgs"/> instance containing the event data.</param>
        private void OnNewFileDownloaded(object source, FileSystemEventArgs e)
        {
            //If file extension is correct
            if (!Properties.Settings.Default.SupportedFormats.Contains(Path.GetExtension(e.FullPath)))
            {
                Logger.Info("PiPlex:OnNewFileDownloaded", "Ignoring file " + e.Name);
                return;
            }
            else
            {
                Logger.Info("PiPlex:OnNewFileDownloaded", "Handling file " + e.Name);
            }

            // MOVE FILE TO PROPER PLEX FOLDER
            string newFilePath = HandleVideoFileType(e.FullPath);


            // UPDATE PLEX LIBRAIRY
            PlexMediaScanner.Update();

            // DONE
            notifyIcon.Tag = newFilePath;
            notifyIcon.ShowBalloonTip(5 * 1000, "PiPlex", newFilePath, ToolTipIcon.Info);
        }