diff --git a/tubearchivist/api/README.md b/tubearchivist/api/README.md index 0e74a11..73dd4fc 100644 --- a/tubearchivist/api/README.md +++ b/tubearchivist/api/README.md @@ -23,10 +23,6 @@ response = requests.get(url, headers=headers) ## Video Item View /api/video/\/ -## Video Player View -returns all relevant information to create video player -/api/video/\/player - ## Channel List View /api/channel/ diff --git a/tubearchivist/api/urls.py b/tubearchivist/api/urls.py index a6c6801..d39dc30 100644 --- a/tubearchivist/api/urls.py +++ b/tubearchivist/api/urls.py @@ -6,7 +6,6 @@ from api.views import ( DownloadApiListView, DownloadApiView, PlaylistApiView, - VideoApiPlayerView, VideoApiView, ) from django.urls import path @@ -17,11 +16,6 @@ urlpatterns = [ VideoApiView.as_view(), name="api-video", ), - path( - "video//player/", - VideoApiPlayerView.as_view(), - name="api-video-player", - ), path( "channel/", ChannelApiListView.as_view(), diff --git a/tubearchivist/api/views.py b/tubearchivist/api/views.py index f0923aa..ec75370 100644 --- a/tubearchivist/api/views.py +++ b/tubearchivist/api/views.py @@ -92,38 +92,6 @@ class VideoApiView(ApiBaseView): return Response(self.response, status=self.status_code) -class VideoApiPlayerView(ApiBaseView): - """resolves to /api/video//player - GET: returns dict of video to build player - """ - - search_base = "/ta_video/_doc/" - - def get(self, request, video_id): - # pylint: disable=unused-argument - """get request""" - self.config_builder() - self.get_document(video_id) - player = self.process_response() - return Response(player, status=self.status_code) - - def process_response(self): - """build all needed vars for player""" - vid_data = self.response["data"] - youtube_id = vid_data["youtube_id"] - vid_thumb_url = ThumbManager().vid_thumb_path(youtube_id) - player = { - "youtube_id": youtube_id, - "media_url": "/media/" + vid_data["media_url"], - "vid_thumb_url": "/cache/" + vid_thumb_url, - "title": vid_data["title"], - "channel_name": vid_data["channel"]["channel_name"], - "channel_id": vid_data["channel"]["channel_id"], - "is_watched": vid_data["player"]["watched"], - } - return player - - class ChannelApiView(ApiBaseView): """resolves to /api/channel// GET: returns metadata dict of channel