Clearer version info in Settings menu.

Rudimentary changelog reader (Settings menu -> General)
Reverse the changelog order - newer changes first.
This commit is contained in:
Tim 2015-08-18 01:05:12 +02:00
parent c0214f1489
commit 4c6f6ca736
6 changed files with 74 additions and 27 deletions

View file

@ -1,13 +1,15 @@
# Changelog # Changelog
## v1.0 (2015-08-11) ## v1.1.2 (2015-08-16)
* First release * Fix bug where user refresh would fail under certain circumstances.
## v1.0.1 (2015-08-13) ## v1.1.1 (2015-08-15)
* Allow SSL certificate check override for certain systems with bad CA stores. * Added Most watched movie for home stats. Thanks @jroyal.
* Fix typo on graphs page causing date selection to break on Safari. * Added TV show title to recently added text. Thanks @jroyal.
* Fix bug with buffer warnings where notification would trigger continuously after first trigger.
* Fix bug where custom avatar URL would get reset on every user refresh.
## v1.1.0 (2015-08-15) ## v1.1.0 (2015-08-15)
@ -24,13 +26,11 @@
* Fix behaviour of close button on update popup, will now stay closed for an hour after clicking close. * Fix behaviour of close button on update popup, will now stay closed for an hour after clicking close.
* Fix some styling niggles. * Fix some styling niggles.
## v1.1.1 (2015-08-15) ## v1.0.1 (2015-08-13)
* Added Most watched movie for home stats. Thanks @jroyal. * Allow SSL certificate check override for certain systems with bad CA stores.
* Added TV show title to recently added text. Thanks @jroyal. * Fix typo on graphs page causing date selection to break on Safari.
* Fix bug with buffer warnings where notification would trigger continuously after first trigger.
* Fix bug where custom avatar URL would get reset on every user refresh.
## v1.1.2 (2015-08-16) ## v1.0 (2015-08-11)
* Fix bug where user refresh would fail under certain circumstances. * First release

View file

@ -253,13 +253,7 @@ fieldset[disabled] .btn-bright.active {
.modal-body table { .modal-body table {
color: #999; color: #999;
} }
.modal-body ul {
list-style: none;
-webkit-padding-start: 0px;
margin: 0;
}
.modal-body li { .modal-body li {
list-style: none;
margin-top: 7px; margin-top: 7px;
margin-left: 4px; margin-left: 4px;
color: #aaa; color: #aaa;

View file

@ -15,7 +15,7 @@
<div class="modal-body" id="modal-text"> <div class="modal-body" id="modal-text">
<div class="col-md-6"> <div class="col-md-6">
<h4><strong>Location Details</strong></h4> <h4><strong>Location Details</strong></h4>
<ul> <ul class="list-unstyled">
<li>Country: <strong><span id="country"></span></strong></li> <li>Country: <strong><span id="country"></span></strong></li>
<li>City: <strong><span id="city"></span></strong></li> <li>City: <strong><span id="city"></span></strong></li>
<li>Region: <strong><span id="region"></span></strong></li> <li>Region: <strong><span id="region"></span></strong></li>
@ -26,7 +26,7 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<h4><strong>Connection Details</strong></h4> <h4><strong>Connection Details</strong></h4>
<ul> <ul class="list-unstyled">
<li>ISP: <strong><span id="isp"></span></strong></li> <li>ISP: <strong><span id="isp"></span></strong></li>
<li>Organization: <strong><span id="org"></span></strong></li> <li>Organization: <strong><span id="org"></span></strong></li>
<li>AS: <strong><span id="as"></span></strong></li> <li>AS: <strong><span id="as"></span></strong></li>

View file

@ -1,7 +1,7 @@
<%inherit file="base.html"/> <%inherit file="base.html"/>
<%! <%!
import plexpy import plexpy
from plexpy import notifiers, common from plexpy import notifiers, common, versioncheck
available_notification_agents = notifiers.available_notification_agents() available_notification_agents = notifiers.available_notification_agents()
%> %>
@ -51,6 +51,10 @@ available_notification_agents = notifiers.available_notification_agents()
<div class="padded-header"> <div class="padded-header">
<h3>Software Updates</h3> <h3>Software Updates</h3>
</div> </div>
% if common.VERSION_NUMBER:
<h5>Version ${common.VERSION_NUMBER} <a href="#changelog-modal" data-toggle="modal"><i class="fa fa-info-circle"></i> Changelog</a></h5>
<br/>
% endif
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="check_github" name="check_github" value="1" ${config['check_github']}> Enable Updates <input type="checkbox" id="check_github" name="check_github" value="1" ${config['check_github']}> Enable Updates
@ -58,7 +62,7 @@ available_notification_agents = notifiers.available_notification_agents()
<p class="help-block">If you have Git installed, allow periodic checks for updates.</p> <p class="help-block">If you have Git installed, allow periodic checks for updates.</p>
</div> </div>
% if plexpy.CURRENT_VERSION: % if plexpy.CURRENT_VERSION:
<p>Current version: ${plexpy.CURRENT_VERSION}</p> <p class="help-block">Git hash: ${plexpy.CURRENT_VERSION}</p>
% endif % endif
<div class="padded-header"> <div class="padded-header">
<h3>Display Settings</h3> <h3>Display Settings</h3>
@ -883,6 +887,21 @@ available_notification_agents = notifiers.available_notification_agents()
</div> </div>
</div> </div>
</div> </div>
<div id="changelog-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="changelog-modal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
<h4 class="modal-title">Changelog</h4>
</div>
<div class="modal-body">
${versioncheck.read_changelog()}
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</div> </div>
</%def> </%def>

View file

@ -55,7 +55,7 @@ DOCUMENTATION :: END
<div class="col-md-4"> <div class="col-md-4">
<h4><strong>Stream Details</strong></h4> <h4><strong>Stream Details</strong></h4>
<h5>Video</h5> <h5>Video</h5>
<ul> <ul class="list-unstyled">
% if data['transcode_video_dec'] != 'direct play': % if data['transcode_video_dec'] != 'direct play':
<li>Stream Type: <strong>${data['transcode_video_dec']}</strong></li> <li>Stream Type: <strong>${data['transcode_video_dec']}</strong></li>
<li>Video Resolution: <strong>${data['transcode_height']}p</strong></li> <li>Video Resolution: <strong>${data['transcode_height']}p</strong></li>
@ -75,7 +75,7 @@ DOCUMENTATION :: END
% endif % endif
</ul> </ul>
<h5>Audio</h5> <h5>Audio</h5>
<ul> <ul class="list-unstyled">
% if data['transcode_audio_dec'] != 'direct play': % if data['transcode_audio_dec'] != 'direct play':
<li>Stream Type: <strong>${data['transcode_audio_dec']}</strong></li> <li>Stream Type: <strong>${data['transcode_audio_dec']}</strong></li>
<li>Audio Codec: <strong>${data['transcode_audio_codec']}</strong></li> <li>Audio Codec: <strong>${data['transcode_audio_codec']}</strong></li>
@ -89,7 +89,7 @@ DOCUMENTATION :: END
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h4><strong>Media Source Details</strong></h4> <h4><strong>Media Source Details</strong></h4>
<ul> <ul class="list-unstyled">
<li>Container: <strong>${data['container']}</strong></li> <li>Container: <strong>${data['container']}</strong></li>
<li>Resolution: <strong>${data['height']}p</strong></li> <li>Resolution: <strong>${data['height']}p</strong></li>
<li>Bitrate: <strong>${data['bitrate']} kbps</strong></li> <li>Bitrate: <strong>${data['bitrate']} kbps</strong></li>
@ -97,7 +97,7 @@ DOCUMENTATION :: END
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h4><strong>Video Source Details</strong></h4> <h4><strong>Video Source Details</strong></h4>
<ul> <ul class="list-unstyled">
<li>Width: <strong>${data['width']}</strong></li> <li>Width: <strong>${data['width']}</strong></li>
<li>Height: <strong>${data['height']}</strong></li> <li>Height: <strong>${data['height']}</strong></li>
<li>Aspect Ratio: <strong>${data['aspect_ratio']}</strong></li> <li>Aspect Ratio: <strong>${data['aspect_ratio']}</strong></li>
@ -105,7 +105,7 @@ DOCUMENTATION :: END
<li>Video Codec: <strong>${data['video_codec']}</strong></li> <li>Video Codec: <strong>${data['video_codec']}</strong></li>
</ul> </ul>
<h4><strong>Audio Source Details</strong></h4> <h4><strong>Audio Source Details</strong></h4>
<ul> <ul class="list-unstyled">
<li>Audio Codec: <strong>${data['audio_codec']}</strong></li> <li>Audio Codec: <strong>${data['audio_codec']}</strong></li>
<li>Audio Channels: <strong>${data['audio_channels']}</strong></li> <li>Audio Channels: <strong>${data['audio_channels']}</strong></li>
</ul> </ul>

View file

@ -241,3 +241,37 @@ def update():
e e
) )
return return
def read_changelog():
changelog_file = os.path.join(plexpy.PROG_DIR, 'CHANGELOG.md')
try:
logfile = open(changelog_file, "r")
except IOError, e:
logger.error('PlexPy Version Checker :: Unable to open changelog file. %s' % e)
return None
if logfile:
output = ''
lines = logfile.readlines()
previous_line = ''
for line in lines:
if line[:2] == '# ':
output += '<h3>' + line[2:] + '</h3>'
elif line[:3] == '## ':
output += '<h4>' + line[3:] + '</h4>'
elif line[:2] == '* ' and previous_line.strip() == '':
output += '<ul><li>' + line[2:] + '</li>'
elif line[:2] == '* ':
output += '<li>' + line[2:] + '</li>'
elif line.strip() == '' and previous_line[:2] == '* ':
output += '</ul></br>'
else:
output += line + '</br>'
previous_line = line
return output
else:
return '<h4>No changelog data</h4>'