diff --git a/.gitignore b/.gitignore index d5386bd..48a9acc 100644 --- a/.gitignore +++ b/.gitignore @@ -38,5 +38,12 @@ Thumbs.db # Tizen Studio Workspace workspace/ +# Android +android-app/.gradle/ +android-app/build/ +android-app/app/build/ +android-app/local.properties +android-app/*.apk.idsig + # Claude .claude/ diff --git a/android-app/VideoKonverter-v1.0.0.apk b/android-app/VideoKonverter-v1.0.0.apk new file mode 100644 index 0000000..8011652 Binary files /dev/null and b/android-app/VideoKonverter-v1.0.0.apk differ diff --git a/android-app/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android-app/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..f281fcc Binary files /dev/null and b/android-app/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android-app/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android-app/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..d241c4f Binary files /dev/null and b/android-app/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android-app/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android-app/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..4a69a40 Binary files /dev/null and b/android-app/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android-app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android-app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..4f8fa1c Binary files /dev/null and b/android-app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android-app/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android-app/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..8fcf235 Binary files /dev/null and b/android-app/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android-app/gradle/wrapper/gradle-wrapper.jar b/android-app/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..61285a6 Binary files /dev/null and b/android-app/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android-app/gradle/wrapper/gradle-wrapper.properties b/android-app/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..e2847c8 --- /dev/null +++ b/android-app/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/android-app/gradlew b/android-app/gradlew new file mode 100644 index 0000000..adff685 --- /dev/null +++ b/android-app/gradlew @@ -0,0 +1,248 @@ +#!/bin/sh + +# +# Copyright © 2015 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/android-app/gradlew.bat b/android-app/gradlew.bat new file mode 100644 index 0000000..c4bdd3a --- /dev/null +++ b/android-app/gradlew.bat @@ -0,0 +1,93 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/android-app/settings.gradle.kts b/android-app/settings.gradle.kts index 3661afd..30b1cf0 100644 --- a/android-app/settings.gradle.kts +++ b/android-app/settings.gradle.kts @@ -5,7 +5,8 @@ pluginManagement { gradlePluginPortal() } } -dependencyResolution { +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() diff --git a/android-app/videokonverter.jks b/android-app/videokonverter.jks new file mode 100644 index 0000000..ae3c3bf Binary files /dev/null and b/android-app/videokonverter.jks differ diff --git a/tizen-app/index.html b/tizen-app/index.html index 2fd2ff6..ce7b468 100644 --- a/tizen-app/index.html +++ b/tizen-app/index.html @@ -102,6 +102,21 @@ var SUPPORTED_VIDEO = ["h264", "hevc", "av1", "vp9"]; var SUPPORTED_AUDIO = ["aac", "opus", "ac3", "eac3", "flac", "mp3", "vorbis", "pcm"]; + // === Media-Keys registrieren (Tizen erfordert explizite Registrierung) === + try { + var keysToRegister = [ + "MediaPlayPause", "MediaPlay", "MediaPause", "MediaStop", + "MediaFastForward", "MediaRewind", "MediaTrackPrevious", "MediaTrackNext", + "ColorF0Red", "ColorF1Green", "ColorF2Yellow", "ColorF3Blue" + ]; + keysToRegister.forEach(function(key) { + try { tizen.tvinputdevice.registerKey(key); } catch (e) {} + }); + console.info("[TizenApp] Media-Keys registriert: " + keysToRegister.join(", ")); + } catch (e) { + console.warn("[TizenApp] tvinputdevice nicht verfuegbar:", e); + } + // === Setup === var savedUrl = localStorage.getItem(STORAGE_KEY); @@ -420,6 +435,14 @@ // === Tastatur-Handling === + // Media-Key-Codes die bei AVPlay direkt behandelt oder an iframe weitergeleitet werden + var MEDIA_KEYCODES = { + 415: "play", 19: "pause", 413: "stop", + 417: "fastforward", 412: "rewind", + 10252: "playpause", // MediaPlayPause + 403: "colorred", 404: "colorgreen", 405: "coloryellow", 406: "colorblue" + }; + document.addEventListener("keydown", function(e) { // Samsung Remote: Return/Back = 10009 if (e.keyCode === 10009) { @@ -439,6 +462,46 @@ // iframe sichtbar -> History-Back im iframe // (wird vom iframe selbst gehandelt via keydown event) + return; + } + + // Media-Keys behandeln + if (e.keyCode in MEDIA_KEYCODES) { + if (_avplayActive) { + // AVPlay aktiv -> direkt steuern + var action = MEDIA_KEYCODES[e.keyCode]; + if (action === "play" || action === "playpause") { + if (!_playing) _avplay_resume(); else _avplay_pause(); + } else if (action === "pause") { + _avplay_pause(); + } else if (action === "stop") { + _avplay_stop(); + _sendEvent("stopped"); + } else if (action === "fastforward") { + // +10 Sekunden + try { + var cur = webapis.avplay.getCurrentTime(); + _avplay_seek(cur + 10000); + } catch (ex) {} + } else if (action === "rewind") { + // -10 Sekunden + try { + var cur2 = webapis.avplay.getCurrentTime(); + _avplay_seek(Math.max(0, cur2 - 10000)); + } catch (ex) {} + } + e.preventDefault(); + return; + } + + // AVPlay nicht aktiv -> Key-Event an iframe weiterleiten + if (_iframe && _iframe.contentWindow) { + _sendToIframe({ + type: "vknative_keyevent", + keyCode: e.keyCode + }); + e.preventDefault(); + } } }); diff --git a/video-konverter/app/routes/library_api.py b/video-konverter/app/routes/library_api.py index eb7647a..6df0381 100644 --- a/video-konverter/app/routes/library_api.py +++ b/video-konverter/app/routes/library_api.py @@ -151,12 +151,53 @@ def setup_library_routes(app: web.Application, config: Config, # === Serien === + # Mapping: Preset video_codec -> ffprobe-Codec-Name in der DB + _PRESET_TO_DB_CODEC = { + "av1_vaapi": "av1", "libsvtav1": "av1", + "hevc_vaapi": "hevc", "libx265": "hevc", + "h264_vaapi": "h264", "libx264": "h264", + } + async def get_series(request: web.Request) -> web.Response: - """GET /api/library/series""" + """GET /api/library/series - mit optionalem Codec-Badge""" path_id = request.query.get("path_id") if path_id: path_id = int(path_id) series = await library_service.get_series_list(path_id) + + # Codec-Badge: Pruefen ob alle Videos einer Serie den Ziel-Codec haben + preset = config.default_preset + preset_codec = preset.get("video_codec", "") + target_codec = _PRESET_TO_DB_CODEC.get(preset_codec, "") + + if target_codec and series: + pool = library_service._db_pool + if pool: + try: + async with pool.acquire() as conn: + async with conn.cursor(aiomysql.DictCursor) as cur: + await cur.execute(""" + SELECT series_id, + COUNT(*) AS total, + SUM(CASE WHEN LOWER(video_codec) = %s + THEN 1 ELSE 0 END) AS matching + FROM library_videos + WHERE series_id IS NOT NULL + GROUP BY series_id + """, (target_codec,)) + codec_stats = { + r["series_id"]: r + for r in await cur.fetchall() + } + # Badge zuweisen wenn alle Videos passen + for s in series: + stats = codec_stats.get(s.get("id")) + if (stats and stats["total"] > 0 + and stats["total"] == stats["matching"]): + s["codec_badge"] = target_codec.upper() + except Exception as e: + logging.warning(f"Codec-Badge Query fehlgeschlagen: {e}") + return web.json_response({"series": series}) async def get_series_detail(request: web.Request) -> web.Response: diff --git a/video-konverter/app/routes/tv_api.py b/video-konverter/app/routes/tv_api.py index cf5ec2d..13fc701 100644 --- a/video-konverter/app/routes/tv_api.py +++ b/video-konverter/app/routes/tv_api.py @@ -76,6 +76,15 @@ def setup_tv_routes(app: web.Application, config: Config, # --- Auth-Hilfsfunktionen --- + def _cookie_params(request: web.Request) -> dict: + """SameSite-Parameter je nach Protokoll: None+Secure bei HTTPS, Lax bei HTTP. + Browser verwerfen SameSite=None ohne Secure-Flag stillschweigend.""" + is_https = (request.secure + or request.headers.get("X-Forwarded-Proto") == "https") + if is_https: + return {"samesite": "None", "secure": True} + return {"samesite": "Lax"} + async def get_tv_user(request: web.Request) -> dict | None: """Prueft Session-Cookie, gibt User zurueck oder None""" session_id = request.cookies.get("vk_session") @@ -120,7 +129,8 @@ def setup_tv_routes(app: web.Application, config: Config, resp.set_cookie( "vk_session", session_id, max_age=10 * 365 * 24 * 3600, - httponly=True, samesite="None", path="/", + httponly=True, path="/", + **_cookie_params(request), ) return resp elif len(profiles) > 1: @@ -168,17 +178,15 @@ def setup_tv_routes(app: web.Application, config: Config, resp.set_cookie( "vk_session", session_id, max_age=max_age, - httponly=True, - samesite="None", - path="/", + httponly=True, path="/", + **_cookie_params(request), ) # Client-ID Cookie (immer permanent) resp.set_cookie( "vk_client_id", client_id, max_age=10 * 365 * 24 * 3600, # 10 Jahre - httponly=True, - samesite="None", - path="/", + httponly=True, path="/", + **_cookie_params(request), ) return resp @@ -626,17 +634,39 @@ def setup_tv_routes(app: web.Application, config: Config, # Watch-Threshold aus Config (Standard: 90%, wie Plex) watched_threshold = config.tv_config.get("watched_threshold_pct", 90) + # Pro Staffel: Anzahl gesamt und gesehen berechnen + season_watched = {} + for sn, eps in seasons.items(): + total = len(eps) + seen = sum(1 for ep in eps + if ep.get("progress_pct", 0) >= watched_threshold) + season_watched[sn] = { + "total": total, "seen": seen, + "all_seen": total > 0 and seen == total, + } + + # Post-Play Parameter (vom Player nach Episoden-Ende) + post_play = request.query.get("post_play") == "1" + next_video_id = request.query.get("next_video", "") + countdown = int(request.query.get("countdown", "10") or "10") + last_watched_id = request.query.get("last_watched", "") + return aiohttp_jinja2.render_template( "tv/series_detail.html", request, { "user": user, "active": "series", "series": series, "seasons": dict(sorted(seasons.items())), + "season_watched": season_watched, "in_watchlist": in_watchlist, "user_rating": user_rating, "avg_rating": avg_rating, "tvdb_score": series.get("tvdb_score"), "watched_threshold_pct": watched_threshold, + "post_play": post_play, + "next_video_id": next_video_id, + "countdown": countdown, + "last_watched_id": last_watched_id, } ) @@ -912,6 +942,11 @@ def setup_tv_routes(app: web.Application, config: Config, if client_id: client = await auth_service.get_client_settings(client_id) + # URL zur Seriendetail-Seite (fuer Post-Play Navigation) + series_detail_url = "" + if video.get("series_id"): + series_detail_url = f"/tv/series/{video['series_id']}" + return aiohttp_jinja2.render_template( "tv/player.html", request, { "user": user, @@ -920,6 +955,7 @@ def setup_tv_routes(app: web.Application, config: Config, "start_pos": start_pos, "next_video": next_video, "next_title": next_title, + "series_detail_url": series_detail_url, "client_sound_mode": client.get("sound_mode", "stereo") if client else "stereo", "client_stream_quality": client.get("stream_quality", "hd") if client else "hd", } @@ -1174,12 +1210,14 @@ def setup_tv_routes(app: web.Application, config: Config, resp.set_cookie( "vk_session", session_id, max_age=10 * 365 * 24 * 3600, - httponly=True, samesite="None", path="/", + httponly=True, path="/", + **_cookie_params(request), ) resp.set_cookie( "vk_client_id", client_id, max_age=10 * 365 * 24 * 3600, - httponly=True, samesite="None", path="/", + httponly=True, path="/", + **_cookie_params(request), ) return resp diff --git a/video-konverter/app/static/css/style.css b/video-konverter/app/static/css/style.css index 52bd5f7..3b3001b 100644 --- a/video-konverter/app/static/css/style.css +++ b/video-konverter/app/static/css/style.css @@ -957,6 +957,10 @@ legend { } .series-card:hover { border-color: #444; } +.series-poster-wrap { + position: relative; + flex-shrink: 0; +} .series-poster { width: 60px; height: 90px; @@ -964,6 +968,19 @@ legend { border-radius: 4px; flex-shrink: 0; } +.series-codec-badge { + position: absolute; + bottom: 2px; + left: 2px; + background: #2e7d32; + color: #fff; + font-size: 0.6rem; + padding: 1px 5px; + border-radius: 3px; + font-weight: 700; + letter-spacing: 0.5px; + line-height: 1.3; +} .series-poster-placeholder { width: 60px; height: 90px; @@ -1946,3 +1963,37 @@ legend { .artwork-gallery { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); } .lib-section-header { flex-direction: column; align-items: flex-start; } } + +/* === Import: Separate Fortschrittsbalken pro Job === */ +.import-job-progress { + padding: 0.6rem 0; + border-bottom: 1px solid #2a2a2a; +} +.import-job-progress:last-child { border-bottom: none; } +.import-job-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.3rem; + font-size: 0.85rem; +} +.import-job-name { + font-weight: 600; + color: #eee; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 70%; +} +.import-job-status { + font-size: 0.8rem; + color: #aaa; + font-weight: 500; +} +.import-job-progress .progress-container { + margin-bottom: 0.2rem; +} +.import-job-text { + font-size: 0.78rem; + display: block; +} diff --git a/video-konverter/app/static/js/library.js b/video-konverter/app/static/js/library.js index 3144d1f..38b0ac7 100644 --- a/video-konverter/app/static/js/library.js +++ b/video-konverter/app/static/js/library.js @@ -465,9 +465,14 @@ function renderSeriesGrid(series) { const tvdbBtn = s.tvdb_id ? `TVDB` : ``; + const codecBadge = s.codec_badge + ? `${escapeHtml(s.codec_badge)}` : ""; html += `