continue watching section, recently added section, new endpoints in collab with server, scan for new files, and more

This commit is contained in:
Brandon4466
2025-05-29 12:58:00 -07:00
parent 3e80923494
commit f8f04c19cf
6 changed files with 1201 additions and 37 deletions

View File

@@ -2,23 +2,231 @@
<html>
<head>
<meta charset="UTF-8">
<title>Movie Streamer</title>
<title>NotPlexApp</title>
<script src="https://unpkg.com/@ffmpeg/ffmpeg@0.11.8/dist/ffmpeg.min.js"></script>
<style>
body { font-family: Arial, sans-serif; margin: 0; padding: 20px; }
#container { display: flex; }
#movies-list { width: 30%; overflow-y: auto; }
.movie-item { cursor: pointer; margin-bottom: 10px; display: flex; align-items: center; }
.movie-item img { width: 50px; height: auto; margin-right: 10px; }
#movie-details { flex-grow: 1; padding-left: 20px; }
video { max-width: 100%; margin-top: 10px; }
html, body {
margin: 0;
padding: 0;
height: 100%;
font-family: Arial, sans-serif;
}
/* Tabs style */
#tabs {
display: flex;
background: #333;
}
#tabs button {
flex: 1;
padding: 10px;
color: #fff;
background: #444;
border: none;
cursor: pointer;
font-size: 16px;
}
#tabs button.active {
background: #222;
}
/* Content lists (item grids inside each section) */
.content-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 20px;
overflow-x: visible; /* ensure no horizontal scrolling */
/* Optional: force items to wrap into multiple rows */
grid-auto-rows: auto;
}
/* Sectioncontainer: stack each <section> as a row */
.section-list {
display: flex;
flex-direction: column;
gap: 40px; /* space between sections */
padding: 20px;
box-sizing: border-box;
height: calc(100% - 48px); /* adjust for tab height */
overflow-y: auto;
background-color: #f1f1f1;
}
.movie-item {
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
background: #fff;
padding: 10px;
box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
}
.movie-item img {
width: 200px;
height: auto;
margin-bottom: 10px;
}
/* Overlay for details/stream */
#overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.8);
display: none;
justify-content: center;
align-items: center;
z-index: 100;
}
#overlay-content {
background: #fff;
padding: 20px;
max-width: 800px;
width: 90%;
max-height: 90%;
overflow-y: auto;
box-sizing: border-box;
position: relative;
}
#close-overlay {
position: absolute;
top: 10px;
right: 10px;
background: red;
color: #fff;
border: none;
padding: 5px 10px;
cursor: pointer;
}
video {
max-width: 100%;
margin-top: 20px;
}
/* Authentication Page Styles */
#auth-page {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 200;
background: rgba(0,0,0,0.8);
display: flex;
justify-content: center;
align-items: center;
}
#auth-content {
background: #fff;
padding: 30px;
border-radius: 4px;
text-align: center;
width: 300px;
}
#auth-content input {
width: 90%;
padding: 10px;
margin: 5px 0;
font-size: 14px;
}
#auth-content button {
width: 45%;
padding: 10px;
margin: 5px;
font-size: 14px;
cursor: pointer;
}
/* show a “Remuxing…” banner above the video */
.remuxing-indicator {
color: #ff0;
font-size: 18px;
font-weight: bold;
text-align: center;
margin-bottom: 8px;
}
/* new: horizontal scrolling row */
.content-row {
display: flex;
overflow-x: auto;
gap: 20px;
padding-bottom: 10px;
}
.content-row::-webkit-scrollbar {
height: 8px;
}
.content-row::-webkit-scrollbar-thumb {
background: rgba(0,0,0,0.2);
border-radius: 4px;
}
/* hide native scrollbar */
.content-row {
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE 10+ */
}
.content-row::-webkit-scrollbar { /* WebKit */
display: none;
}
/* wrap arrows + row */
.scroll-container {
position: relative;
display: flex;
align-items: center;
}
.scroll-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(0,0,0,0.5);
color: #fff;
border: none;
width: 30px;
height: 40px;
cursor: pointer;
z-index: 10;
}
.scroll-arrow.left { left: 0; }
.scroll-arrow.right { right: 0; }
</style>
</head>
<body>
<h1>Movie Streamer</h1>
<div id="container">
<div id="movies-list"></div>
<div id="movie-details"></div>
<div id="auth-page">
<div id="auth-content">
<h2>Login / Register</h2>
<input type="text" id="username" placeholder="Username" />
<input type="password" id="password" placeholder="Password" />
<div>
<button id="login-btn">Login</button>
<button id="register-btn">Register</button>
</div>
<p id="auth-error" style="color:red;"></p>
</div>
</div>
<div id="tabs">
<button id="movies-tab" class="active">Movies</button>
<button id="shows-tab">TV Shows</button>
<button id="scan-btn">Scan for New Files</button> <!-- New button -->
</div>
<div id="sync-controls" style="text-align: center; margin: 10px;">
<input type="text" id="sync-session-id" placeholder="Enter Sync Session ID" />
<button id="join-sync-btn">Join Sync Session</button>
</div>
<!-- use section-list instead of content-list on the containers -->
<div id="movies-list" class="section-list"></div>
<div id="shows-list" class="section-list" style="display:none;"></div>
<div id="overlay">
<div id="overlay-content">
<button id="close-overlay">Close</button>
<div id="movie-details"></div>
<!-- Add Sync Controls inside the overlay -->
<div id="overlay-sync-controls" style="text-align: center; margin-top: 10px;">
<input type="text" id="overlay-sync-session-id" placeholder="Enter Sync Session ID" />
<button id="overlay-join-sync-btn">Join Sync Session</button>
</div>
</div>
</div>
<script src="renderer.js"></script>
</body>
</html>