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
+1 -4
View File
@@ -19,15 +19,12 @@ from app.models import (
LIVE_OR_UPCOMING,
BlockedChannel,
Channel,
ChannelTag,
ExploredChannel,
Playlist,
PlaylistItem,
Subscription,
Tag,
User,
Video,
)
from app.reader.models import ChannelTag, Playlist, PlaylistItem, Tag
from app.routes._common import get_or_404, not_found, owned_or_404, youtube_refusal
from app.sync.explore import explore_ingest_page
from app.sync.runner import backfill_channel_now, run_recent_backfill
+2 -1
View File
@@ -22,7 +22,8 @@ from app.db import get_db
from app.discover import hero as hero_mod
from app.discover import pins, rails
from app.discover.budget import Budget, DEFAULT_BUDGET
from app.models import ComfortPin, User
from app.models import User
from app.reader.models import ComfortPin
from app.plex.cards import norm_lang
from app.routes._common import owned_or_404, not_found
+2 -7
View File
@@ -25,13 +25,8 @@ from app.feedquery import (
windowed_rank,
windowed_relevance_rows,
)
from app.models import (
ChannelTag,
Tag,
User,
Video,
VideoState,
)
from app.models import User, Video
from app.reader.models import ChannelTag, Tag, VideoState
from app.routes._common import (
ProgressIn,
get_or_404,
+2 -1
View File
@@ -12,7 +12,8 @@ from app import quota
from app.auth import current_user, has_read_scope, has_write_scope, require_write_scope
from app.db import get_db
from app.feedquery import feed_columns, serialize
from app.models import Channel, Playlist, PlaylistItem, User, Video, VideoState
from app.models import Channel, User, Video
from app.reader.models import Playlist, PlaylistItem, VideoState
from app.sync.playlists import (
PlaylistGone,
lock_playlists,
+2 -1
View File
@@ -6,7 +6,8 @@ from sqlalchemy.orm import Session
from app.auth import current_user
from app.db import get_db
from app.models import SavedView, User
from app.models import User
from app.reader.models import SavedView
from app.routes._common import owned_or_404
from app.refusal import refused
+1 -3
View File
@@ -29,14 +29,12 @@ from app.models import (
LIVE_OR_UPCOMING,
BlockedChannel,
Channel,
Playlist,
PlaylistItem,
SearchFind,
Subscription,
User,
Video,
VideoState,
)
from app.reader.models import Playlist, PlaylistItem, VideoState
from app.feedquery import feed_columns, serialize
from app.utils import like_escape
from app.sync.subscriptions import apply_channel_details
+2 -1
View File
@@ -6,7 +6,8 @@ from sqlalchemy.orm import Session
from app.auth import current_user
from app.db import get_db
from app.models import ChannelTag, Tag, User
from app.models import User
from app.reader.models import ChannelTag, Tag
from app.routes._common import owned_or_404
from app.sync.tagsuggest import compute_tag_suggestions
from app.refusal import refused