Skip to content

Commit

Permalink
Add release 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
NV committed Nov 9, 2017
1 parent 0f03a13 commit ac615f5
Show file tree
Hide file tree
Showing 143 changed files with 127,679 additions and 79 deletions.
Binary file modified .vs/openplex/v14/.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion Assets/openplex-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0.1
0.2.0.2
4 changes: 2 additions & 2 deletions openplex/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.0.1")]
[assembly: AssemblyFileVersion("0.2.0.1")]
[assembly: AssemblyVersion("0.2.0.2")]
[assembly: AssemblyFileVersion("0.2.0.2")]
Binary file modified openplex/bin/Release/OpenPlex.exe
Binary file not shown.
Binary file modified openplex/bin/Release/OpenPlex.pdb
Binary file not shown.
Binary file modified openplex/bin/Release/en/OpenPlex.resources.dll
Binary file not shown.
4 changes: 4 additions & 0 deletions openplex/frmOpenPlex.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

106 changes: 56 additions & 50 deletions openplex/frmOpenPlex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,47 @@ private void frmOpenPlex_Load(object sender, EventArgs e)

void worker_DoWork(object sender, DoWorkEventArgs e)
{
if (File.Exists(pathData + "openplex-movies-db.txt"))
try
{
if (IsBelowThreshold(pathData + "openplex-movies-db.txt", 12) == true) // if movies db older than 12 hours then write db
if (File.Exists(pathData + "openplex-movies-db.txt"))
{
client.DownloadFile(new Uri(linkMovies), pathData + "openplex-movies-db.txt");
if (IsBelowThreshold(pathData + "openplex-movies-db.txt", 12) == true) // if movies db older than 12 hours then write db
{
client.DownloadFile(new Uri(linkMovies), pathData + "openplex-movies-db.txt");
}
}
}
else { client.DownloadFile(new Uri(linkMovies), pathData + "openplex-movies-db.txt"); }
else { client.DownloadFile(new Uri(linkMovies), pathData + "openplex-movies-db.txt"); }

dataMovies = File.ReadAllLines(pathData + "openplex-movies-db.txt");
dataMovies = File.ReadAllLines(pathData + "openplex-movies-db.txt");

if (File.Exists(pathData + "openplex-movies-db.json")) // if json db exists
{
if (IsBelowThreshold(pathData + "openplex-movies-db.json", 12) == true) // if movies json db older than 12 hours then write json db
if (File.Exists(pathData + "openplex-movies-db.json")) // if json db exists
{
if (IsBelowThreshold(pathData + "openplex-movies-db.json", 12) == true) // if movies json db older than 12 hours then write json db
{
if (File.Exists(pathData + "openplex-movies-db.json")) { File.Delete(pathData + "openplex-movies-db.json"); }
using (StreamWriter sw = File.CreateText(pathData + "openplex-movies-db.json"))
{
foreach (string movie in dataMovies)
{
try
{
string[] movieCredentials = movie.Split('~');
var jsonOMDb = client.DownloadString("http://omdbapi.com/?apikey=c933e052&t=" + movieCredentials[0] + "&y=" + movieCredentials[1] + "&plot=short");
var data = OMDbEntity.FromJson(jsonOMDb);
if (data.Response == "True")
{
data.Sources = movieCredentials[2].Split('*');
sw.WriteLine(data.ToJson());
}
}
catch { }
}
sw.Close();
sw.Dispose();
}
}
}
else // if json db doesn't exist
{
if (File.Exists(pathData + "openplex-movies-db.json")) { File.Delete(pathData + "openplex-movies-db.json"); }
using (StreamWriter sw = File.CreateText(pathData + "openplex-movies-db.json"))
Expand All @@ -173,52 +200,29 @@ void worker_DoWork(object sender, DoWorkEventArgs e)
sw.Dispose();
}
}
}
else // if json db doesn't exist
{
if (File.Exists(pathData + "openplex-movies-db.json")) { File.Delete(pathData + "openplex-movies-db.json"); }
using (StreamWriter sw = File.CreateText(pathData + "openplex-movies-db.json"))

dataMoviesJson = File.ReadAllLines(pathData + "openplex-movies-db.json");

foreach (string movie in dataMovies)
{
foreach (string movie in dataMovies)
string[] movieCredentials = movie.Split('~');
foreach (string movie1 in movieCredentials[2].Split('*'))
{
try
{
string[] movieCredentials = movie.Split('~');
var jsonOMDb = client.DownloadString("http://omdbapi.com/?apikey=c933e052&t=" + movieCredentials[0] + "&y=" + movieCredentials[1] + "&plot=short");
var data = OMDbEntity.FromJson(jsonOMDb);
if (data.Response == "True")
{
data.Sources = movieCredentials[2].Split('*');
sw.WriteLine(data.ToJson());
}
}
catch { }
dataFiles.Add(movie1);
}
sw.Close();
sw.Dispose();
}
}

dataMoviesJson = File.ReadAllLines(pathData + "openplex-movies-db.json");

foreach (string movie in dataMovies)
{
string[] movieCredentials = movie.Split('~');
foreach (string movie1 in movieCredentials[2].Split('*'))
foreach (string file in dataFiles.Take(100))
{
dataFiles.Add(movie1);
dataGrid.Rows.Add(Path.GetFileNameWithoutExtension(new Uri(file).LocalPath), Path.GetExtension(file).Replace(".", "").ToUpper(), new Uri(file).Host.Replace("www.", ""), file);
}
}

foreach (string file in dataFiles.Take(100))
{
dataGrid.Rows.Add(Path.GetFileNameWithoutExtension(new Uri(file).LocalPath), Path.GetExtension(file).Replace(".", "").ToUpper(), new Uri(file).Host.Replace("www.", ""), file);
}
catch (Exception ex) { MessageBox.Show("Unable to load movies.\n\n" + ex.Message); }
}

void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
loadMovies(38);
loadMovies(52);
Controls.Remove(frmSplash);
}

Expand All @@ -242,7 +246,6 @@ private object[] FetchMovieData()

if (data.Title.ToLower().Contains(txtMoviesSearchBox.Text.ToLower()) | data.Actors.ToLower().Contains(txtMoviesSearchBox.Text.ToLower()) | data.Year == txtMoviesSearchBox.Text && data.Genre.ToLower().Contains(selectedGenre.ToLower()))
{
countedMovies += 1;
ctrlMoviesPoster ctrlPoster = new ctrlMoviesPoster();
ctrlPoster.infoTitle.Text = data.Title;
ctrlPoster.infoYear.Text = data.Year;
Expand All @@ -264,13 +267,16 @@ private object[] FetchMovieData()

try
{
string jsonData = client.DownloadString("https://tvv2.apifetch.website/movie/" + data.ImdbID);
string jsonData = client.DownloadString("https://tv-v2.api-fetch.website/movie/" + data.ImdbID);
var jsonDataPT = PopcornTimeEntity.FromJson(jsonData);
ctrlPoster.infoImageFanart = jsonDataPT.Images.Fanart;
ctrlPoster.infoTrailer = jsonDataPT.Trailer;
}
catch { }

return new object[] { ctrlPoster, data.ImdbID };
countedMovies += 1;

return new object[] { ctrlPoster, data.ImdbID, };
}
return new object[0];
}
Expand All @@ -296,8 +302,8 @@ public void loadMovies(int loadCount)
ctrlPoster.Show();
ctrlPoster.Name = ImdbID;
panelMovies.Controls.Add(ctrlPoster);
panelMovies.Controls.Add(ctrlPoster);
});
}

Expand Down Expand Up @@ -591,15 +597,15 @@ private void panelMovies_Scroll(object sender, ScrollEventArgs e)
VScrollProperties vs = panelMovies.VerticalScroll;
if (e.NewValue == vs.Maximum - vs.LargeChange + 1)
{
loadMovies(38);
loadMovies(52);
}
}

private void btnSearchMovies_ClickButtonArea(object Sender, MouseEventArgs e)
{
panelMovies.Controls.Clear();
countedMovies = 0;
loadMovies(38);
loadMovies(52);
}

private void imgAbout_Click(object sender, EventArgs e)
Expand All @@ -626,7 +632,7 @@ private void cmboBoxMoviesGenre_SelectedIndexChanged(object sender, EventArgs e)

panelMovies.Controls.Clear();
countedMovies = 0;
loadMovies(38);
loadMovies(52);
}

// Downloads
Expand Down
Binary file not shown.
40 changes: 18 additions & 22 deletions openplex/obj/Release/OpenPlex.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\OpenPlex.exe.config
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\OpenPlex.exe
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\OpenPlex.pdb
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\en\OpenPlex.resources.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\CButtonLib.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\ChreneLib.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\Newtonsoft.Json.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\CButtonLib.pdb
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\CButtonLib.xml
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\bin\Release\Newtonsoft.Json.xml
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\obj\Release\OpenPlex.ctrlDownloadItem.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\obj\Release\OpenPlex.frmOpenPlex.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\obj\Release\OpenPlex.Properties.Resources.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\obj\Release\OpenPlex.frmOpenPlex.en.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\obj\Release\OpenPlex.csproj.GenerateResource.Cache
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\obj\Release\en\OpenPlex.resources.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\obj\Release\OpenPlex.exe
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\obj\Release\OpenPlex.pdb
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\openplex\openplex\obj\Release\OpenPlex.csprojResolveAssemblyReference.cache
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex 2.0\openplex\bin\Release\OpenPlex.exe.config
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex 2.0\openplex\bin\Release\OpenPlex.exe
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex 2.0\openplex\bin\Release\OpenPlex.pdb
Expand All @@ -43,10 +24,25 @@ C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex 2.0\openplex\obj\R
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex 2.0\openplex\bin\Release\HtmlAgilityPack.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex 2.0\openplex\bin\Release\HtmlAgilityPack.pdb
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex 2.0\openplex\bin\Release\HtmlAgilityPack.xml
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\HtmlAgilityPack.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\HtmlAgilityPack.pdb
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\HtmlAgilityPack.xml
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\OpenPlex.exe.config
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\OpenPlex.exe
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\OpenPlex.pdb
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\en\OpenPlex.resources.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\CButtonLib.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\ChreneLib.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\Newtonsoft.Json.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\CButtonLib.pdb
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\CButtonLib.xml
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\bin\Release\Newtonsoft.Json.xml
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.ctrlDetails.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.ctrlDownloadItem.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.ctrlMoviesPoster.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.ctrlSplashScreen.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.ctrlStreamInfo.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.frmOpenPlex.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.Properties.Resources.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.frmOpenPlex.en.resources
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.csproj.GenerateResource.Cache
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\en\OpenPlex.resources.dll
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.exe
C:\Users\imAsh\Documents\Visual Studio 2015\Projects\OpenPlex\openplex\obj\Release\OpenPlex.pdb
Binary file modified openplex/obj/Release/OpenPlex.csproj.GenerateResource.Cache
Binary file not shown.
Binary file not shown.
Binary file modified openplex/obj/Release/OpenPlex.exe
Binary file not shown.
Binary file modified openplex/obj/Release/OpenPlex.pdb
Binary file not shown.
Binary file modified openplex/obj/Release/en/OpenPlex.resources.dll
Binary file not shown.
7 changes: 3 additions & 4 deletions openplex/openplex.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@
<PropertyGroup>
<ApplicationIcon>openplex_logo.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="CButtonLib">
<HintPath>..\..\..\- Plugins\CButton\CButton\bin\Debug\CButtonLib.dll</HintPath>
</Reference>
<Reference Include="ChreneLib">
<HintPath>..\..\..\- Plugins\ChreneLib_DLL\ChreneLib.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.6.3.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.6.3\lib\Net45\HtmlAgilityPack.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit ac615f5

Please sign in to comment.