Skip to content

Commit 737a4ff

Browse files
FineFindusStypox
authored andcommitted
Move ContentAvailability to separate file
1 parent e2782bf commit 737a4ff

7 files changed

Lines changed: 49 additions & 30 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeStreamLinkHandlerFactory;
3636
import org.schabi.newpipe.extractor.stream.StreamInfoItemExtractor;
3737
import org.schabi.newpipe.extractor.stream.StreamType;
38-
import org.schabi.newpipe.extractor.stream.StreamInfoItem.ContentAvailability;
38+
import org.schabi.newpipe.extractor.stream.ContentAvailability;
3939
import org.schabi.newpipe.extractor.utils.JsonUtils;
4040
import org.schabi.newpipe.extractor.utils.Parser;
4141
import org.schabi.newpipe.extractor.utils.Utils;
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Created by FineFindus on 10.07.25.
3+
*
4+
* Copyright (C) 2025 FineFindus <FineFindus@proton.me>
5+
* ContentAvailability.java is part of NewPipe Extractor.
6+
*
7+
* NewPipe Extractor is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* NewPipe Extractor is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with NewPipe Extractor. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
package org.schabi.newpipe.extractor.stream;
21+
22+
/**
23+
* Availability of the stream.
24+
*
25+
* <p>
26+
* A stream may be available to all, restricted to a certain user group
27+
* or time.
28+
* </p>
29+
*/
30+
public enum ContentAvailability {
31+
/**
32+
* The stream is available to all users.
33+
*/
34+
AVAILABLE,
35+
/**
36+
* The stream is available to users with a membership.
37+
*/
38+
MEMBERSHIP,
39+
/**
40+
* The stream is behind a paywall.
41+
*/
42+
PAID,
43+
/**
44+
* The stream is only available in the future.
45+
*/
46+
UPCOMING,
47+
}

extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamExtractor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.schabi.newpipe.extractor.exceptions.ParsingException;
3434
import org.schabi.newpipe.extractor.linkhandler.LinkHandler;
3535
import org.schabi.newpipe.extractor.localization.DateWrapper;
36-
import org.schabi.newpipe.extractor.stream.StreamInfoItem.ContentAvailability;
3736
import org.schabi.newpipe.extractor.utils.Parser;
3837

3938
import javax.annotation.Nonnull;

extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.schabi.newpipe.extractor.MetaInfo;
2727
import org.schabi.newpipe.extractor.NewPipe;
2828
import org.schabi.newpipe.extractor.StreamingService;
29-
import org.schabi.newpipe.extractor.stream.StreamInfoItem.ContentAvailability;
3029
import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException;
3130
import org.schabi.newpipe.extractor.exceptions.ContentNotSupportedException;
3231
import org.schabi.newpipe.extractor.exceptions.ExtractionException;

extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItem.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -177,29 +177,4 @@ public String toString() {
177177
+ ", uploaderVerified='" + isUploaderVerified() + '\''
178178
+ '}';
179179
}
180-
181-
/**
182-
* Availablility of the stream.
183-
*
184-
* A stream may be available to all, restricted to a certain user group
185-
* or time.
186-
*/
187-
public enum ContentAvailability {
188-
/**
189-
* The stream is available to all users.
190-
*/
191-
AVAILABLE,
192-
/**
193-
* The stream is available to users whith a membership.
194-
*/
195-
MEMBERSHIP,
196-
/**
197-
* The stream is behind a paywall.
198-
*/
199-
PAID,
200-
/**
201-
* The stream is only available in the future.
202-
*/
203-
UPCOMING,
204-
}
205180
}

extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItemExtractor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.schabi.newpipe.extractor.InfoItemExtractor;
2525
import org.schabi.newpipe.extractor.exceptions.ParsingException;
2626
import org.schabi.newpipe.extractor.localization.DateWrapper;
27-
import org.schabi.newpipe.extractor.stream.StreamInfoItem.ContentAvailability;
2827

2928
import javax.annotation.Nonnull;
3029
import javax.annotation.Nullable;

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubePlaylistExtractor;
2626
import org.schabi.newpipe.extractor.stream.Description;
2727
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
28-
import org.schabi.newpipe.extractor.stream.StreamInfoItem.ContentAvailability;
28+
import org.schabi.newpipe.extractor.stream.ContentAvailability;
2929
import org.schabi.newpipe.extractor.utils.Utils;
3030

3131
import java.io.IOException;

0 commit comments

Comments
 (0)