refactor(reader): the unit's tables move into reader/models

VideoState, Playlist, PlaylistItem, SavedView, ComfortPin, Tag and ChannelTag leave app/models.py
for app/reader/models.py; app.tables registers them. No schema change.
This commit is contained in:
2026-10-19 00:53:44 +02:00
parent e9c60f72cd
commit e82f87acb0
35 changed files with 262 additions and 274 deletions
+2 -1
View File
@@ -12,7 +12,8 @@ from sqlalchemy import and_, exists, func, select
from sqlalchemy.orm import Session
from app import logs, progress, sysconfig
from app.models import Channel, ChannelTag, SavedView, Tag, Video
from app.models import Channel, Video
from app.reader.models import ChannelTag, SavedView, Tag
log = logs.get_logger(__name__)
+2 -9
View File
@@ -14,15 +14,8 @@ from sqlalchemy import delete, or_, select
from sqlalchemy.orm import Session
from app import logs, sysconfig
from app.models import (
Channel,
ExploredChannel,
PlaylistItem,
SearchFind,
Subscription,
Video,
VideoState,
)
from app.models import Channel, ExploredChannel, SearchFind, Subscription, Video
from app.reader.models import PlaylistItem, VideoState
from app.sync.videos import insert_stubs, stub_from_playlist_item, apply_video_details
from app.youtube.client import YouTubeClient, YouTubeError, is_playlist_gone
+2 -1
View File
@@ -27,7 +27,8 @@ from sqlalchemy.orm import Session
from app import logs, progress, quota, sysconfig
from app.config import settings
from app.models import Playlist, PlaylistItem, Video
from app.models import Video
from app.reader.models import Playlist, PlaylistItem
from app.notifications import create_notification
from app.sync.runner import get_service_user
from app.sync.videos import apply_video_details, parse_dt
+2 -1
View File
@@ -21,7 +21,8 @@ from sqlalchemy.pool import NullPool
from app import logs, progress, quota
from app.auth import has_read_scope
from app.models import Channel, Playlist, PlaylistItem, User, Video
from app.models import Channel, User, Video
from app.reader.models import Playlist, PlaylistItem
from app.sync.playlist_merge import merge_plan
from app.sync.runner import token_users
from app.sync.subscriptions import blank_listing, refuse_blank_listing, vanished
+2 -1
View File
@@ -23,7 +23,8 @@ from collections import Counter
from sqlalchemy import select
from sqlalchemy.orm import Session
from app.models import ChannelTag, Subscription, Tag, User
from app.models import Subscription, User
from app.reader.models import ChannelTag, Tag
# A user tag needs at least this many manually-tagged example channels before we trust its
# profile — fewer is noise (one gaming-cooking channel shouldn't make "cooking" mean "gaming").