Jump to content

Client App: Email my Users New Media (new edition needs testing)


chef

Recommended Posts

shorty1483

I like it! I'll code it tonight :)

 

Did the google account error just the one time or was it everytime? I'll look into that as well.

 

Maybe there is a library on the internet that can do something about security.

Just one time.

 

Gesendet von meinem HTC One M8 mit Tapatalk

Link to comment
Share on other sites

@@shorty1483

 

The newest version (post in OP) now can add itself to windows startup application (using a checkbox), and also auto authenticate a user profile.

 

It still needs some work, for instance, the emby password current doesn't get encrypted when it gets saved to the configuration XML.

 

I'll get that fixed up in a new version.

 

It will now start with windows, load to the system tray, and start the campaign when your computer restarts. :)

 

You can find those options under the new "Settings" tab.

 

I'll also fix up the UI to be a more uniform. Currently it needs some work. :)

  • Like 1
Link to comment
Share on other sites

Happy2Play

Get launch and email errors.

 

At launch/opening program

 

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at EPK.LoginPage.VB$StateMachine_1_Form1_Load.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__4(Object state)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
EPK
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Administrator/Desktop/EPK2/EPK.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 12.0.51209.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34270 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34245 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
MediaBrowser.Model
    Assembly Version: 3.0.5666.4
    Win32 Version: 3.0.5666.4
    CodeBase: file:///C:/Users/Administrator/Desktop/EPK2/MediaBrowser.Model.DLL
----------------------------------------
MediaBrowser.ApiInteraction
    Assembly Version: 3.0.5664.41652
    Win32 Version: 3.0.5664.41652
    CodeBase: file:///C:/Users/Administrator/Desktop/EPK2/MediaBrowser.ApiInteraction.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

 

 

 

Testing email

 

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at EPK.EmailClient.VB$StateMachine_0_Send.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__4(Object state)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
EPK
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Administrator/Desktop/EPK2/EPK.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 12.0.51209.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34270 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34245 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
MediaBrowser.Model
    Assembly Version: 3.0.5666.4
    Win32 Version: 3.0.5666.4
    CodeBase: file:///C:/Users/Administrator/Desktop/EPK2/MediaBrowser.Model.DLL
----------------------------------------
MediaBrowser.ApiInteraction
    Assembly Version: 3.0.5664.41652
    Win32 Version: 3.0.5664.41652
    CodeBase: file:///C:/Users/Administrator/Desktop/EPK2/MediaBrowser.ApiInteraction.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

 


 

Link to comment
Share on other sites

Ops! Yep I fixed it.

 

I forgot to remove the settings XML and restart from scratch. It should work now :)

Edited by chef
Link to comment
Share on other sites

shorty1483

When sending E-Mail, I get the error attached. Overall, altthough the concept an look is awesome, it seems still a bit try and fail on my machine. I think it would be better to let the user specify the smtp server settings (server name, port, SSL/TLS, PW auth etc. like in the Emby E-Mail Plugin). And thew creation of a log file or sth. would be cool.

 

 

 

Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei EPK.EmailClient.VB$StateMachine_3_Send.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__4(Object state)


************** Geladene Assemblys **************
mscorlib
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.
----------------------------------------
EPK
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///J:/Emby-Server/EPK/EPK.exe.
----------------------------------------
Microsoft.VisualBasic
    Assembly-Version: 10.0.0.0.
    Win32-Version: 12.0.51209.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll.
----------------------------------------
System
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Core
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll.
----------------------------------------
System.Windows.Forms
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System.Drawing
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Runtime.Remoting
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll.
----------------------------------------
MediaBrowser.Model
    Assembly-Version: 3.0.5666.4.
    Win32-Version: 3.0.5666.4.
    CodeBase: file:///J:/Emby-Server/EPK/MediaBrowser.Model.DLL.
----------------------------------------
MediaBrowser.ApiInteraction
    Assembly-Version: 3.0.5664.41652.
    Win32-Version: 3.0.5664.41652.
    CodeBase: file:///J:/Emby-Server/EPK/MediaBrowser.ApiInteraction.DLL.
----------------------------------------
System.Configuration
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
System.Xml
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34234 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
Microsoft.GeneratedCode
    Assembly-Version: 1.0.0.0.
    Win32-Version: 4.0.30319.34234 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
mscorlib.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------
System.Windows.Forms.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------

************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

Zum Beispiel:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Wenn das JIT-Debuggen aktiviert ist, werden alle Ausnahmefehler an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt. 

 

 

Edited by shorty1483
  • Like 1
Link to comment
Share on other sites

Okay! I realized where I had made errors in coding.

 

When the program had to auto login and authenticate, it wasn't saving the information properly, and therefore there where error.

 

But, I'm pretty sure that the latest version fixes all the auto-login problems. :)

 

@@Happy2Play

@@shorty1483

Edited by chef
  • Like 2
Link to comment
Share on other sites

shorty1483

First test mail worked flawlessly with 5 items. Going up to 10 let me not send an e-mail. Using gmx currently since GMail does not work at all. Perhaps a size limit for the mail? Don't know. Just started the campaign for tomorrow morning. Will look if it works after the morning reboot routine.

 

BTW @@chef Is it meant like that that the E-Mail sunject is empty?

 

Really love this tool!

Link to comment
Share on other sites

It looks as though the date calculations are off, hence no subject for Sundays. I'll have take a look.

 

Gmail seems to work okay for me, but there is a chance that the more images located in an email, the higher the chance that it could be reported as spam by some sort of GMail filter... maybe.

 

Does it still throw errors when using Gmail, or it just doesn't send the email with gmail?

 

The next goal to encrypt the saved settings for Emby Auto Login. I have created a decent Encryption Class, so it shouldn't be to hard to implement into the auto-save feature. :D

Edited by chef
Link to comment
Share on other sites

Koleckai Silvestri

Can't login due to the layout of the character selection screen and a lack of scrolling. None of the users shown are admin users. My Admin User requires a manual login as well.

 

DPhvOvn.png

  • Like 1
Link to comment
Share on other sites

I always wondered if I'd ever meet someone with that many users... Lol!

 

I'll fix the button wrap to start a new line of user button.

 

I'll also make sure there is a link to private account logins. Nice catch!

Link to comment
Share on other sites

Happy2Play

Look like if there is no logo it won't show poster either.

 

562d1a75c922f_Capture.jpg

Link to comment
Share on other sites

shorty1483

 

 

Does it still throw errors when using Gmail, or it just doesn't send the email with gmail?

 

 

 

Receiving over GMail and outlook.com works fine. Just sending does not work on my side.

Link to comment
Share on other sites

Can't login due to the layout of the character selection screen and a lack of scrolling. None of the users shown are admin users. My Admin User requires a manual login as well.

 

DPhvOvn.png

Login screen can now handle more then four user buttons :)

 

It also has a "Manual Login" for private Accounts

 

I think I can make it more user based. Right now it will show email configurations for only the first user, but I think it has to be per emby user.

 

That is my next step, also encrypting emby passwords. Note: no one post XML files here, there is readable sensitive information in it). I'll get it working next.

 

 

Look like if there is no logo it won't show poster either.

 

562d1a75c922f_Capture.jpg

Man I gotta fix the Logo thing Happy! Sorry it is taking a while to get it fixed.

 

I think that the browser is trying to load all the images too quickly. If you refresh the browser page, do the images show up in the email?

 

I will try task factory and see if attaching the images to the email can be done asynronously. That might work...

Edited by chef
Link to comment
Share on other sites

Happy2Play

do the images show up in the email?

Nope just place holders in MS Outlook pulling Hotmail and Yahoo.  ***Click open in browser from Outlooks gets previous image placement.

562d3bea9a415_outlook.jpg

 

Hotmail and Yahoo opened in browser show this.  Yahoo shows all images at bottom of email as attachments.

 

562d3c1841051_hotmail.jpg

Edited by Happy2Play
Link to comment
Share on other sites

Yep Outlook limits the amount of images from a network share. If they come directly from the hard disk it will not limit the attachments. I have an idea to get this working, it will involve saving the information temporarily, then removing it.

 

Currently it attaches an image stream, the app will have to create the bit maps instead of letting the email client sort out the stream info.

Link to comment
Share on other sites

Happy2Play

I wonder if there is limits to attachments in those email clients?

MS Outlook (not outlook.com) displays everything as you can see with my initial post (post 8) it showed all 10.  The issue I am seeing now is, if there is no logo then it doesn't show posters either (post 37).

Link to comment
Share on other sites

MS Outlook (not outlook.com) displays everything as you can see with my initial post (post 8) it showed all 10.  The issue I am seeing now is, if there is no logo then it doesn't show posters either (post 37).

 

Right! Got it.

Link to comment
Share on other sites

@@Happy2Play

 

I think I fixed that issue. If you have time to check it out, and see if it works okay?

 

Nice catch by the way!!

Edited by chef
Link to comment
Share on other sites

Happy2Play

Yep that fixed it to display posters when logos aren't present. :)

  • Like 1
Link to comment
Share on other sites

Yep that fixed it to display posters when logos aren't present. :)

It should also display the other way around when primary images aren't present, but that's probably never gonna happen :)

Link to comment
Share on other sites

shorty1483

So sending an E-Mail with 20 newest movies works flawlessly now with latest version. Any chance to get also new TV series included?

Edited by shorty1483
  • Like 2
Link to comment
Share on other sites

So sending an E-Mail with 20 newest movies works flawlessly now with latest version. Any chance to get also new TV series included?

Excellent! I'll add the tv series tonight! Anyone for music too?

Link to comment
Share on other sites

@@shorty1483

 

 

Oh boy! I got it listing new episodes, the Queries for latest media had to be reworked a bit.

 

NOTE: If you choose 25 items to list in your emails, then 25 Movies, and also 25 Episodes will return, so it might be better to keep the limit down to 10.

 

The TV info, will show the Series Logos and Primary image, but will give the Episode Name/Number/Season Number in the overview.

 

I put a bunch of time into it, so hope it all works okay. :)

 

I think in the future, the app should let the user choose with check boxes that media types to email out.

Edited by chef
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...