Skip to content

Commit

Permalink
v2.11.3 Community Updates
Browse files Browse the repository at this point in the history
Enhancement: Full Screen Poster (Issue MattsShack#57)
- BUG: When using 'Full Screen Art' poster gets trimmed & depending on custom image size image is not scaled to window size.
    - Fix 1 (Implemented): Change CSS in index.php from 'auto 100%' to 'contain', but that does not fully scale movie poster as desired.
    - Fix 2 (Future): Look at different options for different modes.
    - Fix 3 (Future): In 'Poster Mode' look at setting image size explicit.
    - Fix 4 (Future): Adjust size dimensions of image based on orientation of the screen.

PMPD Pop-up Window with 'S' Key (Issue MattsShack#70)
- Update 'S' key to bring up the settings pages.
- Adjust how the CSS displays the iFrame and remove un-required scroll bar for main page.
- Change script from using 'if' statement to 'switch' statement so that adding future keys is a bit simpler.
- TODO: Look at other 'keys' to add to bring up special stats pages depending on mode?

Enhancement: Cache Config Options (Issue MattsShack#63)
- Remove empty folders after Clear Cache

Updates and Bug Fixes:
- Update Docker system to allow SSH into container for more debugging options.
  • Loading branch information
ZeroCoolGOS committed Mar 26, 2021
1 parent c832299 commit 29c6079
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 22 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN apt-get update && apt-get install -y \
php-xml \
php-zip \
# python3 \
ssh \
supervisor

#region Install PHP 8.0 software packages (Prototype)
Expand All @@ -44,6 +45,14 @@ RUN apt-get update && apt-get install -y \
# RUN apt-get upgrade -y
#endregion

#region SSH
#Set password to root account
RUN echo 'root:password' | chpasswd

#Enable login to root account
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
#endregion

#region Setup PHP with NGINX
WORKDIR ${nginxpath}/sites-enabled/

Expand Down
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ ignore:
sha: []
merge-message-formats: {}
mode: ContinuousDelivery
next-version: 2.11.2
next-version: 2.11.3
27 changes: 24 additions & 3 deletions assets/plexmovieposter/CacheLib.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,30 @@ function GeneralCacheClear($destination = "../cache/posters/", $ScanSubDir = TRU
// could use CHILD_FIRST if you so wish

foreach ($iterator as $file) {
if (is_file($file)) {
pmp_Logging("getCacheFile", "Removing Image ($destination): $file");
unlink($file);
$file_parts = pathinfo($file);
$dirPath = $file_parts['dirname'];
$dirPath = realpath($dirPath);

// if (is_file($file)) {
// pmp_Logging("getCacheFile", "Removing Item ($destination): $file");
// unlink($file);
// }

if (is_dir($dirPath)) {
$objects = scandir($dirPath);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (is_dir($dirPath. DIRECTORY_SEPARATOR .$object) && !is_link($dirPath."/".$object)) {
pmp_Logging("getCacheFile", "\tPurge empty cache directory".$dirPath. DIRECTORY_SEPARATOR .$object );
rmdir($dirPath. DIRECTORY_SEPARATOR .$object);
}
else {
pmp_Logging("getCacheFile", "\tPurge files from cache directory ($destination).".$dirPath. DIRECTORY_SEPARATOR .$object);
unlink($dirPath. DIRECTORY_SEPARATOR .$object);
}
}
}
rmdir($fontPath);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion assets/plexmovieposter/FontLib.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ function FontDirCleanup($source = "../cache/fonts/", $ScanSubDir = TRUE) {
}
}
rmdir($fontPath);
}
}
}
}
}
Expand Down
19 changes: 19 additions & 0 deletions assets/plexmovieposter/css/DisplayStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,24 @@
display: inline-block;
}

.modal-dialog {
width: 90%;
height: 90%;
}

.modal-content {
width: 90%;
height: 90%;
}

.modal-body {
padding: 0;
}

#settingFrame {
width: 100%;
height: 100%;
}

/* -------------------------------------------------- */

34 changes: 34 additions & 0 deletions assets/plexmovieposter/css/SettingsStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,40 @@ td[rowspan] {
-webkit-overflow-scrolling: touch
}

.dark-scrollbar {
scrollbar-face-color: #323232;
scrollbar-arrow-color: #323232;
scrollbar-track-color: #000;
scrollbar-shadow-color: #000;
scrollbar-highlight-color: #000;
scrollbar-3dlight-color: #000;
scrollbar-darkshadow-color: #000
}

.dark-scrollbar::-webkit-scrollbar {
width: 15px
}

.dark-scrollbar::-webkit-scrollbar-track {
background-color: rgba(0, 0, 0, .2)
}

.dark-scrollbar::-webkit-scrollbar-thumb {
min-height: 50px;
background-color: hsla(0, 0%, 100%, .15);
border: 3px solid transparent;
border-radius: 8px;
background-clip: padding-box
}

.dark-scrollbar::-webkit-scrollbar-thumb:hover {
background-color: hsla(0, 0%, 100%, .25)
}

.dark-scrollbar::-webkit-scrollbar-thumb:window-inactive {
background-color: hsla(0, 0%, 100%, .05)
}

.background-container {
NOTE: "background-container";
position: fixed;
Expand Down
4 changes: 2 additions & 2 deletions assets/styles/default/poster.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ body {
display: inline-block;
} */

.modal-dialog {
/* .modal-dialog {
width: 100%;
height: 100%;
}
Expand All @@ -96,4 +96,4 @@ body {
#settingFrame {
width: 100%;
height: 100%;
}
} */
2 changes: 1 addition & 1 deletion build/DockerSetup.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ portexternal = 80
portinternal = 80
osplatform = linux
imagenameroot = plexmovieposterdisplay
tag = 2.11.2
tag = 2.11.3
dockerfileroot = ../.
imagetype =
networktype =
Expand Down
2 changes: 1 addition & 1 deletion build/UpdateVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def UpdatePHP(DisplayMSG=False,ConfigSegment="DEFAULT",ConfigKey="version",Confi
# there for there might be trailing data we need to truncate away.

DisplayMSG = False
SetVersion = "2.11.2"
SetVersion = "2.11.3"

PYScriptRoot = os.path.abspath(os.path.dirname(__file__))

Expand Down
22 changes: 21 additions & 1 deletion docs/ChangeLogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,24 @@ Enhancement: Full Screen Poster (Issue #57)
- Full Screen Poster using 'FullScreenArtMode'.

Updates and Bug Fixes:
- Update Custom Image upload to support only the following file types: zip/jpg/jpeg/gif/png
- Update Custom Image upload to support only the following file types: zip/jpg/jpeg/gif/png

**v2.11.3 Community Updates**\
Enhancement: Full Screen Poster (Issue #57)
- BUG: When using 'Full Screen Art' poster gets trimmed & depending on custom image size image is not scaled to window size.
- Fix 1 (Implemented): Change CSS in index.php from 'auto 100%' to 'contain', but that does not fully scale movie poster as desired.
- Fix 2 (Future): Look at different options for different modes.
- Fix 3 (Future): In 'Poster Mode' look at setting image size explicit.
- Fix 4 (Future): Adjust size dimensions of image based on orientation of the screen.

PMPD Pop-up Window with 'S' Key (Issue #70)
- Update 'S' key to bring up the settings pages.
- Adjust how the CSS displays the iFrame and remove un-required scroll bar for main page.
- Change script from using 'if' statement to 'switch' statement so that adding future keys is a bit simpler.
- TODO: Look at other 'keys' to add to bring up special stats pages depending on mode?

Enhancement: Cache Config Options (Issue #63)
- Remove empty folders after Clear Cache

Updates and Bug Fixes:
- Update Docker system to allow SSH into container for more debugging options.
37 changes: 26 additions & 11 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
// document.write("fullScreenMode");
$('.' + "mediaArt").css('filter', "none");
$('.' + "mediaArt").css('-webkit-filter', "none");
$('.' + "mediaArt").css('background-size', "auto 100%");
// $('.' + "mediaArt").css('background-size', "auto 100%");
$('.' + "mediaArt").css('background-size', "contain");
}
else {
// document.write("fullScreenMode");
Expand All @@ -76,14 +77,29 @@
});
});

// Press 's' key will bring up the settings page.
// onkeypress - The Unicode CHARACTER code is: 115
// onkeydown - The Unicode KEY code is: 83
// https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_event_key_keycode2
$(document).keypress(function(event){
var keycode = (event.keyCode ? event.keyCode : event.which);
console.log("Keypress: " + keycode);
if(keycode == '115'){
$('#myModal').modal({show:true});
$("#settingFrame").attr('src', 'admin.php');
// if (keycode == '115') {
// $('#myModal').modal({show:true});
// $("#settingFrame").attr('src', 'settings/general.php');
// }
switch (keycode) {
case 115: // 's'
$('#myModal').modal({show:true});
$("#settingFrame").attr('src', 'settings/general.php');
break;
// case 105: // 'i'
// $('#myModal').modal({show:true});
// $("#settingFrame").attr('src', '');
// break;
default:
break;
}

});

$('#myModal').on('hidden.bs.modal', function(){
Expand Down Expand Up @@ -114,7 +130,8 @@
// document.write("fullScreenMode");
$('.' + "mediaArt").css('filter', "none");
$('.' + "mediaArt").css('-webkit-filter', "none");
$('.' + "mediaArt").css('background-size', "auto 100%");
// $('.' + "mediaArt").css('background-size', "auto 100%");
$('.' + "mediaArt").css('background-size', "contain");
}
else {
// document.write("fullScreenMode");
Expand Down Expand Up @@ -148,16 +165,14 @@
<div class="modal fade" id="myModal">
<div class="modal-dialog modal-lg">
<div class="modal-content bmd-modalContent">

<div class="modal-body">

<div class="close-button">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<iframe class="embed-responsive-item" id='settingFrame' frameborder="0"></iframe>

</div>

</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
Expand Down
5 changes: 5 additions & 0 deletions resources/start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

#start ssh
service ssh start
service ssh enable
service ssh status

#start nginx
service nginx start &

Expand Down
2 changes: 1 addition & 1 deletion settings/PMPInfo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

// Release Information
$version = "2.11.2";
$version = "2.11.3";

?>

0 comments on commit 29c6079

Please sign in to comment.