diff --git a/Public API v1.yaml b/Public API v1.yaml index 1d9e0dd..f9879e8 100644 --- a/Public API v1.yaml +++ b/Public API v1.yaml @@ -1826,7 +1826,6 @@ components: required: - name - url - - streamingOnly type: object properties: name: @@ -2608,7 +2607,6 @@ components: - url - type - user_uid - - streamingOnly - isPlaylist - videos type: object @@ -2624,8 +2622,6 @@ components: user_uid: type: string nullable: true - streamingOnly: - type: boolean isPlaylist: type: boolean archive: diff --git a/backend/app.js b/backend/app.js index 249224d..514d82b 100644 --- a/backend/app.js +++ b/backend/app.js @@ -1272,7 +1272,7 @@ app.post('/api/getSubscription', optionalJwt, async (req, res) => { subscription = JSON.parse(JSON.stringify(subscription)); // get sub videos - if (subscription.name && !subscription.streamingOnly) { + if (subscription.name) { var parsed_files = await db_api.getRecords('files', {sub_id: subscription.id}); // subscription.videos; subscription['videos'] = parsed_files; // loop through files for extra processing @@ -1282,19 +1282,6 @@ app.post('/api/getSubscription', optionalJwt, async (req, res) => { if (file && file['url'].includes('twitch.tv')) file['chat_exists'] = fs.existsSync(file['path'].substring(0, file['path'].length - 4) + '.twitch_chat.json'); } - res.send({ - subscription: subscription, - files: parsed_files - }); - } else if (subscription.name && subscription.streamingOnly) { - // return list of videos - let parsed_files = []; - if (subscription.videos) { - for (let i = 0; i < subscription.videos.length; i++) { - const video = subscription.videos[i]; - parsed_files.push(new utils.File(video.title, video.title, video.thumbnail, false, video.duration, video.url, video.uploader, video.size, null, null, video.upload_date, video.view_count, video.height, video.abr)); - } - } res.send({ subscription: subscription, files: parsed_files diff --git a/backend/subscriptions.js b/backend/subscriptions.js index 295818b..d424444 100644 --- a/backend/subscriptions.js +++ b/backend/subscriptions.js @@ -389,11 +389,6 @@ async function generateArgsForSubscription(sub, user_uid, redownload = false, de downloadConfig.push('--download-archive', archive_path); } - // if streaming only mode, just get the list of videos - if (sub.streamingOnly) { - downloadConfig = ['-f', 'best', '--dump-json']; - } - if (sub.timerange && !redownload) { downloadConfig.push('--dateafter', sub.timerange); } diff --git a/src/api-types/models/Subscription.ts b/src/api-types/models/Subscription.ts index 5c87886..2e280d8 100644 --- a/src/api-types/models/Subscription.ts +++ b/src/api-types/models/Subscription.ts @@ -10,7 +10,6 @@ export type Subscription = { id: string; type: FileType; user_uid: string | null; - streamingOnly: boolean; isPlaylist: boolean; archive?: string; timerange?: string; diff --git a/src/app/components/recent-videos/recent-videos.component.ts b/src/app/components/recent-videos/recent-videos.component.ts index 0c2f9f8..90522ff 100644 --- a/src/app/components/recent-videos/recent-videos.component.ts +++ b/src/app/components/recent-videos/recent-videos.component.ts @@ -215,18 +215,9 @@ export class RecentVideosComponent implements OnInit { navigateToFile(file: DatabaseFile, new_tab: boolean): void { localStorage.setItem('player_navigator', this.router.url); if (file.sub_id) { - const sub = this.postsService.getSubscriptionByID(file.sub_id); - if (sub.streamingOnly) { - // streaming only mode subscriptions - // !new_tab ? this.router.navigate(['/player', {name: file.id, - // url: file.requested_formats ? file.requested_formats[0].url : file.url}]) - // : window.open(`/#/player;name=${file.id};url=${file.requested_formats ? file.requested_formats[0].url : file.url}`); - } else { - // normal subscriptions !new_tab ? this.router.navigate(['/player', {uid: file.uid, - type: file.isAudio ? 'audio' : 'video'}]) + type: file.isAudio ? 'audio' : 'video'}]) : window.open(`/#/player;uid=${file.uid};type=${file.isAudio ? 'audio' : 'video'}`); - } } else { // normal files !new_tab ? this.router.navigate(['/player', {type: file.isAudio ? 'audio' : 'video', uid: file.uid}]) diff --git a/src/app/dialogs/edit-subscription-dialog/edit-subscription-dialog.component.html b/src/app/dialogs/edit-subscription-dialog/edit-subscription-dialog.component.html index f76af9f..51ed8ee 100644 --- a/src/app/dialogs/edit-subscription-dialog/edit-subscription-dialog.component.html +++ b/src/app/dialogs/edit-subscription-dialog/edit-subscription-dialog.component.html @@ -34,11 +34,6 @@ -
-
- Streaming-only mode -
-
diff --git a/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.html b/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.html index 7b53c01..fe53377 100644 --- a/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.html +++ b/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.html @@ -47,11 +47,6 @@ Audio-only mode
-
-
- Streaming-only mode -
-
diff --git a/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.ts b/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.ts index 3e7640a..507dc86 100644 --- a/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.ts +++ b/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.ts @@ -21,9 +21,6 @@ export class SubscribeDialogComponent implements OnInit { // state subscribing = false; - // no videos actually downloaded, just streamed - streamingOnlyMode = false; - // audio only mode audioOnlyMode = false;