Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music Videos with Extras prebuilt preset #806

Closed
jmbannon opened this issue Nov 5, 2023 · 10 comments
Closed

Music Videos with Extras prebuilt preset #806

jmbannon opened this issue Nov 5, 2023 · 10 comments
Labels
feature request Request for a brand new feature

Comments

@jmbannon
Copy link
Owner

jmbannon commented Nov 5, 2023

Requires regex'ing override variables prior to any downloading/processing

"Jellfyin Music Videos with Extras":
  = Pop:
    "Michael Jackson":
      - "Music Videos | https://www.youtube.com/playlist?list=OLAK5uy_mnY03zP6abNWH929q2XhGzWD_2uKJ_n8E"
      - "Concerts | Live at Wembley (1988) | https://www.youtube.com/watch?v=9shByOh8fVE"
      - "Interviews | ABC (1979) | https://www.youtube.com/watch?v=fTTl4Vaow5Y"

Can be done today using multi-url

"Jellfyin Music Videos with Extras":
  = Pop:
    "Michael Jackson":
      download:
        - url: "https://www.youtube.com/playlist?list=OLAK5uy_mnY03zP6abNWH929q2XhGzWD_2uKJ_n8E"
          variables:
            type: "Music Videos"
        - url: "https://www.youtube.com/watch?v=9shByOh8fVE"
          variables:
            type: "Concerts"
            custom_title: "Live at Wembley (1988)"
        - url: "https://www.youtube.com/watch?v=fTTl4Vaow5Y"
          variables:
            type: "Interviews"
            custom_title: "ABC (1979)"

Or many overrides

"Jellfyin Music Videos with Extras":
  = Pop:
    "~Michael Jackson":
      m1: "Music Videos"
      u1: "https://www.youtube.com/playlist?list=OLAK5uy_mnY03zP6abNWH929q2XhGzWD_2uKJ_n8E"
      m2: "Concerts | Live at Wembley (1988)"
      u2: "https://www.youtube.com/watch?v=9shByOh8fVE"
      m3: "Interviews | ABC (1979)"
      u3: "https://www.youtube.com/watch?v=fTTl4Vaow5Y"

Or as a list (but requires every-other to be a URL)

"Jellfyin Music Videos with Extras":
  = Pop:
    "Michael Jackson":
      - "Music Videos"
      - "https://www.youtube.com/playlist?list=OLAK5uy_mnY03zP6abNWH929q2XhGzWD_2uKJ_n8E"
      - "Concerts | Live at Wembley (1988)"
      - "https://www.youtube.com/watch?v=9shByOh8fVE"
      - "Interviews | ABC (1979)"
      - "https://www.youtube.com/watch?v=fTTl4Vaow5Y"
@jmbannon jmbannon added the feature request Request for a brand new feature label Nov 5, 2023
@jmbannon jmbannon changed the title Music Videos with Extras prebuilt preset Music Videos with Extras prebuilt preset Nov 5, 2023
@jmbannon
Copy link
Owner Author

jmbannon commented Nov 6, 2023

#808

@android-808
Copy link

android-808 commented Nov 7, 2023

Apologies if I missed anything in recent commits (I am currently updating my config/subs file to simplify it to the recent changes (ie I no longer needed to have my tag info as it is now present in the base preset).

Seeing as you mention video titles here, one thing I noticed is that sites don't stick to a common naming convention. You have:

  • Channel as Artist Name, Artist Name Official or Record Label.
  • Video name as just Video Name or a variant of Artist - Video Name or Artist - Video Name (Official ...)

The first issue is easy to get around by using the subscription name. The second is more awkward as I don't want to have to add the titles every single time to fix the inconsistancies. Prior to adding my tag info, Jellyfin would lump all videos in the artist folder into one item, with the video selectable as if you were selecting the audio language to use on a movie.

The second issue with them is a bit more involved. Based on the advanced TV example, I have come up with the following for Artist Name - Video Name style conventions. Is it worth supporting something similar to TV Show Only Recent in the examples and having something that extends the basic music video preset to add support for the different conventions?

presets:

  ###############################################################################
  # Set music_video_directory here instead of in the subscriptions file
  mv_paths:
    overrides:
      music_video_directory: "/music_videos"
  
  ###############################################################################
  # base preset to used for all music videos.
  base_music_video:
    preset:
      - "Jellyfin Music Videos"
      - "best_video_quality"
      - "mv_paths"

  ###############################################################################
  # Custom preset for if name doesn't need splitting
  music_video:
    preset:
      - "base_music_video"

  ###############################################################################
  # Custom preset to split name
  music_video_split_name:
    preset:
      - "base_music_video"
    regex:
      from:
        title:
          match:
           - " - (.*)"
          capture_group_names:
           - "processed_title"
          capture_group_defaults:
           - "{title}"
    overrides:
      music_video_title: "{processed_title}"

@jmbannon
Copy link
Owner Author

jmbannon commented Nov 8, 2023

Ironically I had this same debate with myself when writing these presets, here is my personal regex:

    regex:
      from:
        title:
          match:
            - "(.*) - (.*) \\[O" # artist - song [Official ...
            - "(.*) - (.*) \\(O" # artist - song (Official ...
            - "(.*) - \"(.*)\" \\[O" # artist - "song" [Official ...
            - "(.*) - \"(.*)\" \\(O" # artist - "song" (Official ...
            - "(.*): (.*) \\[O" # artist: song [Official ...
            - "(.*): (.*) \\(O" # artist: song (Official ...
            - "(.*) - \"(.*)\".*" # artist - "song"
            - "(.*) - '(.*)'.*" # artist - 'song'
            - "(.*) - (.*).*" # artist - song

My conclusion is that there's no perfect regex. Even the one you have above isn't foolproof. This song for example has Title - Artist (https://www.youtube.com/watch?v=w_DKWlrA24k). With that said, the presets hardcoding the artist using subscription_name and using the raw video title seems like a good base for the prebuilt preset.

I know the titles won't look great in the player, but that's where custom configs and maybe some helper presets can come into play for enhancing the base prebuilt preset. Maybe we could call it Music Video Title Extraction

@jmbannon
Copy link
Owner Author

jmbannon commented Nov 8, 2023

As for specifying hard-coded titles in the above Extras preset, I think that's valuable especially for concerts/live/interviews/etc uploaded by random people with garbage titles. It won't be a requirement (by default will use the video title), but does help make the library look nicer

@android-808
Copy link

Totally agree with the hard-coded titles comment. Music Video Title Extraction would be good, might be able to make it Music Title Extraction to help with audio-only content. A helper preset to automatically categorise the Extras I think would be an absolute nightmare with the number of naming variations.

@RogueGhost93
Copy link

is this part of the code yet?
when i try to run any of these presets i get
[ytdl-sub] Validation error in Jellfyin Music Videos with Extras: 'Jellfyin Music Videos with Extras' contains the field '= Pop' which is not allowed. Allowed fields: _view, audio_extract, chapters, date_range, download, embed_thumbnail, file_convert, format, match_filters, music_tags, nfo_tags, output_directory_nfo_tags, output_options, overrides, preset, regex, split_by_chapters, subtitles, throttle_protection, video_tags, ytdl_options

@jmbannon
Copy link
Owner Author

It is not

@jmbannon
Copy link
Owner Author

Will use this feature for it: #859

@jmbannon jmbannon closed this as completed Jun 6, 2024
@jmbannon
Copy link
Owner Author

jmbannon commented Jun 6, 2024

Added in #808

@android-808
Copy link

Thank you, I'll take a look when I next update the subscriptions.

I'm guessing from what I can see of the commit log that this doesn't include the regex feature for the artist - song titles mentioned above. I created two presets based on the above to extract the titles (one for artist - song, the other reversed for song - artist) and just add it to the relevant subsciptions that follow a supported scheme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a brand new feature
Projects
None yet
Development

No branches or pull requests

3 participants