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
|
## DOCS TO BE AVAILABLE SOON :)
|
||||||
|
|
||||||
## 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.
|
|
||||||
+28
-30
@@ -1,32 +1,23 @@
|
|||||||
from mpv import MPV, MpvRenderContext, MpvGlGetProcAddressFn
|
from ctypes import windll, cast, c_void_p
|
||||||
__version__ = '0.1.0'
|
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 sys
|
||||||
import os
|
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(
|
os.environ["PATH"] = os.path.dirname(
|
||||||
__file__) + os.pathsep + os.environ["PATH"]
|
__file__) + os.pathsep + os.environ["PATH"]
|
||||||
|
|
||||||
|
from mpv import MPV, MpvRenderContext
|
||||||
|
|
||||||
|
__version__ = '0.1.0'
|
||||||
|
|
||||||
QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts)
|
QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts)
|
||||||
app = QApplication(["--enable-smooth-scrolling", "--enable-gpu"])
|
app = QApplication(["--enable-smooth-scrolling", "--enable-gpu"])
|
||||||
print(os.path.dirname(__file__) + os.pathsep)
|
print(os.path.dirname(__file__) + os.pathsep)
|
||||||
@@ -45,6 +36,7 @@ def restart():
|
|||||||
|
|
||||||
class Backend(QObject):
|
class Backend(QObject):
|
||||||
def __init__(self, player):
|
def __init__(self, player):
|
||||||
|
super().__init__()
|
||||||
self.player = player
|
self.player = player
|
||||||
|
|
||||||
def restart(self):
|
def restart(self):
|
||||||
@@ -59,6 +51,12 @@ class Backend(QObject):
|
|||||||
def setTime(self, time):
|
def setTime(self, time):
|
||||||
self.player.setTime(time)
|
self.player.setTime(time)
|
||||||
|
|
||||||
|
@Slot(result=int)
|
||||||
|
def getTime(self):
|
||||||
|
return self.player.time_pos
|
||||||
|
|
||||||
|
|
||||||
|
# def filehandler()
|
||||||
|
|
||||||
class MainWin(QMainWindow):
|
class MainWin(QMainWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -67,7 +65,7 @@ class MainWin(QMainWindow):
|
|||||||
self.dir = self.dirRaw.replace("\\", "/")
|
self.dir = self.dirRaw.replace("\\", "/")
|
||||||
self.view = QWebEngineView()
|
self.view = QWebEngineView()
|
||||||
self.view.load(QUrl("http://localhost:3000"))
|
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.view.raise_()
|
||||||
self.setCentralWidget(self.view)
|
self.setCentralWidget(self.view)
|
||||||
self.setWindowIcon(QIcon(QPixmap(f"{self.dir}/assets/icon.png")))
|
self.setWindowIcon(QIcon(QPixmap(f"{self.dir}/assets/icon.png")))
|
||||||
@@ -86,13 +84,9 @@ class MainWin(QMainWindow):
|
|||||||
self.inspector = QWebEngineView()
|
self.inspector = QWebEngineView()
|
||||||
self.inspector.setWindowTitle("Inspector")
|
self.inspector.setWindowTitle("Inspector")
|
||||||
|
|
||||||
self.backend = Backend(self.playerWid)
|
|
||||||
self.channel = QWebChannel()
|
|
||||||
self.channel.registerObject('backend', self.backend)
|
|
||||||
|
|
||||||
self.playerWid = QWidget(self)
|
self.playerWid = QWidget(self)
|
||||||
self.playerWid.setMinimumHeight(self.view.height)
|
self.playerWid.setMinimumHeight(self.view.height())
|
||||||
self.playerWid.setMinimumWidth(self.view.width)
|
self.playerWid.setMinimumWidth(self.view.width())
|
||||||
self.playerWid.setAttribute(Qt.WA_DontCreateNativeAncestors)
|
self.playerWid.setAttribute(Qt.WA_DontCreateNativeAncestors)
|
||||||
self.playerWid.setAttribute(Qt.WA_NativeWindow)
|
self.playerWid.setAttribute(Qt.WA_NativeWindow)
|
||||||
self.playerWid.lower()
|
self.playerWid.lower()
|
||||||
@@ -102,6 +96,10 @@ class MainWin(QMainWindow):
|
|||||||
log_handler=print,
|
log_handler=print,
|
||||||
loglevel='debug')
|
loglevel='debug')
|
||||||
|
|
||||||
|
self.backend = Backend(self.playerWid)
|
||||||
|
self.channel = QWebChannel()
|
||||||
|
self.channel.registerObject('backend', self.backend)
|
||||||
|
|
||||||
def handleLoaded(self, ok):
|
def handleLoaded(self, ok):
|
||||||
if ok:
|
if ok:
|
||||||
self.view.page().setDevToolsPage(self.inspector.page())
|
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'],
|
a = Analysis(['__init__.py'],
|
||||||
pathex=['D:\\Jellyfin\\JellyPlayer\\jellyplayer'],
|
pathex=['D:\\Jellyfin\\JellyPlayer\\jellyplayer'],
|
||||||
binaries=[],
|
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=[],
|
hiddenimports=[],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
hooksconfig={},
|
hooksconfig={},
|
||||||
|
|||||||
+2
-2
@@ -14,7 +14,7 @@ keywords = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "~3.8"
|
python = "^3.10"
|
||||||
PySide6 = "^6.3.0"
|
PySide6 = "^6.3.0"
|
||||||
Flask = "^2.1.2"
|
Flask = "^2.1.2"
|
||||||
waitress = "^2.1.1"
|
waitress = "^2.1.1"
|
||||||
@@ -25,7 +25,7 @@ PyOpenGL = "^3.1.6"
|
|||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
pytest = "~5.2"
|
pytest = "~5.2"
|
||||||
poethepoet = "^0.13.1"
|
poethepoet = "^0.13.1"
|
||||||
autopep8 = "^1.6.0"
|
autopep8 = "^1.6.0"
|
||||||
|
|
||||||
[tool.poe.tasks]
|
[tool.poe.tasks]
|
||||||
jellyplayer = "python jellyplayer/__init__.py"
|
jellyplayer = "python jellyplayer/__init__.py"
|
||||||
|
|||||||
Reference in new issue
Block a user