Add server name to newsletter

This commit is contained in:
JonnyWong16 2018-01-14 16:04:26 -08:00
parent 09ea81ccd2
commit 25355f29ce
3 changed files with 35 additions and 17 deletions

View file

@ -56,9 +56,9 @@
display: block; display: block;
margin: 0 auto !important; margin: 0 auto !important;
/* makes it centered */ /* makes it centered */
max-width: 1046px; max-width: 1042px;
padding: 10px; padding: 10px;
width: 1046px; width: 1042px;
} }
/* This should also be a block element, so that it will fill 100% of the .container */ /* This should also be a block element, so that it will fill 100% of the .container */
@ -66,7 +66,7 @@
box-sizing: border-box; box-sizing: border-box;
display: block; display: block;
margin: 0 auto; margin: 0 auto;
max-width: 1046px; max-width: 1042px;
padding: 10px; padding: 10px;
} }
@ -270,7 +270,12 @@
width: 100%; width: 100%;
height: 100px; height: 100px;
} }
.server-name {
font-size: 30px;
text-align: center;
}
.dates { .dates {
color: #aaaaaa;
font-size: 20px; font-size: 20px;
text-align: center; text-align: center;
} }
@ -305,7 +310,7 @@
.sub-header-bar { .sub-header-bar {
width: 200px; width: 200px;
border-top: 1px solid #E5A00D; border-top: 1px solid #E5A00D;
margin-top: 25px; margin-top: 15px;
margin-bottom: 25px; margin-bottom: 25px;
} }
.sub-header-title { .sub-header-title {
@ -490,8 +495,11 @@
margin-bottom: 10px !important; margin-bottom: 10px !important;
} }
table[class=body] .server-name {
font-size: 20px !important;
}
table[class=body] .dates { table[class=body] .dates {
font-size: 16px !important; font-size: 14px !important;
} }
table[class=body] .sub-header > div { table[class=body] .sub-header > div {
font-size: 20px !important; font-size: 20px !important;
@ -571,8 +579,8 @@
<body class="" style="font-family: sans-serif;-webkit-font-smoothing: antialiased;font-size: 14px;line-height: 1.4;margin: 0;padding: 0;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"> <body class="" style="font-family: sans-serif;-webkit-font-smoothing: antialiased;font-size: 14px;line-height: 1.4;margin: 0;padding: 0;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;"> <table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
<tr> <tr>
<td class="container" style="font-family: sans-serif;font-size: 14px;vertical-align: top;display: block;max-width: 1046px;padding: 10px;width: 1046px;margin: 0 auto !important;"> <td class="container" style="font-family: sans-serif;font-size: 14px;vertical-align: top;display: block;max-width: 1042px;padding: 10px;width: 1042px;margin: 0 auto !important;">
<div class="content" style="box-sizing: border-box;display: block;margin: 0 auto;max-width: 1046px;padding: 10px;"> <div class="content" style="box-sizing: border-box;display: block;margin: 0 auto;max-width: 1042px;padding: 10px;">
<!-- START CENTERED WHITE CONTAINER --> <!-- START CENTERED WHITE CONTAINER -->
<span class="preheader" style="color: transparent;display: none;height: 0;max-height: 0;max-width: 0;opacity: 0;overflow: hidden;mso-hide: all;visibility: hidden;width: 0;">Tautulli ${title} Newsletter (${parameters['start_date']} - ${parameters['end_date']})</span> <span class="preheader" style="color: transparent;display: none;height: 0;max-height: 0;max-width: 0;opacity: 0;overflow: hidden;mso-hide: all;visibility: hidden;width: 0;">Tautulli ${title} Newsletter (${parameters['start_date']} - ${parameters['end_date']})</span>
@ -583,7 +591,8 @@
<tr> <tr>
<td class="wrapper newsletter-header" style="font-family: sans-serif;font-size: 14px;vertical-align: top;box-sizing: border-box;padding: 5px;overflow: auto;"> <td class="wrapper newsletter-header" style="font-family: sans-serif;font-size: 14px;vertical-align: top;box-sizing: border-box;padding: 5px;overflow: auto;">
<div class="header" style="background: url(https://i.imgur.com/oqMQJxp.png) no-repeat;background-position: calc(50% - 20px) 50%;background-size: contain;width: 100%;height: 100px;"></div> <div class="header" style="background: url(https://i.imgur.com/oqMQJxp.png) no-repeat;background-position: calc(50% - 20px) 50%;background-size: contain;width: 100%;height: 100px;"></div>
<div class="dates" style="font-size: 20px;text-align: center;">${parameters['start_date']} - ${parameters['end_date']}</div> <div class="server-name" style="font-size: 30px;text-align: center;">${parameters['server_name']}</div>
<div class="dates" style="color: #aaaaaa;font-size: 20px;text-align: center;">${parameters['start_date']} - ${parameters['end_date']}</div>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -591,7 +600,7 @@
% if recently_added.get('movie'): % if recently_added.get('movie'):
<div class="wrapper" style="box-sizing: border-box;padding: 5px;overflow: auto;"> <div class="wrapper" style="box-sizing: border-box;padding: 5px;overflow: auto;">
<div class="sub-header"> <div class="sub-header">
<div class="sub-header-bar" style="width: 200px;border-top: 1px solid #E5A00D;margin-top: 25px;margin-bottom: 25px;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;"></div> <div class="sub-header-bar" style="width: 200px;border-top: 1px solid #E5A00D;margin-top: 15px;margin-bottom: 25px;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;"></div>
<div class="sub-header-title" style="font-weight: lighter;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;"> <div class="sub-header-title" style="font-weight: lighter;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;">
<img src="http://tautulli.com/images/libraries/movie.png" class="sub-header-icon" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;height: 30px;vertical-align: middle;margin-right: 5px;margin-bottom: 5px;"> Recently Added Movies <img src="http://tautulli.com/images/libraries/movie.png" class="sub-header-icon" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;height: 30px;vertical-align: middle;margin-right: 5px;margin-bottom: 5px;"> Recently Added Movies
</div> </div>
@ -669,7 +678,7 @@
% if recently_added.get('show'): % if recently_added.get('show'):
<div class="wrapper" style="box-sizing: border-box;padding: 5px;overflow: auto;"> <div class="wrapper" style="box-sizing: border-box;padding: 5px;overflow: auto;">
<div class="sub-header"> <div class="sub-header">
<div class="sub-header-bar" style="width: 200px;border-top: 1px solid #E5A00D;margin-top: 25px;margin-bottom: 25px;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;"></div> <div class="sub-header-bar" style="width: 200px;border-top: 1px solid #E5A00D;margin-top: 15px;margin-bottom: 25px;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;"></div>
<div class="sub-header-title" style="font-weight: lighter;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;"> <div class="sub-header-title" style="font-weight: lighter;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;">
<img src="http://tautulli.com/images/libraries/show.png" class="sub-header-icon" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;height: 30px;vertical-align: middle;margin-right: 5px;margin-bottom: 5px;"> Recently Added TV Shows <img src="http://tautulli.com/images/libraries/show.png" class="sub-header-icon" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;height: 30px;vertical-align: middle;margin-right: 5px;margin-bottom: 5px;"> Recently Added TV Shows
</div> </div>
@ -784,7 +793,7 @@
% if recently_added.get('artist'): % if recently_added.get('artist'):
<div class="wrapper" style="box-sizing: border-box;padding: 5px;overflow: auto;"> <div class="wrapper" style="box-sizing: border-box;padding: 5px;overflow: auto;">
<div class="sub-header"> <div class="sub-header">
<div class="sub-header-bar" style="width: 200px;border-top: 1px solid #E5A00D;margin-top: 25px;margin-bottom: 25px;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;"></div> <div class="sub-header-bar" style="width: 200px;border-top: 1px solid #E5A00D;margin-top: 15px;margin-bottom: 25px;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;"></div>
<div class="sub-header-title" style="font-weight: lighter;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;"> <div class="sub-header-title" style="font-weight: lighter;margin-left: auto;margin-right: auto;font-size: 30px;text-align: center;">
<img src="http://tautulli.com/images/libraries/artist.png" class="sub-header-icon" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;height: 30px;vertical-align: middle;margin-right: 5px;margin-bottom: 5px;"> Recently Added Music <img src="http://tautulli.com/images/libraries/artist.png" class="sub-header-icon" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;height: 30px;vertical-align: middle;margin-right: 5px;margin-bottom: 5px;"> Recently Added Music
</div> </div>

View file

@ -56,9 +56,9 @@
display: block; display: block;
margin: 0 auto !important; margin: 0 auto !important;
/* makes it centered */ /* makes it centered */
max-width: 1046px; max-width: 1042px;
padding: 10px; padding: 10px;
width: 1046px; width: 1042px;
} }
/* This should also be a block element, so that it will fill 100% of the .container */ /* This should also be a block element, so that it will fill 100% of the .container */
@ -66,7 +66,7 @@
box-sizing: border-box; box-sizing: border-box;
display: block; display: block;
margin: 0 auto; margin: 0 auto;
max-width: 1046px; max-width: 1042px;
padding: 10px; padding: 10px;
} }
@ -270,7 +270,12 @@
width: 100%; width: 100%;
height: 100px; height: 100px;
} }
.server-name {
font-size: 30px;
text-align: center;
}
.dates { .dates {
color: #aaaaaa;
font-size: 20px; font-size: 20px;
text-align: center; text-align: center;
} }
@ -305,7 +310,7 @@
.sub-header-bar { .sub-header-bar {
width: 200px; width: 200px;
border-top: 1px solid #E5A00D; border-top: 1px solid #E5A00D;
margin-top: 25px; margin-top: 15px;
margin-bottom: 25px; margin-bottom: 25px;
} }
.sub-header-title { .sub-header-title {
@ -490,8 +495,11 @@
margin-bottom: 10px !important; margin-bottom: 10px !important;
} }
table[class=body] .server-name {
font-size: 20px !important;
}
table[class=body] .dates { table[class=body] .dates {
font-size: 16px !important; font-size: 14px !important;
} }
table[class=body] .sub-header > div { table[class=body] .sub-header > div {
font-size: 20px !important; font-size: 20px !important;
@ -583,6 +591,7 @@
<tr> <tr>
<td class="wrapper newsletter-header"> <td class="wrapper newsletter-header">
<div class="header"></div> <div class="header"></div>
<div class="server-name">${parameters['server_name']}</div>
<div class="dates">${parameters['start_date']} - ${parameters['end_date']}</div> <div class="dates">${parameters['start_date']} - ${parameters['end_date']}</div>
</td> </td>
</tr> </tr>

View file

@ -389,7 +389,7 @@ class RecentlyAdded(Newsletter):
elif not isinstance(self.config['incl_libraries'], list): elif not isinstance(self.config['incl_libraries'], list):
self.config['incl_libraries'] = [self.config['incl_libraries']] self.config['incl_libraries'] = [self.config['incl_libraries']]
self._DEFAULT_EMAIL_CONFIG['subject'] = 'Recently Added to Plex! ({end_date})' self._DEFAULT_EMAIL_CONFIG['subject'] = 'Recently Added to Plex ({server_name})! ({end_date})'
date_format = helpers.momentjs_to_arrow(plexpy.CONFIG.DATE_FORMAT) date_format = helpers.momentjs_to_arrow(plexpy.CONFIG.DATE_FORMAT)