tubesync icon indicating copy to clipboard operation
tubesync copied to clipboard

Exclude Playlists when adding a channel

Open abb0r opened this issue 4 years ago • 11 comments

Hello, I just discovered Tubesync today and it works great so far. But I have a few channel that I added, that have playlists with videos from other channels and it seems Tubesync downloads these videos aswell. Is there a way to sync only videos that are uploaded to the channel I added?

abb0r avatar Feb 18 '21 02:02 abb0r

I can possibly filter these out, can you paste some example channels with this behaviour.

meeb avatar Feb 18 '21 02:02 meeb

https://www.youtube.com/c/MrWissen2goGeschichte This channel has some playlists with videos from other channels.

abb0r avatar Feb 18 '21 03:02 abb0r

Hm, after checking this channel it seems to be possible to exclude videos not uploaded to the original channel from sub-playlists on channels, but it may be substantially more work than I first suspected. I'll add this to a longer term roadmap to look into.

meeb avatar Feb 18 '21 03:02 meeb

Thanks for your fast answers. Definitely looking forward to this feature!

abb0r avatar Feb 18 '21 04:02 abb0r

This was an issue in a previous version of youtube-dl. Depending on the version is used (I can't tell), it may already be resolved if you update.

PhuriousGeorge avatar Feb 20 '21 08:02 PhuriousGeorge

TubeSync uses an up to date version of youtube-dl, currently as of writing that's 2021.02.10 (the bundled software versions are in the footer on the web interface). Thanks though, I'll check on the upstream tickets etc. on this to see if there's an easier way. I can store the uploader account ID at the channel level then compare it to the channel sub-items as their metadata is indexed to filter out media with a different uploader ID, but this would be pretty laborious and probably a bit buggy so if youtube-dl itself features a filter for this it would be much easier. Also thanks for the sponsorship @PhuriousGeorge much appreciated :)

meeb avatar Feb 20 '21 15:02 meeb

The way I worked around it when this issue occurred with yt-dl was to append /videos to the end of the request URL. Would that perhaps be an easy (at least immediate) solution?

PhuriousGeorge avatar Feb 22 '21 13:02 PhuriousGeorge

Internally TubeSync already does append /videos to the channel URLs for indexing since about :v0.6. I really don't think there's any more requests to YouTube I can cut down on and still maintain base level functionality, alas.

meeb avatar Feb 22 '21 13:02 meeb

URLs for each source type are generated from these templates: https://github.com/meeb/tubesync/blob/main/tubesync/sync/models.py#L122

meeb avatar Feb 22 '21 13:02 meeb

With that query, yt-dl shouldn't be pulling any playlist data unless explicitly entered as a playlist. I'd be more interested in the details of @abb0r's circumstances.

PhuriousGeorge avatar Feb 22 '21 13:02 PhuriousGeorge

That query includes playlists included under the channel, and those playlists can include videos that were not originally uploaded to the original channel. The annoying part is TubeSync can't tell the original uploader ID until the metadata gets crawled per video, and also currently the channel ID (e.g. mychannelname is actually JiojieoOdJOIE inside YouTube) isn't stored in the database to compare it. In "flat" crawl mode (to reduce the requests to YouTube dramatically) I don't think the information is available to youtube-dl to do the filtering their end either so this will probably have to be an extended feature to add in TubeSync. Feel free to suggest youtube-dl flags though if I've missed any.

meeb avatar Feb 22 '21 13:02 meeb