diff --git a/lib/routes/mixcloud/config.ts b/lib/routes/mixcloud/config.ts
new file mode 100644
index 000000000..84fbe292e
--- /dev/null
+++ b/lib/routes/mixcloud/config.ts
@@ -0,0 +1,129 @@
+export const MIXCLOUD_CONFIG = {
+ host: 'https://www.mixcloud.com',
+ imageBaseURL: 'https://thumbnailer.mixcloud.com/unsafe/480x480/',
+ graphqlURL: 'https://app.mixcloud.com/graphql',
+ decryptionKey: 'IFYOUWANTTHEARTISTSTOGETPAIDDONOTDOWNLOADFROMMIXCLOUD',
+ headers: {
+ Referer: 'https://www.mixcloud.com',
+ 'Content-Type': 'application/json',
+ 'X-Requested-With': 'XMLHttpRequest',
+ },
+};
+
+export const TYPE_CONFIG = {
+ uploads: 'uploads',
+ reposts: 'reposted',
+ favorites: 'favorites',
+ listens: 'listeningHistory',
+ stream: 'stream',
+ playlist: 'items',
+};
+
+export const TYPE_NAMES = {
+ uploads: 'Shows',
+ reposts: 'Reposts',
+ favorites: 'Favorites',
+ listens: 'History',
+ stream: 'Stream',
+ playlist: 'Playlist',
+};
+
+export const CLOUDCAST_FIELDS = `
+ id
+ slug
+ name
+ description
+ publishDate
+ audioLength
+ picture(width: 1024, height: 1024) {
+ url
+ }
+ owner {
+ displayName
+ username
+ url
+ }
+ streamInfo {
+ url
+ hlsUrl
+ dashUrl
+ }
+ favorites {
+ totalCount
+ }
+ reposts {
+ totalCount
+ }
+ plays
+ tags {
+ tag {
+ name
+ }
+ }
+ featuringArtistList
+ isExclusive
+ restrictedReason
+ comments(first: 100) {
+ edges {
+ node {
+ comment
+ created
+ user {
+ displayName
+ username
+ }
+ }
+ }
+ totalCount
+ }
+`;
+
+export function getObjectFields(type: string): { objectType: string; objectFields: string } {
+ if (type === 'playlist') {
+ return {
+ objectType: 'playlist',
+ objectFields: `
+ name
+ description
+ picture {
+ urlRoot
+ }
+ items(first: 100) {
+ edges {
+ node {
+ cloudcast {
+ ${CLOUDCAST_FIELDS}
+ }
+ }
+ }
+ pageInfo {
+ endCursor
+ hasNextPage
+ }
+ }
+ `,
+ };
+ } else {
+ const nodeTemplate = type === 'listens' ? `node { cloudcast { ${CLOUDCAST_FIELDS} } }` : `node { ${CLOUDCAST_FIELDS} }`;
+
+ return {
+ objectType: 'user',
+ objectFields: `
+ displayName
+ biog
+ picture {
+ urlRoot
+ }
+ ${TYPE_CONFIG[type]}(first: 100) {
+ edges {
+ ${nodeTemplate}
+ }
+ pageInfo {
+ endCursor
+ hasNextPage
+ }
+ }
+ `,
+ };
+ }
+}
diff --git a/lib/routes/mixcloud/index.ts b/lib/routes/mixcloud/index.ts
index a4204d789..07517ca2b 100644
--- a/lib/routes/mixcloud/index.ts
+++ b/lib/routes/mixcloud/index.ts
@@ -2,14 +2,17 @@ import { Route } from '@/types';
import got from '@/utils/got';
import CryptoJS from 'crypto-js';
import { parseDate } from '@/utils/parse-date';
-import { queries } from './queries';
import InvalidParameterError from '@/errors/types/invalid-parameter';
+import { MIXCLOUD_CONFIG, TYPE_CONFIG, TYPE_NAMES, getObjectFields } from './config';
export const route: Route = {
path: '/:username/:type?',
categories: ['multimedia'],
example: '/mixcloud/dholbach/uploads',
- parameters: { username: 'Username, can be found in URL', type: 'Type, see below, uploads by default' },
+ parameters: {
+ username: 'Username, can be found in URL',
+ type: 'Type, see below, uploads by default',
+ },
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -34,123 +37,176 @@ export const route: Route = {
| uploads | reposts | favorites | listens | stream |`,
};
-async function handler(ctx) {
- const host = 'https://www.mixcloud.com';
- const imageBaseURL = 'https://thumbnailer.mixcloud.com/unsafe/480x480/';
- const graphqlURL = 'https://app.mixcloud.com/graphql';
- const headers = {
- Referer: host,
- 'Content-Type': 'application/json',
- 'X-Requested-With': 'XMLHttpRequest',
- };
+async function callApi(objectType: string, objectFields: string, username: string, slug?: string) {
+ const lookupKey = objectType + 'Lookup';
+ const headers = MIXCLOUD_CONFIG.headers;
- const type = ctx.req.param('type') ?? 'uploads';
+ const lookupParams = slug ? `, slug: "${slug}"` : '';
+ const query = `{
+ ${lookupKey}(lookup: {username: "${username}"${lookupParams}}) {
+ ${objectFields}
+ }
+ }`;
+
+ const response = await got({
+ method: 'post',
+ url: MIXCLOUD_CONFIG.graphqlURL,
+ headers,
+ json: { query },
+ });
+
+ return response.data.data[lookupKey];
+}
+
+// https://github.com/yt-dlp/yt-dlp/commits/master/yt_dlp/extractor/mixcloud.py
+function decryptXorCipher(key: string, ciphertext: string): string {
+ const decoded = CryptoJS.enc.Base64.parse(ciphertext).toString(CryptoJS.enc.Utf8);
+ return [...decoded].map((ch, i) => String.fromCodePoint((ch.codePointAt(0) || 0) ^ (key.codePointAt(i % key.length) || 0))).join('');
+}
+
+function tryDecrypt(ciphertext: string | undefined): string {
+ if (!ciphertext) {
+ return '';
+ }
+ try {
+ return decryptXorCipher(MIXCLOUD_CONFIG.decryptionKey, ciphertext);
+ } catch {
+ return ciphertext;
+ }
+}
+
+function getCloudcast(node: any, type: string): any {
+ if (type === 'playlist' || type === 'listens') {
+ return node.cloudcast;
+ }
+ return node;
+}
+
+function getPlaylistTitle(displayName: string, type: string, playlistName?: string): string {
+ if (type === 'playlist' && playlistName) {
+ return `Mixcloud - ${displayName}'s Playlist: ${playlistName}`;
+ }
+ return `Mixcloud - ${displayName}'s ${TYPE_NAMES[type] || type}`;
+}
+
+function getPlaylistLink(username: string, type: string, playlistSlug?: string): string {
+ const host = MIXCLOUD_CONFIG.host;
+ if (type === 'playlist' && playlistSlug) {
+ return `${host}/${username}/playlists/${playlistSlug}/`;
+ }
+ return `${host}/${username}/${type === 'uploads' ? '' : type + '/'}`;
+}
+
+export async function handler(ctx) {
const username = ctx.req.param('username');
+ const playlistSlug = ctx.req.param('playlist');
+ const type = ctx.req.param('type') ?? (playlistSlug ? 'playlist' : 'uploads');
- const config = {
- stream: { name: 'Stream', node: 'stream' },
- uploads: { name: 'Shows', node: 'uploads' },
- reposts: { name: 'Reposts', node: 'reposted' },
- favorites: { name: 'Favorites', node: 'favorites' },
- listens: { name: 'History', node: 'listeningHistory' },
- };
- if (!config[type]) {
+ if (!TYPE_CONFIG[type]) {
throw new InvalidParameterError(`Invalid type: ${type}`);
}
- const payloads = {
- stream: {
- query: queries.stream.query,
- variables: {
- lookup: {
- username: ctx.req.param('username'),
- },
- },
- },
- uploads: {
- query: queries.uploads.query,
- variables: {
- lookup: {
- username: ctx.req.param('username'),
- },
- orderBy: 'LATEST',
- onlyAttributedTo: '',
- hasAttributedTo: false,
- },
- },
- reposts: {
- query: queries.reposts.query,
- variables: {
- lookup: {
- username: ctx.req.param('username'),
- },
- },
- },
- favorites: {
- query: queries.favorites.query,
- variables: {
- lookup: {
- username: ctx.req.param('username'),
- },
- },
- },
- listens: {
- query: queries.listens.query,
- variables: {
- lookup: {
- username: ctx.req.param('username'),
- },
- },
- },
- };
+ const { objectType, objectFields } = getObjectFields(type);
- const data = (
- await got({
- method: 'post',
- url: graphqlURL,
- json: payloads[type],
- headers,
+ const data = await callApi(objectType, objectFields, username, playlistSlug);
+
+ if (!data) {
+ throw new Error(`${type === 'playlist' ? 'Playlist' : 'User'} not found`);
+ }
+
+ const isPlaylist = type === 'playlist';
+ const displayName = isPlaylist ? username : data.displayName;
+ const description = isPlaylist ? data.description : data.biog;
+ const picture = data.picture;
+ const image = picture && picture.urlRoot ? `${MIXCLOUD_CONFIG.imageBaseURL}${picture.urlRoot}` : '';
+
+ const itemsData = data[TYPE_CONFIG[type]];
+ const edges = itemsData?.edges || [];
+
+ const items = edges
+ .map((edge: any) => {
+ const cloudcast = getCloudcast(edge.node, type);
+
+ if (!cloudcast) {
+ return null;
+ }
+
+ const streamInfo = cloudcast.streamInfo || {};
+ const enclosureUrl = tryDecrypt(streamInfo.url);
+ const tags = cloudcast.tags?.map((t: any) => t.tag?.name).filter(Boolean) || [];
+
+ let richDescription = cloudcast.description?.replaceAll('\n', '
') || '';
+
+ if (cloudcast.featuringArtistList && cloudcast.featuringArtistList.length > 0) {
+ const artists = cloudcast.featuringArtistList.slice(0, 5).join(', ');
+ richDescription += richDescription ? '
' : '';
+ richDescription += `Featured Artists: ${artists}`;
+ if (cloudcast.featuringArtistList.length > 5) {
+ richDescription += ` and ${cloudcast.featuringArtistList.length - 5} more...`;
+ }
+ }
+
+ const stats: string[] = [];
+ if (cloudcast.plays) {
+ stats.push(`${cloudcast.plays} plays`);
+ }
+ if (cloudcast.favorites?.totalCount) {
+ stats.push(`${cloudcast.favorites.totalCount} favorites`);
+ }
+ if (cloudcast.reposts?.totalCount) {
+ stats.push(`${cloudcast.reposts.totalCount} reposts`);
+ }
+ if (cloudcast.comments?.totalCount) {
+ stats.push(`${cloudcast.comments.totalCount} comments`);
+ }
+
+ if (stats.length > 0) {
+ richDescription += richDescription ? '
' : '';
+ richDescription += `${stats.join(' • ')}`;
+ }
+
+ return {
+ title: cloudcast.name,
+ author: cloudcast.owner?.displayName || username,
+ description: richDescription,
+ pubDate: parseDate(cloudcast.publishDate),
+ guid: Buffer.from(cloudcast.id, 'base64').toString(),
+ link: `${MIXCLOUD_CONFIG.host}/${cloudcast.owner?.username || username}/${cloudcast.slug}`,
+ itunes_item_image: cloudcast.picture?.url || '',
+ itunes_duration: cloudcast.audioLength,
+ enclosure_url: enclosureUrl,
+ enclosure_type: 'audio/x-m4a',
+ itunes_author: cloudcast.owner?.displayName || username,
+ category: tags,
+ comments: cloudcast.comments?.totalCount || 0,
+ upvotes: cloudcast.favorites?.totalCount || 0,
+ media: enclosureUrl
+ ? {
+ content: {
+ url: enclosureUrl,
+ type: 'audio/x-m4a',
+ duration: cloudcast.audioLength,
+ },
+ thumbnail: cloudcast.picture?.url
+ ? {
+ url: cloudcast.picture.url,
+ }
+ : undefined,
+ }
+ : undefined,
+ };
})
- ).data.data;
+ .filter(Boolean);
- const biog = data.user.biog;
- const image = `${imageBaseURL}${data.user.picture.urlRoot}`;
-
- // https://github.com/ytdl-org/youtube-dl/blob/f1487d4fca40fd37d735753e24a7bae53a1b1513/youtube_dl/extractor/mixcloud.py#L72-L79
- const decryptionKey = 'IFYOUWANTTHEARTISTSTOGETPAIDDONOTDOWNLOADFROMMIXCLOUD';
- const decryptXorCipher = (key, cipherText) => {
- const cipher = CryptoJS.enc.Base64.parse(cipherText);
- const decrypted = cipher.toString(CryptoJS.enc.Utf8);
- let result = '';
- for (let i = 0; i < decrypted.length; i++) {
- result += String.fromCharCode(decrypted.charCodeAt(i) ^ key.charCodeAt(i % key.length));
- }
- return result;
- };
-
- const items = data.user[config[type].node].edges.map((edge) => {
- const item = type === 'listens' ? edge.node.cloudcast : edge.node;
- return {
- title: item.name,
- author: item.owner.displayName,
- description: item.description.replaceAll('\n', '
'),
- pubDate: parseDate(item.publishDate),
- guid: Buffer.from(item.id, 'base64').toString('utf8'),
- link: `${host}/${username}/${item.slug}`,
- itunes_item_image: `${imageBaseURL}${item.picture.urlRoot}`,
- itunes_duration: item.audioLength,
- enclosure_url: decryptXorCipher(decryptionKey, item.streamInfo.url),
- enclosure_type: 'audio/x-m4a',
- upvotes: item.favorites.totalCount,
- };
- });
+ const title = getPlaylistTitle(displayName, type, data.name);
+ const link = getPlaylistLink(username, type, playlistSlug);
return {
- title: `Mixcloud - ${data.user.displayName}'s ${config[type].name}`,
- description: biog.replaceAll('\n', '
'),
- itunes_author: data.user.displayName,
+ title,
+ description: description?.replaceAll('\n', '
') || '',
+ itunes_author: displayName,
image,
- link: `${host}/${username}/${type}/`,
+ link,
item: items,
};
}
diff --git a/lib/routes/mixcloud/queries.ts b/lib/routes/mixcloud/queries.ts
deleted file mode 100644
index d6d1fa6de..000000000
--- a/lib/routes/mixcloud/queries.ts
+++ /dev/null
@@ -1,2274 +0,0 @@
-const queries = {
- stream: {
- query: `query UserStreamQuery($lookup: UserLookup!) {
- user: userLookup(lookup: $lookup) {
- username
- ...UserStreamPage_user
- id
- }
- viewer {
- ...UserStreamPage_viewer
- id
- }
- }
-
- fragment AudioCardActions_cloudcast on Cloudcast {
- isExclusive
- audioType
- owner {
- username
- isSubscribedTo
- isViewer
- id
- }
- ...AudioCardFavoriteButton_cloudcast
- ...AudioCardRepostButton_cloudcast
- ...AudioCardShareButton_cloudcast
- ...AudioCardAddToButton_cloudcast
- ...AudioCardHighlightButton_cloudcast
- ...AudioCardBoostButton_cloudcast
- ...AudioCardStats_cloudcast
- ...AudioCardMoreOptions_cloudcast
- }
-
- fragment AudioCardActions_viewer on Viewer {
- ...AudioCardFavoriteButton_viewer
- ...AudioCardRepostButton_viewer
- ...AudioCardHighlightButton_viewer
- ...AudioCardMoreOptions_viewer
- }
-
- fragment AudioCardAddToButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- }
-
- fragment AudioCardBoostButton_cloudcast on Cloudcast {
- id
- isPublic
- owner {
- id
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_cloudcast on Cloudcast {
- id
- isFavorited
- isPublic
- hiddenStats
- favorites {
- totalCount
- }
- slug
- owner {
- id
- isFollowing
- username
- isSelect
- displayName
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardHighlightButton_cloudcast on Cloudcast {
- id
- isPublic
- isHighlighted
- owner {
- isViewer
- id
- }
- }
-
- fragment AudioCardHighlightButton_viewer on Viewer {
- me {
- id
- hasProFeatures
- highlighted {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_cloudcast on Cloudcast {
- id
- isPublic
- slug
- isUnlisted
- isScheduled
- isDraft
- audioType
- isDisabledCopyright
- viewerAttribution {
- status
- id
- }
- viewerAttributionRequest {
- id
- }
- creatorAttributions(first: 2) {
- edges {
- node {
- id
- }
- }
- }
- owner {
- id
- username
- isViewer
- hasProFeatures
- viewerIsAffiliate
- displayName
- affiliateUsers {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_viewer on Viewer {
- me {
- id
- hasProFeatures
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- }
- }
-
- fragment AudioCardPlayButton_cloudcast on Cloudcast {
- id
- restrictedReason
- owner {
- isSubscribedTo
- isViewer
- id
- }
- isAwaitingAudio
- isDraft
- isPlayable
- streamInfo {
- hlsUrl
- dashUrl
- url
- uuid
- }
- audioLength
- currentPosition
- repeatPlayAmount
- hasPlayCompleted
- seekRestriction
- previewUrl
- isExclusive
- isDisabledCopyright
- ...AudioCardStaticPlayButton_cloudcast
- ...useAudioPreview_cloudcast
- ...useExclusivePreviewModal_cloudcast
- ...useExclusiveCloudcastModal_cloudcast
- }
-
- fragment AudioCardProgress_cloudcast on Cloudcast {
- id
- proportionListened
- audioLength
- }
-
- fragment AudioCardRepostButton_cloudcast on Cloudcast {
- id
- isReposted
- isExclusive
- isPublic
- reposts {
- totalCount
- }
- owner {
- isViewer
- isSubscribedTo
- id
- }
- }
-
- fragment AudioCardRepostButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardShareButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- slug
- description
- audioType
- picture {
- urlRoot
- }
- owner {
- displayName
- isViewer
- username
- id
- }
- }
-
- fragment AudioCardStaticPlayButton_cloudcast on Cloudcast {
- owner {
- username
- id
- }
- slug
- id
- restrictedReason
- }
-
- fragment AudioCardStats_cloudcast on Cloudcast {
- isExclusive
- isDraft
- hiddenStats
- plays
- publishDate
- qualityScore
- listenerMinutes
- owner {
- isSubscribedTo
- id
- }
- tags(country: "GLOBAL") {
- ...AudioCardTagsPreviewer_tag
- }
- ...AudioCardTags_cloudcast
- }
-
- fragment AudioCardSubLinks_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- id
- displayName
- username
- ...Hovercard_user
- }
- creatorAttributions(first: 2) {
- totalCount
- edges {
- node {
- id
- displayName
- username
- ...Hovercard_user
- }
- }
- }
- }
-
- fragment AudioCardTagsPreviewer_tag on CloudcastTag {
- tag {
- name
- slug
- id
- }
- }
-
- fragment AudioCardTags_cloudcast on Cloudcast {
- tags(country: "GLOBAL") {
- tag {
- name
- slug
- id
- }
- }
- }
-
- fragment AudioCardTitle_cloudcast on Cloudcast {
- id
- slug
- name
- audioType
- audioQuality
- isLiveRecording
- isExclusive
- owner {
- id
- username
- ...UserBadge_user
- }
- creatorAttributions(first: 2) {
- totalCount
- }
- ...AudioCardSubLinks_cloudcast
- ...AudioCardPlayButton_cloudcast
- ...ExclusiveCloudcastBadgeContainer_cloudcast
- }
-
- fragment AudioCard_cloudcast on Cloudcast {
- id
- slug
- audioType
- isAwaitingAudio
- isDraft
- isScheduled
- restrictedReason
- publishDate
- isLiveRecording
- isDisabledCopyright
- owner {
- isViewer
- username
- id
- }
- ...ImageCloudcast_cloudcast
- ...AudioCardTitle_cloudcast
- ...AudioCardProgress_cloudcast
- ...AudioCardActions_cloudcast
- ...CopyrightSupport_cloudcast
- }
-
- fragment AudioCard_viewer on Viewer {
- ...AudioCardActions_viewer
- me {
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- id
- }
- }
-
- fragment CopyrightSupport_cloudcast on Cloudcast {
- name
- slug
- owner {
- username
- id
- }
- }
-
- fragment ExclusiveCloudcastBadgeContainer_cloudcast on Cloudcast {
- isExclusive
- isExclusivePreviewOnly
- slug
- id
- owner {
- username
- id
- }
- }
-
- fragment Hovercard_user on User {
- id
- }
-
- fragment ImageCloudcast_cloudcast on Cloudcast {
- name
- picture {
- urlRoot
- primaryColor
- }
- }
-
- fragment ShareAudioCardList_user on User {
- biog
- username
- displayName
- id
- isUploader
- picture {
- urlRoot
- }
- }
-
- fragment UserBadge_user on User {
- hasProFeatures
- isStaff
- hasPremiumFeatures
- }
-
- fragment UserStreamPage_user on User {
- id
- displayName
- username
- ...ShareAudioCardList_user
- stream(first: 10) {
- edges {
- repostedBy
- node {
- id
- ...AudioCard_cloudcast
- __typename
- }
- cursor
- }
- pageInfo {
- endCursor
- hasNextPage
- }
- }
- }
-
- fragment UserStreamPage_viewer on Viewer {
- ...AudioCard_viewer
- }
-
- fragment useAudioPreview_cloudcast on Cloudcast {
- id
- previewUrl
- }
-
- fragment useExclusiveCloudcastModal_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- username
- id
- }
- }
-
- fragment useExclusivePreviewModal_cloudcast on Cloudcast {
- id
- isExclusivePreviewOnly
- owner {
- username
- id
- }
- }`,
- },
- uploads: {
- query: `query UserUploadsQuery(
- $lookup: UserLookup!
- $orderBy: CloudcastOrderByEnum
- $onlyAttributedTo: ID!
- $hasAttributedTo: Boolean!
- ) {
- user: userLookup(lookup: $lookup) {
- username
- ...UserUploadsPage_user_38hcZE
- id
- }
- affiliateUser: user(id: $onlyAttributedTo) @include(if: $hasAttributedTo) {
- ...UserUploadsPageAffiliate_user
- id
- }
- viewer {
- ...UserUploadsPage_viewer
- id
- }
- }
-
- fragment AudioCardActions_cloudcast on Cloudcast {
- isExclusive
- audioType
- owner {
- username
- isSubscribedTo
- isViewer
- id
- }
- ...AudioCardFavoriteButton_cloudcast
- ...AudioCardRepostButton_cloudcast
- ...AudioCardShareButton_cloudcast
- ...AudioCardAddToButton_cloudcast
- ...AudioCardHighlightButton_cloudcast
- ...AudioCardBoostButton_cloudcast
- ...AudioCardStats_cloudcast
- ...AudioCardMoreOptions_cloudcast
- }
-
- fragment AudioCardActions_viewer on Viewer {
- ...AudioCardFavoriteButton_viewer
- ...AudioCardRepostButton_viewer
- ...AudioCardHighlightButton_viewer
- ...AudioCardMoreOptions_viewer
- }
-
- fragment AudioCardAddToButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- }
-
- fragment AudioCardBoostButton_cloudcast on Cloudcast {
- id
- isPublic
- owner {
- id
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_cloudcast on Cloudcast {
- id
- isFavorited
- isPublic
- hiddenStats
- favorites {
- totalCount
- }
- slug
- owner {
- id
- isFollowing
- username
- isSelect
- displayName
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardHighlightButton_cloudcast on Cloudcast {
- id
- isPublic
- isHighlighted
- owner {
- isViewer
- id
- }
- }
-
- fragment AudioCardHighlightButton_viewer on Viewer {
- me {
- id
- hasProFeatures
- highlighted {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_cloudcast on Cloudcast {
- id
- isPublic
- slug
- isUnlisted
- isScheduled
- isDraft
- audioType
- isDisabledCopyright
- viewerAttribution {
- status
- id
- }
- viewerAttributionRequest {
- id
- }
- creatorAttributions(first: 2) {
- edges {
- node {
- id
- }
- }
- }
- owner {
- id
- username
- isViewer
- hasProFeatures
- viewerIsAffiliate
- displayName
- affiliateUsers {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_viewer on Viewer {
- me {
- id
- hasProFeatures
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- }
- }
-
- fragment AudioCardPlayButton_cloudcast on Cloudcast {
- id
- restrictedReason
- owner {
- isSubscribedTo
- isViewer
- id
- }
- isAwaitingAudio
- isDraft
- isPlayable
- streamInfo {
- hlsUrl
- dashUrl
- url
- uuid
- }
- audioLength
- currentPosition
- repeatPlayAmount
- hasPlayCompleted
- seekRestriction
- previewUrl
- isExclusive
- isDisabledCopyright
- ...AudioCardStaticPlayButton_cloudcast
- ...useAudioPreview_cloudcast
- ...useExclusivePreviewModal_cloudcast
- ...useExclusiveCloudcastModal_cloudcast
- }
-
- fragment AudioCardProgress_cloudcast on Cloudcast {
- id
- proportionListened
- audioLength
- }
-
- fragment AudioCardRepostButton_cloudcast on Cloudcast {
- id
- isReposted
- isExclusive
- isPublic
- reposts {
- totalCount
- }
- owner {
- isViewer
- isSubscribedTo
- id
- }
- }
-
- fragment AudioCardRepostButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardShareButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- slug
- description
- audioType
- picture {
- urlRoot
- }
- owner {
- displayName
- isViewer
- username
- id
- }
- }
-
- fragment AudioCardStaticPlayButton_cloudcast on Cloudcast {
- owner {
- username
- id
- }
- slug
- id
- restrictedReason
- }
-
- fragment AudioCardStats_cloudcast on Cloudcast {
- isExclusive
- isDraft
- hiddenStats
- plays
- publishDate
- qualityScore
- listenerMinutes
- owner {
- isSubscribedTo
- id
- }
- tags(country: "GLOBAL") {
- ...AudioCardTagsPreviewer_tag
- }
- ...AudioCardTags_cloudcast
- }
-
- fragment AudioCardSubLinks_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- id
- displayName
- username
- ...Hovercard_user
- }
- creatorAttributions(first: 2) {
- totalCount
- edges {
- node {
- id
- displayName
- username
- ...Hovercard_user
- }
- }
- }
- }
-
- fragment AudioCardTagsPreviewer_tag on CloudcastTag {
- tag {
- name
- slug
- id
- }
- }
-
- fragment AudioCardTags_cloudcast on Cloudcast {
- tags(country: "GLOBAL") {
- tag {
- name
- slug
- id
- }
- }
- }
-
- fragment AudioCardTitle_cloudcast on Cloudcast {
- id
- slug
- name
- audioType
- audioQuality
- isLiveRecording
- isExclusive
- owner {
- id
- username
- ...UserBadge_user
- }
- creatorAttributions(first: 2) {
- totalCount
- }
- ...AudioCardSubLinks_cloudcast
- ...AudioCardPlayButton_cloudcast
- ...ExclusiveCloudcastBadgeContainer_cloudcast
- }
-
- fragment AudioCard_cloudcast on Cloudcast {
- id
- slug
- audioType
- isAwaitingAudio
- isDraft
- isScheduled
- restrictedReason
- publishDate
- isLiveRecording
- isDisabledCopyright
- owner {
- isViewer
- username
- id
- }
- ...ImageCloudcast_cloudcast
- ...AudioCardTitle_cloudcast
- ...AudioCardProgress_cloudcast
- ...AudioCardActions_cloudcast
- ...CopyrightSupport_cloudcast
- }
-
- fragment AudioCard_viewer on Viewer {
- ...AudioCardActions_viewer
- me {
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- id
- }
- }
-
- fragment CopyrightSupport_cloudcast on Cloudcast {
- name
- slug
- owner {
- username
- id
- }
- }
-
- fragment ExclusiveCloudcastBadgeContainer_cloudcast on Cloudcast {
- isExclusive
- isExclusivePreviewOnly
- slug
- id
- owner {
- username
- id
- }
- }
-
- fragment Hovercard_user on User {
- id
- }
-
- fragment ImageCloudcast_cloudcast on Cloudcast {
- name
- picture {
- urlRoot
- primaryColor
- }
- }
-
- fragment ProfileSearchAudioCardList_user on User {
- username
- displayName
- id
- picture {
- urlRoot
- }
- }
-
- fragment ShareAudioCardList_user on User {
- biog
- username
- displayName
- id
- isUploader
- picture {
- urlRoot
- }
- }
-
- fragment UserBadge_user on User {
- hasProFeatures
- isStaff
- hasPremiumFeatures
- }
-
- fragment UserUploadsPageAffiliate_user on User {
- displayName
- username
- id
- picture {
- urlRoot
- }
- }
-
- fragment UserUploadsPage_user_38hcZE on User {
- id
- displayName
- username
- isViewer
- hasProFeatures
- viewerIsAffiliate
- ...ShareAudioCardList_user
- ...ProfileSearchAudioCardList_user
- uploads(
- first: 10
- isPublic: true
- orderBy: $orderBy
- audioTypes: [SHOW]
- onlyAttributedTo: $onlyAttributedTo
- ) {
- edges {
- node {
- ...AudioCard_cloudcast
- id
- __typename
- }
- cursor
- }
- pageInfo {
- endCursor
- hasNextPage
- }
- totalCount
- }
- }
-
- fragment UserUploadsPage_viewer on Viewer {
- ...AudioCard_viewer
- }
-
- fragment useAudioPreview_cloudcast on Cloudcast {
- id
- previewUrl
- }
-
- fragment useExclusiveCloudcastModal_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- username
- id
- }
- }
-
- fragment useExclusivePreviewModal_cloudcast on Cloudcast {
- id
- isExclusivePreviewOnly
- owner {
- username
- id
- }
- }`,
- },
- reposts: {
- query: `query UserRepostsQuery($lookup: UserLookup!) {
- user: userLookup(lookup: $lookup) {
- username
- ...UserRepostsPage_user
- id
- }
- viewer {
- ...UserRepostsPage_viewer
- id
- }
- }
-
- fragment AudioCardActions_cloudcast on Cloudcast {
- isExclusive
- audioType
- owner {
- username
- isSubscribedTo
- isViewer
- id
- }
- ...AudioCardFavoriteButton_cloudcast
- ...AudioCardRepostButton_cloudcast
- ...AudioCardShareButton_cloudcast
- ...AudioCardAddToButton_cloudcast
- ...AudioCardHighlightButton_cloudcast
- ...AudioCardBoostButton_cloudcast
- ...AudioCardStats_cloudcast
- ...AudioCardMoreOptions_cloudcast
- }
-
- fragment AudioCardActions_viewer on Viewer {
- ...AudioCardFavoriteButton_viewer
- ...AudioCardRepostButton_viewer
- ...AudioCardHighlightButton_viewer
- ...AudioCardMoreOptions_viewer
- }
-
- fragment AudioCardAddToButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- }
-
- fragment AudioCardBoostButton_cloudcast on Cloudcast {
- id
- isPublic
- owner {
- id
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_cloudcast on Cloudcast {
- id
- isFavorited
- isPublic
- hiddenStats
- favorites {
- totalCount
- }
- slug
- owner {
- id
- isFollowing
- username
- isSelect
- displayName
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardHighlightButton_cloudcast on Cloudcast {
- id
- isPublic
- isHighlighted
- owner {
- isViewer
- id
- }
- }
-
- fragment AudioCardHighlightButton_viewer on Viewer {
- me {
- id
- hasProFeatures
- highlighted {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_cloudcast on Cloudcast {
- id
- isPublic
- slug
- isUnlisted
- isScheduled
- isDraft
- audioType
- isDisabledCopyright
- viewerAttribution {
- status
- id
- }
- viewerAttributionRequest {
- id
- }
- creatorAttributions(first: 2) {
- edges {
- node {
- id
- }
- }
- }
- owner {
- id
- username
- isViewer
- hasProFeatures
- viewerIsAffiliate
- displayName
- affiliateUsers {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_viewer on Viewer {
- me {
- id
- hasProFeatures
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- }
- }
-
- fragment AudioCardPlayButton_cloudcast on Cloudcast {
- id
- restrictedReason
- owner {
- isSubscribedTo
- isViewer
- id
- }
- isAwaitingAudio
- isDraft
- isPlayable
- streamInfo {
- hlsUrl
- dashUrl
- url
- uuid
- }
- audioLength
- currentPosition
- repeatPlayAmount
- hasPlayCompleted
- seekRestriction
- previewUrl
- isExclusive
- isDisabledCopyright
- ...AudioCardStaticPlayButton_cloudcast
- ...useAudioPreview_cloudcast
- ...useExclusivePreviewModal_cloudcast
- ...useExclusiveCloudcastModal_cloudcast
- }
-
- fragment AudioCardProgress_cloudcast on Cloudcast {
- id
- proportionListened
- audioLength
- }
-
- fragment AudioCardRepostButton_cloudcast on Cloudcast {
- id
- isReposted
- isExclusive
- isPublic
- reposts {
- totalCount
- }
- owner {
- isViewer
- isSubscribedTo
- id
- }
- }
-
- fragment AudioCardRepostButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardShareButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- slug
- description
- audioType
- picture {
- urlRoot
- }
- owner {
- displayName
- isViewer
- username
- id
- }
- }
-
- fragment AudioCardStaticPlayButton_cloudcast on Cloudcast {
- owner {
- username
- id
- }
- slug
- id
- restrictedReason
- }
-
- fragment AudioCardStats_cloudcast on Cloudcast {
- isExclusive
- isDraft
- hiddenStats
- plays
- publishDate
- qualityScore
- listenerMinutes
- owner {
- isSubscribedTo
- id
- }
- tags(country: "GLOBAL") {
- ...AudioCardTagsPreviewer_tag
- }
- ...AudioCardTags_cloudcast
- }
-
- fragment AudioCardSubLinks_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- id
- displayName
- username
- ...Hovercard_user
- }
- creatorAttributions(first: 2) {
- totalCount
- edges {
- node {
- id
- displayName
- username
- ...Hovercard_user
- }
- }
- }
- }
-
- fragment AudioCardTagsPreviewer_tag on CloudcastTag {
- tag {
- name
- slug
- id
- }
- }
-
- fragment AudioCardTags_cloudcast on Cloudcast {
- tags(country: "GLOBAL") {
- tag {
- name
- slug
- id
- }
- }
- }
-
- fragment AudioCardTitle_cloudcast on Cloudcast {
- id
- slug
- name
- audioType
- audioQuality
- isLiveRecording
- isExclusive
- owner {
- id
- username
- ...UserBadge_user
- }
- creatorAttributions(first: 2) {
- totalCount
- }
- ...AudioCardSubLinks_cloudcast
- ...AudioCardPlayButton_cloudcast
- ...ExclusiveCloudcastBadgeContainer_cloudcast
- }
-
- fragment AudioCard_cloudcast on Cloudcast {
- id
- slug
- audioType
- isAwaitingAudio
- isDraft
- isScheduled
- restrictedReason
- publishDate
- isLiveRecording
- isDisabledCopyright
- owner {
- isViewer
- username
- id
- }
- ...ImageCloudcast_cloudcast
- ...AudioCardTitle_cloudcast
- ...AudioCardProgress_cloudcast
- ...AudioCardActions_cloudcast
- ...CopyrightSupport_cloudcast
- }
-
- fragment AudioCard_viewer on Viewer {
- ...AudioCardActions_viewer
- me {
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- id
- }
- }
-
- fragment CopyrightSupport_cloudcast on Cloudcast {
- name
- slug
- owner {
- username
- id
- }
- }
-
- fragment ExclusiveCloudcastBadgeContainer_cloudcast on Cloudcast {
- isExclusive
- isExclusivePreviewOnly
- slug
- id
- owner {
- username
- id
- }
- }
-
- fragment Hovercard_user on User {
- id
- }
-
- fragment ImageCloudcast_cloudcast on Cloudcast {
- name
- picture {
- urlRoot
- primaryColor
- }
- }
-
- fragment ShareAudioCardList_user on User {
- biog
- username
- displayName
- id
- isUploader
- picture {
- urlRoot
- }
- }
-
- fragment UserBadge_user on User {
- hasProFeatures
- isStaff
- hasPremiumFeatures
- }
-
- fragment UserRepostsPage_user on User {
- id
- displayName
- username
- isViewer
- ...ShareAudioCardList_user
- reposted(first: 10, audioTypes: [SHOW, TRACK]) {
- edges {
- node {
- ...AudioCard_cloudcast
- id
- __typename
- }
- cursor
- }
- pageInfo {
- endCursor
- hasNextPage
- }
- totalCount
- }
- }
-
- fragment UserRepostsPage_viewer on Viewer {
- ...AudioCard_viewer
- }
-
- fragment useAudioPreview_cloudcast on Cloudcast {
- id
- previewUrl
- }
-
- fragment useExclusiveCloudcastModal_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- username
- id
- }
- }
-
- fragment useExclusivePreviewModal_cloudcast on Cloudcast {
- id
- isExclusivePreviewOnly
- owner {
- username
- id
- }
- }`,
- },
- favorites: {
- query: `query UserFavoritesQuery($lookup: UserLookup!) {
- user: userLookup(lookup: $lookup) {
- username
- hiddenFavorites: favorites {
- isHidden
- }
- ...UserFavoritesPage_user
- id
- }
- viewer {
- ...UserFavoritesPage_viewer
- id
- }
- }
-
- fragment AudioCardActions_cloudcast on Cloudcast {
- isExclusive
- audioType
- owner {
- username
- isSubscribedTo
- isViewer
- id
- }
- ...AudioCardFavoriteButton_cloudcast
- ...AudioCardRepostButton_cloudcast
- ...AudioCardShareButton_cloudcast
- ...AudioCardAddToButton_cloudcast
- ...AudioCardHighlightButton_cloudcast
- ...AudioCardBoostButton_cloudcast
- ...AudioCardStats_cloudcast
- ...AudioCardMoreOptions_cloudcast
- }
-
- fragment AudioCardActions_viewer on Viewer {
- ...AudioCardFavoriteButton_viewer
- ...AudioCardRepostButton_viewer
- ...AudioCardHighlightButton_viewer
- ...AudioCardMoreOptions_viewer
- }
-
- fragment AudioCardAddToButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- }
-
- fragment AudioCardBoostButton_cloudcast on Cloudcast {
- id
- isPublic
- owner {
- id
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_cloudcast on Cloudcast {
- id
- isFavorited
- isPublic
- hiddenStats
- favorites {
- totalCount
- }
- slug
- owner {
- id
- isFollowing
- username
- isSelect
- displayName
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardHighlightButton_cloudcast on Cloudcast {
- id
- isPublic
- isHighlighted
- owner {
- isViewer
- id
- }
- }
-
- fragment AudioCardHighlightButton_viewer on Viewer {
- me {
- id
- hasProFeatures
- highlighted {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_cloudcast on Cloudcast {
- id
- isPublic
- slug
- isUnlisted
- isScheduled
- isDraft
- audioType
- isDisabledCopyright
- viewerAttribution {
- status
- id
- }
- viewerAttributionRequest {
- id
- }
- creatorAttributions(first: 2) {
- edges {
- node {
- id
- }
- }
- }
- owner {
- id
- username
- isViewer
- hasProFeatures
- viewerIsAffiliate
- displayName
- affiliateUsers {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_viewer on Viewer {
- me {
- id
- hasProFeatures
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- }
- }
-
- fragment AudioCardPlayButton_cloudcast on Cloudcast {
- id
- restrictedReason
- owner {
- isSubscribedTo
- isViewer
- id
- }
- isAwaitingAudio
- isDraft
- isPlayable
- streamInfo {
- hlsUrl
- dashUrl
- url
- uuid
- }
- audioLength
- currentPosition
- repeatPlayAmount
- hasPlayCompleted
- seekRestriction
- previewUrl
- isExclusive
- isDisabledCopyright
- ...AudioCardStaticPlayButton_cloudcast
- ...useAudioPreview_cloudcast
- ...useExclusivePreviewModal_cloudcast
- ...useExclusiveCloudcastModal_cloudcast
- }
-
- fragment AudioCardProgress_cloudcast on Cloudcast {
- id
- proportionListened
- audioLength
- }
-
- fragment AudioCardRepostButton_cloudcast on Cloudcast {
- id
- isReposted
- isExclusive
- isPublic
- reposts {
- totalCount
- }
- owner {
- isViewer
- isSubscribedTo
- id
- }
- }
-
- fragment AudioCardRepostButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardShareButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- slug
- description
- audioType
- picture {
- urlRoot
- }
- owner {
- displayName
- isViewer
- username
- id
- }
- }
-
- fragment AudioCardStaticPlayButton_cloudcast on Cloudcast {
- owner {
- username
- id
- }
- slug
- id
- restrictedReason
- }
-
- fragment AudioCardStats_cloudcast on Cloudcast {
- isExclusive
- isDraft
- hiddenStats
- plays
- publishDate
- qualityScore
- listenerMinutes
- owner {
- isSubscribedTo
- id
- }
- tags(country: "GLOBAL") {
- ...AudioCardTagsPreviewer_tag
- }
- ...AudioCardTags_cloudcast
- }
-
- fragment AudioCardSubLinks_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- id
- displayName
- username
- ...Hovercard_user
- }
- creatorAttributions(first: 2) {
- totalCount
- edges {
- node {
- id
- displayName
- username
- ...Hovercard_user
- }
- }
- }
- }
-
- fragment AudioCardTagsPreviewer_tag on CloudcastTag {
- tag {
- name
- slug
- id
- }
- }
-
- fragment AudioCardTags_cloudcast on Cloudcast {
- tags(country: "GLOBAL") {
- tag {
- name
- slug
- id
- }
- }
- }
-
- fragment AudioCardTitle_cloudcast on Cloudcast {
- id
- slug
- name
- audioType
- audioQuality
- isLiveRecording
- isExclusive
- owner {
- id
- username
- ...UserBadge_user
- }
- creatorAttributions(first: 2) {
- totalCount
- }
- ...AudioCardSubLinks_cloudcast
- ...AudioCardPlayButton_cloudcast
- ...ExclusiveCloudcastBadgeContainer_cloudcast
- }
-
- fragment AudioCard_cloudcast on Cloudcast {
- id
- slug
- audioType
- isAwaitingAudio
- isDraft
- isScheduled
- restrictedReason
- publishDate
- isLiveRecording
- isDisabledCopyright
- owner {
- isViewer
- username
- id
- }
- ...ImageCloudcast_cloudcast
- ...AudioCardTitle_cloudcast
- ...AudioCardProgress_cloudcast
- ...AudioCardActions_cloudcast
- ...CopyrightSupport_cloudcast
- }
-
- fragment AudioCard_viewer on Viewer {
- ...AudioCardActions_viewer
- me {
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- id
- }
- }
-
- fragment CopyrightSupport_cloudcast on Cloudcast {
- name
- slug
- owner {
- username
- id
- }
- }
-
- fragment ExclusiveCloudcastBadgeContainer_cloudcast on Cloudcast {
- isExclusive
- isExclusivePreviewOnly
- slug
- id
- owner {
- username
- id
- }
- }
-
- fragment Hovercard_user on User {
- id
- }
-
- fragment ImageCloudcast_cloudcast on Cloudcast {
- name
- picture {
- urlRoot
- primaryColor
- }
- }
-
- fragment ShareAudioCardList_user on User {
- biog
- username
- displayName
- id
- isUploader
- picture {
- urlRoot
- }
- }
-
- fragment UserBadge_user on User {
- hasProFeatures
- isStaff
- hasPremiumFeatures
- }
-
- fragment UserFavoritesPage_user on User {
- id
- displayName
- username
- isViewer
- ...ShareAudioCardList_user
- favorites(first: 10) {
- edges {
- node {
- id
- ...AudioCard_cloudcast
- __typename
- }
- cursor
- }
- pageInfo {
- endCursor
- hasNextPage
- }
- }
- }
-
- fragment UserFavoritesPage_viewer on Viewer {
- me {
- id
- }
- ...AudioCard_viewer
- }
-
- fragment useAudioPreview_cloudcast on Cloudcast {
- id
- previewUrl
- }
-
- fragment useExclusiveCloudcastModal_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- username
- id
- }
- }
-
- fragment useExclusivePreviewModal_cloudcast on Cloudcast {
- id
- isExclusivePreviewOnly
- owner {
- username
- id
- }
- }`,
- },
- listens: {
- query: `query UserListensQuery($lookup: UserLookup!) {
- user: userLookup(lookup: $lookup) {
- username
- hiddenListeningHistory: listeningHistory {
- isHidden
- }
- ...UserListensPage_user
- id
- }
- viewer {
- ...UserListensPage_viewer
- id
- }
- }
-
- fragment AudioCardActions_cloudcast on Cloudcast {
- isExclusive
- audioType
- owner {
- username
- isSubscribedTo
- isViewer
- id
- }
- ...AudioCardFavoriteButton_cloudcast
- ...AudioCardRepostButton_cloudcast
- ...AudioCardShareButton_cloudcast
- ...AudioCardAddToButton_cloudcast
- ...AudioCardHighlightButton_cloudcast
- ...AudioCardBoostButton_cloudcast
- ...AudioCardStats_cloudcast
- ...AudioCardMoreOptions_cloudcast
- }
-
- fragment AudioCardActions_viewer on Viewer {
- ...AudioCardFavoriteButton_viewer
- ...AudioCardRepostButton_viewer
- ...AudioCardHighlightButton_viewer
- ...AudioCardMoreOptions_viewer
- }
-
- fragment AudioCardAddToButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- }
-
- fragment AudioCardBoostButton_cloudcast on Cloudcast {
- id
- isPublic
- owner {
- id
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_cloudcast on Cloudcast {
- id
- isFavorited
- isPublic
- hiddenStats
- favorites {
- totalCount
- }
- slug
- owner {
- id
- isFollowing
- username
- isSelect
- displayName
- isViewer
- }
- }
-
- fragment AudioCardFavoriteButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardHighlightButton_cloudcast on Cloudcast {
- id
- isPublic
- isHighlighted
- owner {
- isViewer
- id
- }
- }
-
- fragment AudioCardHighlightButton_viewer on Viewer {
- me {
- id
- hasProFeatures
- highlighted {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_cloudcast on Cloudcast {
- id
- isPublic
- slug
- isUnlisted
- isScheduled
- isDraft
- audioType
- isDisabledCopyright
- viewerAttribution {
- status
- id
- }
- viewerAttributionRequest {
- id
- }
- creatorAttributions(first: 2) {
- edges {
- node {
- id
- }
- }
- }
- owner {
- id
- username
- isViewer
- hasProFeatures
- viewerIsAffiliate
- displayName
- affiliateUsers {
- totalCount
- }
- }
- }
-
- fragment AudioCardMoreOptions_viewer on Viewer {
- me {
- id
- hasProFeatures
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- }
- }
-
- fragment AudioCardPlayButton_cloudcast on Cloudcast {
- id
- restrictedReason
- owner {
- isSubscribedTo
- isViewer
- id
- }
- isAwaitingAudio
- isDraft
- isPlayable
- streamInfo {
- hlsUrl
- dashUrl
- url
- uuid
- }
- audioLength
- currentPosition
- repeatPlayAmount
- hasPlayCompleted
- seekRestriction
- previewUrl
- isExclusive
- isDisabledCopyright
- ...AudioCardStaticPlayButton_cloudcast
- ...useAudioPreview_cloudcast
- ...useExclusivePreviewModal_cloudcast
- ...useExclusiveCloudcastModal_cloudcast
- }
-
- fragment AudioCardProgress_cloudcast on Cloudcast {
- id
- proportionListened
- audioLength
- }
-
- fragment AudioCardRepostButton_cloudcast on Cloudcast {
- id
- isReposted
- isExclusive
- isPublic
- reposts {
- totalCount
- }
- owner {
- isViewer
- isSubscribedTo
- id
- }
- }
-
- fragment AudioCardRepostButton_viewer on Viewer {
- me {
- id
- }
- }
-
- fragment AudioCardShareButton_cloudcast on Cloudcast {
- id
- isUnlisted
- isPublic
- slug
- description
- audioType
- picture {
- urlRoot
- }
- owner {
- displayName
- isViewer
- username
- id
- }
- }
-
- fragment AudioCardStaticPlayButton_cloudcast on Cloudcast {
- owner {
- username
- id
- }
- slug
- id
- restrictedReason
- }
-
- fragment AudioCardStats_cloudcast on Cloudcast {
- isExclusive
- isDraft
- hiddenStats
- plays
- publishDate
- qualityScore
- listenerMinutes
- owner {
- isSubscribedTo
- id
- }
- tags(country: "GLOBAL") {
- ...AudioCardTagsPreviewer_tag
- }
- ...AudioCardTags_cloudcast
- }
-
- fragment AudioCardSubLinks_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- id
- displayName
- username
- ...Hovercard_user
- }
- creatorAttributions(first: 2) {
- totalCount
- edges {
- node {
- id
- displayName
- username
- ...Hovercard_user
- }
- }
- }
- }
-
- fragment AudioCardTagsPreviewer_tag on CloudcastTag {
- tag {
- name
- slug
- id
- }
- }
-
- fragment AudioCardTags_cloudcast on Cloudcast {
- tags(country: "GLOBAL") {
- tag {
- name
- slug
- id
- }
- }
- }
-
- fragment AudioCardTitle_cloudcast on Cloudcast {
- id
- slug
- name
- audioType
- audioQuality
- isLiveRecording
- isExclusive
- owner {
- id
- username
- ...UserBadge_user
- }
- creatorAttributions(first: 2) {
- totalCount
- }
- ...AudioCardSubLinks_cloudcast
- ...AudioCardPlayButton_cloudcast
- ...ExclusiveCloudcastBadgeContainer_cloudcast
- }
-
- fragment AudioCard_cloudcast on Cloudcast {
- id
- slug
- audioType
- isAwaitingAudio
- isDraft
- isScheduled
- restrictedReason
- publishDate
- isLiveRecording
- isDisabledCopyright
- owner {
- isViewer
- username
- id
- }
- ...ImageCloudcast_cloudcast
- ...AudioCardTitle_cloudcast
- ...AudioCardProgress_cloudcast
- ...AudioCardActions_cloudcast
- ...CopyrightSupport_cloudcast
- }
-
- fragment AudioCard_viewer on Viewer {
- ...AudioCardActions_viewer
- me {
- uploadLimits {
- tracksPublishRemaining
- showsPublishRemaining
- }
- id
- }
- }
-
- fragment CopyrightSupport_cloudcast on Cloudcast {
- name
- slug
- owner {
- username
- id
- }
- }
-
- fragment ExclusiveCloudcastBadgeContainer_cloudcast on Cloudcast {
- isExclusive
- isExclusivePreviewOnly
- slug
- id
- owner {
- username
- id
- }
- }
-
- fragment Hovercard_user on User {
- id
- }
-
- fragment ImageCloudcast_cloudcast on Cloudcast {
- name
- picture {
- urlRoot
- primaryColor
- }
- }
-
- fragment ShareAudioCardList_user on User {
- biog
- username
- displayName
- id
- isUploader
- picture {
- urlRoot
- }
- }
-
- fragment UserBadge_user on User {
- hasProFeatures
- isStaff
- hasPremiumFeatures
- }
-
- fragment UserListensPage_user on User {
- id
- isViewer
- displayName
- username
- ...ShareAudioCardList_user
- listeningHistory(first: 10) {
- totalCount
- edges {
- node {
- id
- cloudcast {
- ...AudioCard_cloudcast
- id
- }
- __typename
- }
- cursor
- }
- pageInfo {
- endCursor
- hasNextPage
- }
- }
- }
-
- fragment UserListensPage_viewer on Viewer {
- id
- me {
- id
- }
- ...AudioCard_viewer
- }
-
- fragment useAudioPreview_cloudcast on Cloudcast {
- id
- previewUrl
- }
-
- fragment useExclusiveCloudcastModal_cloudcast on Cloudcast {
- id
- isExclusive
- owner {
- username
- id
- }
- }
-
- fragment useExclusivePreviewModal_cloudcast on Cloudcast {
- id
- isExclusivePreviewOnly
- owner {
- username
- id
- }
- }`,
- },
-};
-
-export { queries };
diff --git a/lib/routes/mixcloud/user-playlist.ts b/lib/routes/mixcloud/user-playlist.ts
new file mode 100644
index 000000000..e68c1fbdc
--- /dev/null
+++ b/lib/routes/mixcloud/user-playlist.ts
@@ -0,0 +1,31 @@
+import { Route } from '@/types';
+import { handler } from './index';
+
+export const route: Route = {
+ path: '/:username/playlists/:playlist',
+ categories: ['multimedia'],
+ example: '/mixcloud/dholbach/playlists/ecclectic-dance',
+ parameters: {
+ username: 'Username, can be found in URL',
+ playlist: 'Playlist slug, can be found in URL',
+ },
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportBT: false,
+ supportPodcast: true,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['mixcloud.com/:username/playlists/:playlist'],
+ },
+ {
+ source: ['www.mixcloud.com/:username/playlists/:playlist'],
+ },
+ ],
+ name: 'Playlist',
+ maintainers: ['Misaka13514'],
+ handler,
+};