Add new frontend
This commit is contained in:
7 files changed
+33
-129
No files matched your search
@@ -1,3 +0,0 @@
|
||||
[submodule "jellyplayer/jellyplayer-jellyfin-vue"]
|
||||
path = jellyplayer/jellyplayer-jellyfin-vue
|
||||
url = https://github.com/prayag17/jellyplayer-jellyfin-vue.git
|
||||
@@ -1,52 +1,3 @@
|
||||
# JellyPlayer
|
||||
# JellyPlayer : Modern Jellyfin Client
|
||||
|
||||
## Modern Jellyfin Client
|
||||
|
||||
## Note: The development of this client is on halt as I am waiting for jf-vue project(frontend for this project) to catch up to vue3
|
||||
|
||||
## Installation
|
||||
|
||||
- Install Requirements:
|
||||
- Install Python 3
|
||||
- Install dependencies
|
||||
- Install node deps for frontend, go to JellyPlayer-FrontEnd dir and run the following command
|
||||
|
||||
```console
|
||||
npm install
|
||||
```
|
||||
|
||||
- Install Python deps
|
||||
|
||||
```console
|
||||
pip3 install -r requirements.txt --default-timeout=1000
|
||||
```
|
||||
|
||||
- Run App:
|
||||
|
||||
- Complie Renderer Files(html,js,css):\
|
||||
Go to JellyPlayer-FrontEnd dir and run.\
|
||||
**Note: on windows use WSL to compile**
|
||||
|
||||
```console
|
||||
npm run build
|
||||
```
|
||||
|
||||
- Run JellyPlayer:
|
||||
|
||||
```console
|
||||
python3 main.py
|
||||
```
|
||||
|
||||
<!-- - Build EXE:
|
||||
|
||||
```console
|
||||
pyinstaller --clean main.spec
|
||||
```
|
||||
|
||||
The .exe file will generate at dist/JellyPlayer -->
|
||||
|
||||
## Roadmap to Alpha 1
|
||||
|
||||
- [ ] Integration of libMPV for video playback (30% completed).
|
||||
- [ ] Add Jellyplayer specific player function to jf-vue for video playback (1% completed).
|
||||
- [ ] Use github action workflow to build JellyPlayer for multiple target OS.
|
||||
## DOCS TO BE AVAILABLE SOON :)
|
||||
+28
-30
@@ -1,32 +1,23 @@
|
||||
from mpv import MPV, MpvRenderContext, MpvGlGetProcAddressFn
|
||||
__version__ = '0.1.0'
|
||||
|
||||
from ctypes import windll, cast, c_void_p
|
||||
from PySide6.QtWebEngineCore import QWebEngineSettings
|
||||
from PySide6.QtWebEngineWidgets import QWebEngineView
|
||||
from PySide6.QtWebChannel import QWebChannel
|
||||
from PySide6.QtGui import QIcon, QPixmap
|
||||
from PySide6.QtCore import QUrl, Slot, QObject, QProcess, Qt, QCoreApplication, QMessageLogContext
|
||||
from PySide6.QtWidgets import QApplication, QMainWindow, QWidget
|
||||
from signal import SIGTERM, signal
|
||||
import platform
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
import platform
|
||||
from signal import SIGTERM, signal
|
||||
from PySide6.QtWidgets import QApplication, QMainWindow, QWidget
|
||||
from PySide6.QtCore import QUrl, Slot, QObject, QProcess, Qt, QCoreApplication, Signal, QSize
|
||||
from PySide6.QtGui import QIcon, QPixmap, QOpenGLContext
|
||||
from PySide6.QtWebChannel import QWebChannel
|
||||
from PySide6.QtWebEngineWidgets import QWebEngineView
|
||||
from PySide6.QtWebEngineCore import QWebEngineSettings
|
||||
from PySide6.QtWebEngineQuick import QtWebEngineQuick
|
||||
from PySide6.QtQuick import QQuickFramebufferObject, QQuickView, QQuickItem
|
||||
from PySide6.QtOpenGL import QOpenGLFramebufferObject
|
||||
from PySide6.QtOpenGLWidgets import QOpenGLWidget
|
||||
from PySide6.QtQml import QQmlApplicationEngine, QQmlComponent, qmlRegisterType
|
||||
from ctypes import windll, cast, c_void_p
|
||||
|
||||
# if (platform.system() == "Windows"):
|
||||
# from OpenGL import GL, WGL
|
||||
# else:
|
||||
# from OpenGL import GL, GLX
|
||||
|
||||
os.environ["PATH"] = os.path.dirname(
|
||||
__file__) + os.pathsep + os.environ["PATH"]
|
||||
|
||||
from mpv import MPV, MpvRenderContext
|
||||
|
||||
__version__ = '0.1.0'
|
||||
|
||||
QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts)
|
||||
app = QApplication(["--enable-smooth-scrolling", "--enable-gpu"])
|
||||
print(os.path.dirname(__file__) + os.pathsep)
|
||||
@@ -45,6 +36,7 @@ def restart():
|
||||
|
||||
class Backend(QObject):
|
||||
def __init__(self, player):
|
||||
super().__init__()
|
||||
self.player = player
|
||||
|
||||
def restart(self):
|
||||
@@ -59,6 +51,12 @@ class Backend(QObject):
|
||||
def setTime(self, time):
|
||||
self.player.setTime(time)
|
||||
|
||||
@Slot(result=int)
|
||||
def getTime(self):
|
||||
return self.player.time_pos
|
||||
|
||||
|
||||
# def filehandler()
|
||||
|
||||
class MainWin(QMainWindow):
|
||||
def __init__(self):
|
||||
@@ -67,7 +65,7 @@ class MainWin(QMainWindow):
|
||||
self.dir = self.dirRaw.replace("\\", "/")
|
||||
self.view = QWebEngineView()
|
||||
self.view.load(QUrl("http://localhost:3000"))
|
||||
# self.view.load(QUrl("http://localhost:2703"))
|
||||
# self.view.load(QUrl("http://localhost:17066"))
|
||||
self.view.raise_()
|
||||
self.setCentralWidget(self.view)
|
||||
self.setWindowIcon(QIcon(QPixmap(f"{self.dir}/assets/icon.png")))
|
||||
@@ -86,13 +84,9 @@ class MainWin(QMainWindow):
|
||||
self.inspector = QWebEngineView()
|
||||
self.inspector.setWindowTitle("Inspector")
|
||||
|
||||
self.backend = Backend(self.playerWid)
|
||||
self.channel = QWebChannel()
|
||||
self.channel.registerObject('backend', self.backend)
|
||||
|
||||
self.playerWid = QWidget(self)
|
||||
self.playerWid.setMinimumHeight(self.view.height)
|
||||
self.playerWid.setMinimumWidth(self.view.width)
|
||||
self.playerWid.setMinimumHeight(self.view.height())
|
||||
self.playerWid.setMinimumWidth(self.view.width())
|
||||
self.playerWid.setAttribute(Qt.WA_DontCreateNativeAncestors)
|
||||
self.playerWid.setAttribute(Qt.WA_NativeWindow)
|
||||
self.playerWid.lower()
|
||||
@@ -102,6 +96,10 @@ class MainWin(QMainWindow):
|
||||
log_handler=print,
|
||||
loglevel='debug')
|
||||
|
||||
self.backend = Backend(self.playerWid)
|
||||
self.channel = QWebChannel()
|
||||
self.channel.registerObject('backend', self.backend)
|
||||
|
||||
def handleLoaded(self, ok):
|
||||
if ok:
|
||||
self.view.page().setDevToolsPage(self.inspector.page())
|
||||
|
||||
Submodule jellyplayer/jellyplayer-jellyfin-vue deleted from 352916c734.
@@ -1,41 +0,0 @@
|
||||
import QtWebEngine
|
||||
import QtWebChannel
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import WebView
|
||||
|
||||
Item{
|
||||
id: window
|
||||
objectName: "window"
|
||||
// minimumHeight: 720
|
||||
// minimumWidth: 1280
|
||||
// visible: true
|
||||
|
||||
// QtObject{
|
||||
// id:mpvComObj
|
||||
// WebChannel.id: backend
|
||||
// function createMpv(url) {
|
||||
// video.play(url)
|
||||
// }
|
||||
// }
|
||||
|
||||
// MpvObject{
|
||||
// id:video;
|
||||
// anchors.fill: parent
|
||||
// }
|
||||
|
||||
// WebChannel{
|
||||
// id: channel
|
||||
// registeredObjects: [mpvComObj]
|
||||
// }
|
||||
|
||||
WebView {
|
||||
id:webView;
|
||||
visible: true;
|
||||
width: mainWindow.width;
|
||||
height: mainWindow.height;
|
||||
anchors.fill: parent;
|
||||
}
|
||||
// property QtObject webChannel: webView.webChannel
|
||||
}
|
||||
@@ -7,7 +7,7 @@ block_cipher = None
|
||||
a = Analysis(['__init__.py'],
|
||||
pathex=['D:\\Jellyfin\\JellyPlayer\\jellyplayer'],
|
||||
binaries=[],
|
||||
datas=[('jellyplayer-jellyfin-vue/frontend/dist', 'jellyplayer-jellyfin-vue/frontend/dist'), ('mainWindow.qml', '.')],
|
||||
datas=[('jellyplayer-jellyfin-vue/frontend/dist', 'jellyplayer-jellyfin-vue/frontend/dist')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ keywords = [
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "~3.8"
|
||||
python = "^3.10"
|
||||
PySide6 = "^6.3.0"
|
||||
Flask = "^2.1.2"
|
||||
waitress = "^2.1.1"
|
||||
@@ -25,7 +25,7 @@ PyOpenGL = "^3.1.6"
|
||||
[tool.poetry.dev-dependencies]
|
||||
pytest = "~5.2"
|
||||
poethepoet = "^0.13.1"
|
||||
autopep8 = "^1.6.0"
|
||||
autopep8 = "^1.6.0"
|
||||
|
||||
[tool.poe.tasks]
|
||||
jellyplayer = "python jellyplayer/__init__.py"
|
||||
|
||||
Reference in new issue
Block a user