Comments (10)
There is no simple way out of the box. You could try adding a filter/regex to see if it's audio via inspecting the title or description. Maintaining a separate playlist is probably the best workaround
from ytdl-sub.
Good idea @jo-chemla , you could add the following to a preset:
filter_include:
- "{ %ne( %map_get( entry_metadata, "artist", null ), null ) }"
which means 'only include if entry_metadata (i.e. the info.json) artist field is not equal (ne) to null'
from ytdl-sub.
Actually just realized you posted everything I needed. Turns out this bug happens due to some bad design choices when validating subscriptions prior to any execution. #895 should hopefully fix it
from ytdl-sub.
Thanks a lot for the quick fix! Will test it tonight and report back. Have a good day!
from ytdl-sub.
Again, thanks, this filter does work indeed with the bugfix! On the yt-dlp thread, someone mentioned this filter "channel~=' - Topic$'"
to differentiate between video and audio, but checking artist is way better, almost perfect (some misses, but great anyway).
PS: watched this thread for youtube music metadata parsing: #824
from ytdl-sub.
Still happy to help, closing since this isn't an issue/feature request
from ytdl-sub.
Thanks. Started watching this issue thread here yt-dlp/yt-dlp#622 which is probably the best place to get a filter between standard-youtube vs youtube-music file source. Plus, from here yt-dlp/yt-dlp#4217 it seems that the --embed-metadata
tag adds artist, title, album
metadata, which might be absent from video files metadata, so this could be a discriminator a posteriori between music (pure audio) vs video.
from ytdl-sub.
Great idea, trying that. Atm I get this error (running the run_cron script on my docker container, had to use new-line to "escape" the quotes)
ytdl_sub.script.utils.exceptions.FunctionRuntimeException:
Runtime error occurred when executing the function %map_get:
'in <string>' requires string as left operand, not String
= Music:
"Youtube-Music-Likes":
overrides:
subscription_value: "https://www.youtube.com/playlist?list=LL"
filter_include:
- >-
{ %ne( %map_get( entry_metadata, "artist", null ), null ) }
Edit: same error when trying to cast to your class of String with the following filter { %ne( %map_get( entry_metadata, %string("artist"), null ), null ) }
. Incriminating line:
from ytdl-sub.
Hmm, i think the error implies entry_metadata
is a string when it should infact be a map. Let me look into this some more
from ytdl-sub.
Can you send me your full config and subscriptions @jo-chemla
from ytdl-sub.
Related Issues (20)
- Patreon Embedded Videos No Longer Found HOT 2
- Detected multiple top-level parents crash (& duplication?) HOT 3
- Updating to latest makes some subscriptions fail HOT 7
- Example to download Watch Later playlist HOT 3
- Add fallback for upload date
- Basic configuration docs page missing full example config HOT 1
- Retry decorator hides exception types/info HOT 2
- ERROR: Parse error at position 35 (near 'Style:\n::cue(c.color') HOT 3
- When using a regex in specifying subtitle languages, FileNotFoundError is thrown HOT 2
- Sonarr List Sync from YT Channel or Playlist HOT 1
- Basic directory output for Kodi TV Shows... impossible? HOT 2
- Handle empty dict on subscriptions better
- Make variables more compatible with function inputs
- New web gui HOT 1
- Question: Index of cumulative URLs passed in to download? HOT 1
- Music presets: easily download from multiple urls HOT 5
- Date music tag not working
- Issue with content rating and plex HOT 4
- ytdl-sub doesn't correctly write all UTF-8 characters (such as emoji) in .nfo files HOT 3
- download-archive rebuild/check HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ytdl-sub.