chore(api): move podcasts in dedicated app (#1899)
This commit is contained in:
parent
4004981429
commit
b9895d19e2
|
@ -0,0 +1,7 @@
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class PodcastsConfig(AppConfig):
|
||||||
|
default_auto_field = "django.db.models.BigAutoField"
|
||||||
|
name = "libretime_api.podcasts"
|
||||||
|
verbose_name = "LibreTime Podcasts API"
|
|
@ -0,0 +1 @@
|
||||||
|
from .podcast import ImportedPodcast, Podcast, PodcastEpisode, StationPodcast
|
|
@ -0,0 +1,14 @@
|
||||||
|
from rest_framework import routers
|
||||||
|
|
||||||
|
from .views import (
|
||||||
|
ImportedPodcastViewSet,
|
||||||
|
PodcastEpisodeViewSet,
|
||||||
|
PodcastViewSet,
|
||||||
|
StationPodcastViewSet,
|
||||||
|
)
|
||||||
|
|
||||||
|
router = routers.DefaultRouter()
|
||||||
|
router.register("podcast-episodes", PodcastEpisodeViewSet)
|
||||||
|
router.register("podcasts", PodcastViewSet)
|
||||||
|
router.register("station-podcasts", StationPodcastViewSet)
|
||||||
|
router.register("imported-podcasts", ImportedPodcastViewSet)
|
|
@ -0,0 +1,6 @@
|
||||||
|
from .podcast import (
|
||||||
|
ImportedPodcastSerializer,
|
||||||
|
PodcastEpisodeSerializer,
|
||||||
|
PodcastSerializer,
|
||||||
|
StationPodcastSerializer,
|
||||||
|
)
|
|
@ -0,0 +1,6 @@
|
||||||
|
from .podcast import (
|
||||||
|
ImportedPodcastViewSet,
|
||||||
|
PodcastEpisodeViewSet,
|
||||||
|
PodcastViewSet,
|
||||||
|
StationPodcastViewSet,
|
||||||
|
)
|
|
@ -1,5 +1,4 @@
|
||||||
from .playlist import Playlist, PlaylistContent
|
from .playlist import Playlist, PlaylistContent
|
||||||
from .podcast import ImportedPodcast, Podcast, PodcastEpisode, StationPodcast
|
|
||||||
from .schedule import Schedule
|
from .schedule import Schedule
|
||||||
from .show import Show, ShowDays, ShowHost, ShowInstance, ShowRebroadcast
|
from .show import Show, ShowDays, ShowHost, ShowInstance, ShowRebroadcast
|
||||||
from .smart_block import SmartBlock, SmartBlockContent, SmartBlockCriteria
|
from .smart_block import SmartBlock, SmartBlockContent, SmartBlockCriteria
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
from rest_framework import routers
|
from rest_framework import routers
|
||||||
|
|
||||||
from .views import (
|
from .views import (
|
||||||
ImportedPodcastViewSet,
|
|
||||||
PlaylistContentViewSet,
|
PlaylistContentViewSet,
|
||||||
PlaylistViewSet,
|
PlaylistViewSet,
|
||||||
PodcastEpisodeViewSet,
|
|
||||||
PodcastViewSet,
|
|
||||||
ScheduleViewSet,
|
ScheduleViewSet,
|
||||||
ShowDaysViewSet,
|
ShowDaysViewSet,
|
||||||
ShowHostViewSet,
|
ShowHostViewSet,
|
||||||
|
@ -15,7 +12,6 @@ from .views import (
|
||||||
SmartBlockContentViewSet,
|
SmartBlockContentViewSet,
|
||||||
SmartBlockCriteriaViewSet,
|
SmartBlockCriteriaViewSet,
|
||||||
SmartBlockViewSet,
|
SmartBlockViewSet,
|
||||||
StationPodcastViewSet,
|
|
||||||
WebstreamMetadataViewSet,
|
WebstreamMetadataViewSet,
|
||||||
WebstreamViewSet,
|
WebstreamViewSet,
|
||||||
)
|
)
|
||||||
|
@ -23,10 +19,6 @@ from .views import (
|
||||||
router = routers.DefaultRouter()
|
router = routers.DefaultRouter()
|
||||||
router.register("playlist-contents", PlaylistContentViewSet)
|
router.register("playlist-contents", PlaylistContentViewSet)
|
||||||
router.register("playlists", PlaylistViewSet)
|
router.register("playlists", PlaylistViewSet)
|
||||||
router.register("podcast-episodes", PodcastEpisodeViewSet)
|
|
||||||
router.register("podcasts", PodcastViewSet)
|
|
||||||
router.register("station-podcasts", StationPodcastViewSet)
|
|
||||||
router.register("imported-podcasts", ImportedPodcastViewSet)
|
|
||||||
router.register("schedule", ScheduleViewSet)
|
router.register("schedule", ScheduleViewSet)
|
||||||
router.register("show-days", ShowDaysViewSet)
|
router.register("show-days", ShowDaysViewSet)
|
||||||
router.register("show-hosts", ShowHostViewSet)
|
router.register("show-hosts", ShowHostViewSet)
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
from .playlist import PlaylistContentSerializer, PlaylistSerializer
|
from .playlist import PlaylistContentSerializer, PlaylistSerializer
|
||||||
from .podcast import (
|
|
||||||
ImportedPodcastSerializer,
|
|
||||||
PodcastEpisodeSerializer,
|
|
||||||
PodcastSerializer,
|
|
||||||
StationPodcastSerializer,
|
|
||||||
)
|
|
||||||
from .schedule import ScheduleSerializer
|
from .schedule import ScheduleSerializer
|
||||||
from .show import (
|
from .show import (
|
||||||
ShowDaysSerializer,
|
ShowDaysSerializer,
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
from .playlist import PlaylistContentViewSet, PlaylistViewSet
|
from .playlist import PlaylistContentViewSet, PlaylistViewSet
|
||||||
from .podcast import (
|
|
||||||
ImportedPodcastViewSet,
|
|
||||||
PodcastEpisodeViewSet,
|
|
||||||
PodcastViewSet,
|
|
||||||
StationPodcastViewSet,
|
|
||||||
)
|
|
||||||
from .schedule import ScheduleViewSet
|
from .schedule import ScheduleViewSet
|
||||||
from .show import (
|
from .show import (
|
||||||
ShowDaysViewSet,
|
ShowDaysViewSet,
|
||||||
|
|
|
@ -13,6 +13,7 @@ INSTALLED_APPS = [
|
||||||
"libretime_api.core",
|
"libretime_api.core",
|
||||||
"libretime_api.history",
|
"libretime_api.history",
|
||||||
"libretime_api.storage",
|
"libretime_api.storage",
|
||||||
|
"libretime_api.podcasts",
|
||||||
"libretime_api.schedule",
|
"libretime_api.schedule",
|
||||||
"django.contrib.auth",
|
"django.contrib.auth",
|
||||||
"django.contrib.contenttypes",
|
"django.contrib.contenttypes",
|
||||||
|
|
|
@ -11,6 +11,7 @@ from rest_framework import routers
|
||||||
from .core.router import router as core_router
|
from .core.router import router as core_router
|
||||||
from .core.views import version
|
from .core.views import version
|
||||||
from .history.router import router as history_router
|
from .history.router import router as history_router
|
||||||
|
from .podcasts.router import router as podcasts_router
|
||||||
from .schedule.router import router as schedule_router
|
from .schedule.router import router as schedule_router
|
||||||
from .storage.router import router as storage_router
|
from .storage.router import router as storage_router
|
||||||
|
|
||||||
|
@ -18,6 +19,7 @@ router = routers.DefaultRouter()
|
||||||
|
|
||||||
router.registry.extend(core_router.registry)
|
router.registry.extend(core_router.registry)
|
||||||
router.registry.extend(history_router.registry)
|
router.registry.extend(history_router.registry)
|
||||||
|
router.registry.extend(podcasts_router.registry)
|
||||||
router.registry.extend(schedule_router.registry)
|
router.registry.extend(schedule_router.registry)
|
||||||
router.registry.extend(storage_router.registry)
|
router.registry.extend(storage_router.registry)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue