mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-29 00:10:35 +05:30
Replace avatar and thumbnail URLs attributes and methods to List<Image> in InfoItemsCollectors
This commit is contained in:
parent
ca1d4a6fa4
commit
0f4a5a8184
@ -1,28 +1,28 @@
|
|||||||
package org.schabi.newpipe.extractor.channel;
|
|
||||||
|
|
||||||
import org.schabi.newpipe.extractor.InfoItemsCollector;
|
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created by Christian Schabesberger on 12.02.17.
|
* Created by Christian Schabesberger on 12.02.17.
|
||||||
*
|
*
|
||||||
* Copyright (C) Christian Schabesberger 2017 <chris.schabesberger@mailbox.org>
|
* Copyright (C) Christian Schabesberger 2017 <chris.schabesberger@mailbox.org>
|
||||||
* ChannelInfoItemsCollector.java is part of NewPipe.
|
* ChannelInfoItemsCollector.java is part of NewPipe Extractor.
|
||||||
*
|
*
|
||||||
* NewPipe is free software: you can redistribute it and/or modify
|
* NewPipe Extractor is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* NewPipe is distributed in the hope that it will be useful,
|
* NewPipe Extractor is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
|
* along with NewPipe Extractor. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package org.schabi.newpipe.extractor.channel;
|
||||||
|
|
||||||
|
import org.schabi.newpipe.extractor.InfoItemsCollector;
|
||||||
|
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
||||||
|
|
||||||
public final class ChannelInfoItemsCollector
|
public final class ChannelInfoItemsCollector
|
||||||
extends InfoItemsCollector<ChannelInfoItem, ChannelInfoItemExtractor> {
|
extends InfoItemsCollector<ChannelInfoItem, ChannelInfoItemExtractor> {
|
||||||
public ChannelInfoItemsCollector(final int serviceId) {
|
public ChannelInfoItemsCollector(final int serviceId) {
|
||||||
@ -47,7 +47,7 @@ public final class ChannelInfoItemsCollector
|
|||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
resultItem.setThumbnailUrl(extractor.getThumbnailUrl());
|
resultItem.setThumbnails(extractor.getThumbnails());
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ public final class CommentsInfoItemsCollector
|
|||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
resultItem.setUploaderAvatarUrl(extractor.getUploaderAvatarUrl());
|
resultItem.setUploaderAvatars(extractor.getUploaderAvatars());
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ public final class CommentsInfoItemsCollector
|
|||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
resultItem.setThumbnailUrl(extractor.getThumbnailUrl());
|
resultItem.setThumbnails(extractor.getThumbnails());
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ public class PlaylistInfoItemsCollector
|
|||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
resultItem.setThumbnailUrl(extractor.getThumbnailUrl());
|
resultItem.setThumbnails(extractor.getThumbnails());
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* Created by Christian Schabesberger on 28.02.16.
|
||||||
|
*
|
||||||
|
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
|
||||||
|
* StreamInfoItemsCollector.java is part of NewPipe Extractor.
|
||||||
|
*
|
||||||
|
* NewPipe Extractor is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* NewPipe Extractor is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with NewPipe Extractor. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.schabi.newpipe.extractor.stream;
|
package org.schabi.newpipe.extractor.stream;
|
||||||
|
|
||||||
import org.schabi.newpipe.extractor.InfoItemsCollector;
|
import org.schabi.newpipe.extractor.InfoItemsCollector;
|
||||||
@ -6,26 +26,6 @@ import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
|||||||
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
|
||||||
/*
|
|
||||||
* Created by Christian Schabesberger on 28.02.16.
|
|
||||||
*
|
|
||||||
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
|
|
||||||
* StreamInfoItemsCollector.java is part of NewPipe.
|
|
||||||
*
|
|
||||||
* NewPipe is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* NewPipe is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class StreamInfoItemsCollector
|
public class StreamInfoItemsCollector
|
||||||
extends InfoItemsCollector<StreamInfoItem, StreamInfoItemExtractor> {
|
extends InfoItemsCollector<StreamInfoItem, StreamInfoItemExtractor> {
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ public class StreamInfoItemsCollector
|
|||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
resultItem.setThumbnailUrl(extractor.getThumbnailUrl());
|
resultItem.setThumbnails(extractor.getThumbnails());
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ public class StreamInfoItemsCollector
|
|||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
resultItem.setUploaderAvatarUrl(extractor.getUploaderAvatarUrl());
|
resultItem.setUploaderAvatars(extractor.getUploaderAvatars());
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
@ -111,8 +111,7 @@ public class StreamInfoItemsCollector
|
|||||||
public void commit(final StreamInfoItemExtractor extractor) {
|
public void commit(final StreamInfoItemExtractor extractor) {
|
||||||
try {
|
try {
|
||||||
addItem(extract(extractor));
|
addItem(extract(extractor));
|
||||||
} catch (final FoundAdException ae) {
|
} catch (final FoundAdException ignored) {
|
||||||
//System.out.println("AD_WARNING: " + ae.getMessage());
|
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
addError(e);
|
addError(e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user