diff --git a/FoliCon/Modules/ClickBehavior.cs b/FoliCon/Modules/ClickBehavior.cs index a7a3292b..c51b6f40 100644 --- a/FoliCon/Modules/ClickBehavior.cs +++ b/FoliCon/Modules/ClickBehavior.cs @@ -4,7 +4,6 @@ using System.Windows.Input; using System.Windows.Threading; using Microsoft.Xaml.Behaviors; -using Prism.Commands; namespace FoliCon.Modules { diff --git a/FoliCon/Modules/IGDBClass.cs b/FoliCon/Modules/IGDBClass.cs index bb2fa6e3..6b721769 100644 --- a/FoliCon/Modules/IGDBClass.cs +++ b/FoliCon/Modules/IGDBClass.cs @@ -100,7 +100,7 @@ public void ResultPicked(Game result, string fullFolderPath, string rating = "") var year = result.FirstReleaseDate != null ? result.FirstReleaseDate.Value.Year.ToString(CultureInfo.InvariantCulture) : ""; var posterUrl = ImageHelper.GetImageUrl(result.Cover.Value.ImageId, ImageSize.HD720); Util.AddToPickedListDataTable(_listDataTable, localPosterPath, result.Name, rating, fullFolderPath, folderName, - year, (int)(result.Id ?? 0)); + year); if (result.Id != null) Util.SaveMediaInfo((int)result.Id, "Game", fullFolderPath); var tempImage = new ImageToDownload { diff --git a/FoliCon/Modules/LangProvider.cs b/FoliCon/Modules/LangProvider.cs index 4c7313f5..38090cdc 100644 --- a/FoliCon/Modules/LangProvider.cs +++ b/FoliCon/Modules/LangProvider.cs @@ -3,6 +3,7 @@ using System.Windows; using System.Windows.Data; using HandyControl.Tools; +// ReSharper disable InconsistentNaming namespace FoliCon.Properties.Langs { diff --git a/FoliCon/Modules/TMDB.cs b/FoliCon/Modules/TMDB.cs index e4ef465a..2961a257 100644 --- a/FoliCon/Modules/TMDB.cs +++ b/FoliCon/Modules/TMDB.cs @@ -187,6 +187,7 @@ public static ObservableCollection ExtractTvDetailsIntoListItem(Search return items; } + /// /// Prepares the Selected Result for Download And final List View /// @@ -194,6 +195,7 @@ public static ObservableCollection ExtractTvDetailsIntoListItem(Search /// Type of search Response. /// Full Path to the current Media Folder /// Rating for media + /// identifies if Title was picked by media ID. /// TODO: Merge parameter response and resultType. public void ResultPicked(dynamic result, string resultType, string fullFolderPath, string rating = "",bool isPickedById = false) { @@ -218,7 +220,7 @@ public void ResultPicked(dynamic result, string resultType, string fullFolderPat var year = pickedResult.FirstAirDate != null ? pickedResult.FirstAirDate.Year.ToString(CultureInfo.InvariantCulture) : ""; Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Name, rating, fullFolderPath, folderName, - year, pickedResult.Id); + year); id = pickedResult.Id; } else if (resultType == MediaTypes.Movie) @@ -226,14 +228,14 @@ public void ResultPicked(dynamic result, string resultType, string fullFolderPat dynamic pickedResult = isPickedById ? (Movie)result : (SearchMovie)result; var year = pickedResult.ReleaseDate != null ? pickedResult.ReleaseDate.Year.ToString(CultureInfo.InvariantCulture) : ""; Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Title, - rating, fullFolderPath, folderName, year, pickedResult.Id); + rating, fullFolderPath, folderName, year); id = pickedResult.Id; } else if (resultType == MediaTypes.Collection) { dynamic pickedResult = isPickedById ? (Collection)result : (SearchCollection)result; Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Name, rating, fullFolderPath, - folderName, "", pickedResult.Id); + folderName, ""); id = pickedResult.Id; } else if (resultType == MediaTypes.Mtv) @@ -250,7 +252,7 @@ public void ResultPicked(dynamic result, string resultType, string fullFolderPat : ""; Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Name, rating, fullFolderPath, folderName, - year, pickedResult.Id); + year); id = pickedResult.Id; break; } @@ -263,7 +265,7 @@ public void ResultPicked(dynamic result, string resultType, string fullFolderPat : ""; Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Title, rating, fullFolderPath, folderName, - year, pickedResult.Id); + year); id = pickedResult.Id; break; } @@ -323,11 +325,10 @@ public async Task SearchAsync(string query, string searchMode) }; return response; } + /// - /// Searches TMDB for a query in Specified search mode + /// Searches TMDB media by ID as per media Type. /// - /// Title to search - /// Search Mode such as Movie,TV /// Returns Search result with its Media Type public ResultResponse SearchByIdAsync(int id, string mediaType) { diff --git a/FoliCon/Modules/Util.cs b/FoliCon/Modules/Util.cs index cbf61fc6..1971360e 100644 --- a/FoliCon/Modules/Util.cs +++ b/FoliCon/Modules/Util.cs @@ -259,7 +259,7 @@ public static VistaFolderBrowserDialog NewFolderBrowserDialog(string description /// Short Folder Name /// Media Year public static void AddToPickedListDataTable(DataTable dataTable, string poster, string title, string rating, - string fullFolderPath, string folderName, string year = "", int id = 0) + string fullFolderPath, string folderName, string year = "") { if (rating == "0") { @@ -449,7 +449,8 @@ public static int MakeIco(string iconMode, string selectedFolder, DataTable pick /// if Wants to Include rating on Icon /// Show rating or NOT /// Is Cover Mockup visible. - public static void BuildFolderIco(string iconMode, string filmFolderPath, string rating, + /// Title of the media. + private static void BuildFolderIco(string iconMode, string filmFolderPath, string rating, string ratingVisibility, string mockupVisibility, string mediaTitle) { if (!File.Exists(filmFolderPath)) diff --git a/FoliCon/Views/AboutBox.xaml b/FoliCon/Views/AboutBox.xaml index d2269750..4da9587f 100644 --- a/FoliCon/Views/AboutBox.xaml +++ b/FoliCon/Views/AboutBox.xaml @@ -1,7 +1,6 @@  - + FontStyle="Italic" Foreground="Black" /> diff --git a/FoliCon/Views/MainWindow.xaml.cs b/FoliCon/Views/MainWindow.xaml.cs index 1b4de053..269d5636 100644 --- a/FoliCon/Views/MainWindow.xaml.cs +++ b/FoliCon/Views/MainWindow.xaml.cs @@ -1,14 +1,12 @@ using FoliCon.Modules; using System.Collections.Specialized; using System.ComponentModel; -using System.Globalization; using System.Threading; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using FoliCon.Models; using FoliCon.Properties.Langs; -using HandyControl.Tools; using Vanara.PInvoke; namespace FoliCon.Views diff --git a/FoliCon/Views/PosterIconLiaher.xaml.cs b/FoliCon/Views/PosterIconLiaher.xaml.cs index 8a74be01..70cd9f68 100644 --- a/FoliCon/Views/PosterIconLiaher.xaml.cs +++ b/FoliCon/Views/PosterIconLiaher.xaml.cs @@ -1,19 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Drawing; +using System.Drawing; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; namespace FoliCon.Views { diff --git a/FoliCon/Views/ProSearchResult.xaml.cs b/FoliCon/Views/ProSearchResult.xaml.cs index 06323798..3eb71d26 100644 --- a/FoliCon/Views/ProSearchResult.xaml.cs +++ b/FoliCon/Views/ProSearchResult.xaml.cs @@ -5,7 +5,7 @@ /// public partial class ProSearchResult { - private bool AutoScroll = true; + private bool _autoScroll = true; public ProSearchResult() { @@ -17,11 +17,11 @@ private void ScrollViewer_ScrollChanged(object sender, System.Windows.Controls.S if (e.ExtentHeightChange == 0) { - AutoScroll = scrollViewer.VerticalOffset == scrollViewer.ScrollableHeight; + _autoScroll = scrollViewer.VerticalOffset == scrollViewer.ScrollableHeight; } - if (AutoScroll && e.ExtentHeightChange != 0) + if (_autoScroll && e.ExtentHeightChange != 0) { scrollViewer.ScrollToVerticalOffset(scrollViewer.ExtentHeight); } diff --git a/FoliCon/Views/SearchResult.xaml.cs b/FoliCon/Views/SearchResult.xaml.cs index ddbd456c..846a455f 100644 --- a/FoliCon/Views/SearchResult.xaml.cs +++ b/FoliCon/Views/SearchResult.xaml.cs @@ -4,8 +4,6 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Data; -using System.Windows.Input; -using FoliCon.Models; namespace FoliCon.Views { diff --git a/FoliCon/Views/posterIconConfig.xaml b/FoliCon/Views/posterIconConfig.xaml index 7e64c0c8..00175377 100644 --- a/FoliCon/Views/posterIconConfig.xaml +++ b/FoliCon/Views/posterIconConfig.xaml @@ -2,7 +2,6 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:prism="http://prismlibrary.com/" - xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:modules="clr-namespace:FoliCon.ViewModels" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" @@ -20,7 +19,7 @@