Code Monkey home page Code Monkey logo

sonarr_youtubedl's People

Contributors

beheadedstraw avatar bm1549 avatar chipwolf avatar danwillman avatar moeffju avatar ptarjan avatar whatdaybob avatar whiteydude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonarr_youtubedl's Issues

sonarr_youtubedl: allow custom regex titles

I have a show that on TVDB it doesn't contain an absolute episode number but on YouTube it does. Need a way to specify some regex to strip these numbers off the end. Other users may experience this and provide examples but for now regex may cover all bases.

My example is Chump from Roosterteeth.

No files being created?

Firstly, let me say that this docker has the beginnings of being incredible! I use sonarr with plex and recognize the failings in sonarr (even with jackett) to download specials and youtube content.

Having said that, I do have 1 problem that I cannot figure out (even with scouring the net and trying to guess at youtubedl settings.

I recognize in the log file that everything looks like it is working well and downloading files from youtube, but there is NO file creation happening!?

I'm running the docker in unraid.

I'm assuming it has something to do with the puid and pgid? I think your docker doesn't set the privileges to root?

Please advise! And let me know how to upload you any files or debug info you may want to troubleshoot this.

Thanks!

YouTube-do vs. yt-dlp

Just found the project, thanks to Reddit and, before investing my time on it and spreading the word, I would love to know if there is any plans to migrate from YouTube-dl to yt-dlp.

I do this question because I’ve been caught on several problems with the lack of updates over the last months on YouTube-dl with some supported sites. I had to change my solution to use yt-dlr and actually be able to gather some videos with the quality I wanted.

AttributeError: 'bool' object has no attribute 'lower'

I'm getting this error somewhat randomly but always at some point during the run. All my series in the config file are identical except the URL. Even with debug on I'm not really sure what's causing this one. Running on the dev build as of 4/11/2022 with docker-compose. It does add shows up until it dies on this though.
image
image

Call to Sonar to update metadata is failing

After doing the fix from Issue #50 it downloads the file perfectly, but the call to sonar to scan fails with:

sonarr_youtubedl  | 2023-10-18 15:23:37,630 - sonarr_youtubedl - DEBUG - Begin call Sonarr to rescan for series_id: 141
sonarr_youtubedl  | 2023-10-18 15:23:37,632 - sonarr_youtubedl - ERROR -       Failed - What's the Most Realistic Artificial Gravity in Sci-Fi? - Replacement index 1 out of range for positional args tuple

If I click "Refresh & Scan" in the UI, it works great so I think it is just the API call that is failing and not the underlying data being wrong.

URL per episode

Is it possible to use the regex feature to map season and episode numbers to a partial URL?

I'm guessing not, but thought it worth asking. This can be considered a feature request for the problem described below if not.

I'd like to download a show from redbull.com, where the URLs are like https://www.redbull.com/gb-en/episodes/<name-of-show>-s<season-num>-e<episode-num>

yt-dlp can't parse the episodes from the show's page on redbull.com (https://www.redbull.com/gb-en/shows/life-of-kai, for example), so it'd be great if I could throw a URL such as this into the config: https://www.redbull.com/gb-en/episodes/life-of-kai-s{season}-e{episode}

Just example syntax of course, but that would be super useful for sites where yt-dlp can't parse the seasons and episodes from a link to the show, like it can do for YouTube playlists, for example.

This is a great project btw, thank you!

Support for multiple Sonarrs

Hello there

I have 2 sonarr instances on my computer (one for shows and one for anime). Is there anyway to set up the config to download episodes for both? Do I have to run two different docker containers? Or just run two different python instances from different folders with 2 configs? If so, I wonder if it's possible with 1 config instead?

Cheers

Must restart sonarr_youtubedl to find new episodes

Version used: dev

When Sonarr finds new episodes to download, sonarr_youtubedl does not know about them until I restart it.
Here's a log excerpt:

2022-06-04 09:06:07,662 - sonarr_youtubedl - INFO - Configuration Found. Loading file.
2022-06-04 09:06:07,673 - sonarr_youtubedl - INFO - Default scan interval of every 15 minutes
2022-06-04 09:06:07,714 - sonarr_youtubedl - INFO - My Little Pony: Tell Your Tale no episodes needed
2022-06-04 09:06:07,714 - sonarr_youtubedl - INFO - Nothing to process
2022-06-04 09:06:07,714 - sonarr_youtubedl - INFO - Waiting...
2022-06-04 09:21:08,703 - sonarr_youtubedl - INFO - Configuration Found. Loading file.
2022-06-04 09:21:08,732 - sonarr_youtubedl - INFO - Default scan interval of every 15 minutes
2022-06-04 09:21:08,797 - sonarr_youtubedl - INFO - My Little Pony: Tell Your Tale no episodes needed
2022-06-04 09:21:08,797 - sonarr_youtubedl - INFO - Nothing to process
2022-06-04 09:21:08,797 - sonarr_youtubedl - INFO - Waiting...
2022-06-04 09:32:51,051 - sonarr_youtubedl - INFO - Initial run
2022-06-04 09:32:51,087 - sonarr_youtubedl - INFO - Configuration Found. Loading file.
2022-06-04 09:32:51,134 - sonarr_youtubedl - INFO - Scan interval set to every 15 minutes by config.yml
2022-06-04 09:32:51,224 - sonarr_youtubedl - INFO - My Little Pony: Tell Your Tale missing 2 episodes
2022-06-04 09:32:51,225 - sonarr_youtubedl - INFO -   1: My Little Pony: Tell Your Tale - My Little Pony: Tell Your Tale | Maretime Bay Day 2.0 | Full Episode
2022-06-04 09:32:51,225 - sonarr_youtubedl - INFO -   2: My Little Pony: Tell Your Tale - My Little Pony: Tell Your Tale | The Game is a Hoof | Full Episode
2022-06-04 09:32:51,225 - sonarr_youtubedl - INFO - Processing Wanted Downloads
2022-06-04 09:32:51,225 - sonarr_youtubedl - INFO -   My Little Pony: Tell Your Tale:
2022-06-04 09:32:51,419 - sonarr_youtubedl - INFO -     Extracting urls from https://www.youtube.com/playlist?list=PLUnS6VWqJBaZqq_emLdwdCwU7O7RDEyxW
2022-06-04 09:32:52,578 - sonarr_youtubedl - INFO - Waiting...

You can see the restart, and after it there were two "new" episodes. They had been out for a while, so it is probably not a matter of refresh time.

Sane folder mapping

SONARR Root Folder: /DATA03/media/tv [ Docker mapping: /srv/dev-disk-by-uuid-00a91771-1e9f-451c-aaf9-456977460ae9:/DATA03 ]

when mapped like this in your docker:
/srv/dev-disk-by-uuid-00a91771-1e9f-451c-aaf9-456977460ae9/media:/sonarr_root
files end up here:
/srv/dev-disk-by-uuid-00a91771-1e9f-451c-aaf9-456977460ae9/media/DATA03/media/tv/

As far as I can tell there's no sane way of mapping directly to /tv and not appending the Root Folder.

ERROR: Unable to extract uploader id

Hello,

I have recently built and unraid server and installed this app as a docker container.
It is able to check with sonarr (running also in docker on the same network) for missing episodes but it gives me the below error messages...

Any ideas?

ERROR: [youtube] Sz1kX1Z3CUE: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] sGPSkkeWl04: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] joS3xBGIKG4: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] tvYRx82VmNY: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U 2023-04-04 21:28:01,327 - sonarr_youtubedl - ERROR - 'NoneType' object has no attribute 'get' 2023-04-04 21:28:01,327 - sonarr_youtubedl - ERROR - No video_url 2023-04-04 21:28:01,327 - sonarr_youtubedl - INFO - 1: Missing - Strange Delivery: ERROR: [youtube] AQTX0Ep_hSk: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] zf1Nxm_Hd8g: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] qrBx4JzxP7Y: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] TtkJnxqELB0: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] M9z5lxKzfgY: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] CGquVxL-aFA: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] ns5-xynWJtw: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] XYeiUo7HkjM: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U 2023-04-04 21:28:16,581 - sonarr_youtubedl - ERROR - 'NoneType' object has no attribute 'get' 2023-04-04 21:28:16,581 - sonarr_youtubedl - ERROR - No video_url 2023-04-04 21:28:16,582 - sonarr_youtubedl - INFO - 2: Missing - Halloween Special: ERROR: [youtube] tQsrVyzxn9Y: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] nkbTsu5Zw_M: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] fdDd86Pysmw: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] 2UIRCCY02Ow: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U ERROR: [youtube] cCkNCsde_og: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U

Support for other youtubeDL's

This project desperately needs support for youtubeDLC or DLP. The original project downloads ridiculously slow and even though they update it sometimes now it isn't anywhere near as good as the others. You wouldn't even have to change any of the commands just the binary file that is called.

Allow youtube-dl.conf from user

Currently, the app is defaulting to 'merge-output-format': 'mp4'. It'd be really nice to have this be overrideable in the config, as well as possibly exposing other options, like post processing.

This would allow the client to specify other merge output formats (see here) such as MKV. Post-processing options would also be nice to be able to pass in to do things like recode/etc on complete.

If this is something you're interested in, but don't have time, I could open a Pull Request.

Downloading from crunchyroll

Using the dev branch (for yt-dlp, because it's updated to the new crunchyroll frontend), I tried using this image to download video from CrunchyRoll.com

It seems to fail somewhere with no errors shown.

If I turn on the debug mode, I get the output lines from

logger.debug('Youtube-DL opts used for downloading')
logger.debug(ytdl_format_options)
but not anything from inside the try block directly below that. It also does not output the log line from the catch block. I'm not sure what's happening there, but it seems to be failing silently in the try block.

Log file for Demon Slayer attempt from crunchyroll is attached.
_sonarr_youtubedl_logs.txt

EDIT: I do understand that this project's focus is from youtube, and for that it works wonderfully. However, if it can also handle crunchyroll, I'd be ecstatic. Short of ripping apart the docker container and the script within, I'm not sure how to see what's even going wrong here and how hard a fix it might be.

youtube-dl/yt-dlp does not convert all quote characters

Hello!

In utils.py, we have the following lines:

# Remove quote characters as YTDL converts these.
string = string.replace('’',"'")

But it does not seem to be the case. Here is an example:

$ youtube-dl --flat-playlist --get-title https://www.youtube.com/playlist?list=PLUnS6VWqJBaZqq_emLdwdCwU7O7RDEyxW
My Little Pony: Tell Your Tale | NEW SERIES | Trailer
My Little Pony: Tell Your Tale | A Home to Share | Full Episode
[...]
My Little Pony: Tell Your Tale | "Señor Butterscotch" | MLP
My Little Pony: Tell Your Tale | IT’S T.U.E.S. DAY | Full Episode

Notice the character in the last title.

The same happens with yt-dlp:

$ yt-dlp --flat-playlist --print title https://www.youtube.com/playlist?list=PLUnS6VWqJBaZqq_emLdwdCwU7O7RDEyxW
WARNING: [youtube:tab] YouTube said: INFO - 1 unavailable video is hidden
WARNING: [youtube:tab] YouTube said: INFO - Unavailable videos will be hidden during playback
My Little Pony: Tell Your Tale | NEW SERIES | Trailer
My Little Pony: Tell Your Tale | A Home to Share | Full Episode
[...]
My Little Pony: Tell Your Tale | "Señor Butterscotch" | MLP
My Little Pony: Tell Your Tale | IT’S T.U.E.S. DAY | Full Episode
[Private video]

Both youtube-dl and yt-dlp were downloaded using pip, and I have youtube-dl 2021.12.17 and yt-dlp 2022.04.08

The 'warn' method is deprecated

Warning on console:
/app/sonarr_youtubedl.py:201: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead logger.warn('{0} is not currently monitored'.format(ser['title']))

YT-DLP version update

Is it possible to get an update so that this runs with the up to date version of YT-DLP? i keep getting an error when it trys to dl the files.

ERROR: [youtube] 0_NVdZp8haA: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U

Submit to DockSTARTer

I think that this container would be a great addition to the DockSTARTer suite. They accept Pull Requests for container submissions so I thought I would come straight to the source to request it.

Is your feature request related to a problem? Please describe.
No problem - just a suggestion.

Describe the solution you'd like
Submitting this container to the DockSTARter project by using a Pull Request on their GitHub.

Additional context
I am adequate at implementing solutions that other people have created but am sadly inadequate at creating those solutions myself which is why I am requesting it rather than just doing it myself! Ideally it would benefit people other than me as well though.

/tv location

Sonarr 2.0.0.5344. Maybe I am just configuring it incorrectly, but I can't figure out how to fix it. My shows are located in a folder /path/to/Episodes.
In sonarr, that path is mapped to /tv. In sonar, the path for everything shows up as /tv/{series}. sonarr_youtubedl is saving things to /path/to/Episodes/tv/{series}. That /tv in there makes it so it's not going to the same directory that sonarr is monitoring

Using uppercase of regex breaks \d

Currently using whatdaybob/sonarr_youtubedl:dev from docker, I have an issue with the title regex in the configuration. I checked, and the same issue is present in main.

I would like to have a regex that can contain an episode number, such as this: Ep. \\d+ | \g<1>. However, the code currently transforms the regex to uppercase, which changes the meaning of the regex: \d is a digit, whereas \D is a non-digit.

Container crash when trying to fetch new videos

I have downloaded and installed the container and created the config file as per instructions.
Unfortunately, the container goes to a fatal crash when trying to fetch new videos...

Log attached below.

date stream content
2021-04-07 10:26:07 stdout TypeError: argument of type 'NoneType' is not iterable
2021-04-07 10:26:07 stdout if 'entries' in result and len(result['entries']) > 0:
2021-04-07 10:26:07 stdout File "/app/sonarr_youtubedl.py", line 316, in ytsearch
2021-04-07 10:26:07 stdout found, dlurl = self.ytsearch(ydleps, url)
2021-04-07 10:26:07 stdout File "/app/sonarr_youtubedl.py", line 343, in download
2021-04-07 10:26:07 stdout client.download(series, episodes)
2021-04-07 10:26:07 stdout File "/app/sonarr_youtubedl.py", line 415, in main
2021-04-07 10:26:07 stdout main()
2021-04-07 10:26:07 stdout File "/app/sonarr_youtubedl.py", line 421, in 
2021-04-07 10:26:07 stdout Traceback (most recent call last):
2021-04-07 10:26:07 stdout �[0;31mERROR:�[0m Unable to extract �[0;34myt initial data�[0m; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
2021-04-07 10:26:05 stdout 2021-04-07 11:26:05,045 - sonarr_youtubedl - INFO -   The Skid Factory:
2021-04-07 10:26:05 stdout 2021-04-07 11:26:05,045 - sonarr_youtubedl - INFO - Processing Wanted Downloads
2021-04-07 10:26:05 stdout 2021-04-07 11:26:05,044 - sonarr_youtubedl - INFO - The Unicorn Circuit no episodes needed
2021-04-07 10:26:04 stdout 2021-04-07 11:26:04,652 - sonarr_youtubedl - INFO -   1: The Skid Factory - GEN 4 Subaru Liberty P Plater Build EP2
2021-04-07 10:26:04 stdout 2021-04-07 11:26:04,652 - sonarr_youtubedl - INFO - The Skid Factory missing 1 episodes
2021-04-07 10:26:03 stdout 2021-04-07 11:26:03,931 - sonarr_youtubedl - INFO - Mighty Car Mods no episodes needed
2021-04-07 10:25:59 stdout 2021-04-07 11:25:59,684 - sonarr_youtubedl - INFO - Scan interval set to every 1 minutes by config.yml
2021-04-07 10:25:59 stdout 2021-04-07 11:25:59,666 - sonarr_youtubedl - INFO - Configuration Found. Loading file.
2021-04-07 10:25:59 stdout 2021-04-07 11:25:59,651 - sonarr_youtubedl - INFO - Initial run

Downloading the same file for all episodes - Sonarr V4

Loving the tool. I am running into an interesting issue i cannot track. Trying to download from both youtube and dropout, it seems to full the entire season with one single file. Rookie pythin, so excuse the lack of details.

Sonarr_youtubedl downloading but not showing in file

I am new to docker so i probably messed something up but when I run sonarr_youtubedl its shows the the videos are being downloaded but it doesn't appear in the folder.

[download] 100.0% of 21.99MiB at 72.46KiB/s ETA 00:00
2021-08-16 02:17:34,751 - sonarr_youtubedl - DEBUG - /sonarr_rootE:\TV-Shows\The Sidemen Show/Season 1/The Sidemen Show - S1E2 - Winter Sports Challenges WEBDL.f278.webm - 100.0% - 00:00
[download] 100% of 21.99MiB in 05:12tubedl - DEBUG - 2021-08-16 02:17:34,752 - sonarr_youtubedl - INFO - Done downloading The Sidemen Show - S1E2 - Winter Sports Challenges WEBDL.f278.webm

This is what I get in the log

RegEx Help / Documentation

I apologize as I didn't know where else to seek help.

I am trying to use sonarr_youtubedl to download a wrestling series weekly show from YouTube. I believe I just need help with the RegEx to make this work. The show is in the TVDB.

Any help would be appreciated.
Youtube URL:https://www.youtube.com/channel/UCFN4JkGP_bVhAdBsoV9xftA
Episode Patterns in Sonarr: "AEW Dark 98" or "AEW Dark 99"
Episode Patterns in YouTube: "Varsity Blonds, The Acclaimed, Red Velvet, Dark Order, Abadon, Big Swole and More! | AEW Dark, Ep 99"

Log Examples:

2021-07-29 16:56:33,510 - sonarr_youtubedl - DEBUG - [download] "Varsity Blonds, The Acclaimed, Red Velvet, Dark Order, Abadon, Big Swole and More! | AEW Dark, Ep 99" title did not match pattern "AEW\ DARK\ 99"

2021-07-29 17:01:34,165 - sonarr_youtubedl - DEBUG - {'ignoreerrors': True, 'playlistreverse': True, 'matchtitle': 'AEW\ DARK\ 99', 'quiet': False, 'logger': <utils.YoutubeDLLogger object at 0x7f649b776410>, 'progress_hooks': [<function ytdl_hooks at 0x7f649b79be60>]},
2021-07-29 17:01:34,164 - sonarr_youtubedl - INFO - AEW Dark missing 1 episodes,
2021-07-29 17:01:34,164 - sonarr_youtubedl - INFO - 1: AEW Dark - AEW Dark 99

Thank you

EDIT: Okay, I did some drastic things to get this to work. Just in case someone stumbles upon this comment in the future. I really have no idea why the script was adding in the backslashes to the episode title from Sonarr.

Here was my new RegEx in the config:

series
  - title: 'AEW Dark'
    url: https://www.youtube.com/c/AEW/videos
    regex:
      sonarr:
        match: '\D+'
        replace: 'AEW Dark, Ep '

Then I did some drastic work. In the utils.py file, under "def upperescape(string):" function I commented out everything (except for the return). That fixed the random backslashes. I know this is not a proper fix, but it worked for now. I also know this will get overwritten on an update, but it's a quick fix for me to do again.

Intructions for use - examples of it in use? Video?

Hi, having tried to understand how to integrate this into my Docker stack and get it working I am none the wiser. I've added it to my docker compose file, edited the file locations, created the .yml config file and amended my Sonarr server IP, and added the API key from Sonarr. It's running and I get log file entries that say it's listening every 1 minute. Now what?

Firstly you need a series that is available online in the supported sites that YouTube-DL can grab from

  • So I saw the example for Slo Mo Guys in config.yml.template ... managed to find that in Sonarr and added it in Sonarr. Was it sonarr_youtubedl that adds the ability to search YouTube channels in Sonarr?

Secondly you need to add this to Sonarr and monitor the episodes that you want.

  • yes, added in Sonarr and monitoring episodes for the latest season.

Thirdly edit your config.yml accordingly so that this knows where your Sonarr is, which series you are after and where to grab it from.

  • yes, added my Sonarr IP and API key.

Lastly be aware that this requires the TVDB to match exactly what the episodes titles are in the scan, generally this is ok but as its an openly editable site sometime there can be differences.

  • I see that the Slo Mo Guys are listed in thetvdb.com. If I want a channel that's not listed in thetvdb.com I guess I can create an account and add it?
2023-08-04 13:30:46,981 - sonarr_youtubedl - DEBUG - DEBUGGING ENABLED
2023-08-04 13:30:46,982 - sonarr_youtubedl - DEBUG - Begin call Sonarr for all available series
2023-08-04 13:30:46,982 - sonarr_youtubedl - DEBUG - Begin GET with url: http://10.0.0.5:8989/api/series
2023-08-04 13:33:01,468 - sonarr_youtubedl - INFO - Initial run
2023-08-04 13:33:01,468 - sonarr_youtubedl - INFO - Configuration Found. Loading file.
2023-08-04 13:33:01,476 - sonarr_youtubedl - INFO - Scan interval set to every 1 minutes by config.yml
2023-08-04 13:33:01,476 - sonarr_youtubedl - DEBUG - DEBUGGING ENABLED
2023-08-04 13:33:01,476 - sonarr_youtubedl - DEBUG - Begin call Sonarr for all available series
2023-08-04 13:33:01,477 - sonarr_youtubedl - DEBUG - Begin GET with url: http://10.0.0.5:8989/api/series

Are there any examples of how this is supposed to work? What expected behavior is, what log entries I should see etc., troubleshooting steps? The https://github.com/whatdaybob/sonarr_youtubedl#how-do-i-use-it section is a little light on detail.

From the instructions I expected this would enable something that allows me to search in Sonarr and locate a Youtube channel, which I guess I can now do, subscribe to it and select episodes to download, which I can now see, but it now doesn't seem to download anything. Have I misunderstood the point of this container, or am I missing some configuration steps?

Very confused.
Thanks.

Keyerror: 'entries"

Hello, I am looking for some help with an issue I am having. I have grabbed this to try out, and am currently running it outside of Docker with Python. I am testing out a download from a playlist, and it sees the videos, but when it tries to download them (I assume) I get this error:

Traceback (most recent call last):
File "C:\ProgramData\Sonarr_YouTubeDL\sonarr_youtubedl.py", line 587, in
main()
File "C:\ProgramData\Sonarr_YouTubeDL\sonarr_youtubedl.py", line 581, in main
client.download(series, episodes)
File "C:\ProgramData\Sonarr_YouTubeDL\sonarr_youtubedl.py", line 473, in download
logger.debug(f" Extracted {len(playlist_dict['entries'])} entries")
KeyError: 'entries'

To clarify, I am running this on Windows Server 2019, with Python 3.10.7, and have pulled the code for the Dev build, installed all the items in "requirements.txt" and updated all python packages.

Any help would be appreciated, and if you need more info please let me know.

Some questions and clarifications on Setup

For Sonarr YTDL:

First off thanks for doing this, theres a few things that are confusing me about setup and I want to make sure I am doing this right:

  1. -v /path/to/sonarrmedia:/sonarr_root \ - Is path to Sonarr Media, the location that downloaded videos should be placed?
  2. I assume that and files downloaded would be stored in a folder with the "title" listed in the config.yaml under series, is that correct?
  3. -v /path/to/logs:/logs \ - Is path to logs the Sonarr subfolder logs in wherever the "config" of sonarr is located?
  4. In Config, where do I get api key? Do I use the same API key from the Sonarr "General" tab in settings? Do I need to set authentication to anything, or is none okay?
  5. In Config, under series: Can I put multiple title/url lines in a row?
  6. How can I tell if files are downloading?

Thank you so much again, I am really excited to get this going. If this is not the right place to clarify these questions, please let me know. I am not sure things are working right.

[VVVVID] unsupported url but Youtube-dl support the site [ReOpen]

I reopen the issue whatdaybob/Custom_Docker_Images#22 (unfortunately you have not given permission to reopen for real, so I have to make a new one).
Having received no feedback from anyone, I therefore decided to open it.
In case you can close.

Comment:

Thank you for the update, but unfortunately it didn't work completely.
Now (according to the logs) he finds the series and ep (even without #!) But he can't download them because they don't respect the pattern / regEX "EPISODE\\ 03" ... (I assume it's more in "*episode* \d" the regEX). Now I have tried to insert match-title / matchtitle as a parameter for YDL in the config but it seems to be ignored and it wouldn't work anyway.
Unfortunately I don't know where it gets the title (URL? ID?) But in both cases, many times the episode title does not contain the numbering (0-9) and the word "episode" but the actual title of the episode. Example:
Akudama Drive Episode1: "Se7En" is the title (there is no "episode" or number).
Am I doing something wrong?

New Conf:
image

VVVVID Screens Ex:

image

This is the URL page used in the program. On the right it actually says "episode" + the episode number (this is a special case, because according to the site, the episodes of the second season do not have a proper title).

But now let's take Attack on Titan as an example:
image
image

At least as far as URL and WEB page are concerned, there is no "episode" in the title.

AnimeGG:
image
image
As you can see, the program displays the titles and sorts the episodes independently.
If you move the mouse over the box that contains the title of the ep the word "stream>" appears to open the link it uses for the download (same link if you open ep from the VVVVID web page)

Log/error:

image

2021-01-26 13:34:53,028 - sonarr_youtubedl - INFO - Initial run
2021-01-26 13:34:53,033 - sonarr_youtubedl - INFO - Configuration Found. Loading file.
2021-01-26 13:34:53,055 - sonarr_youtubedl - INFO - Scan interval set to every 15 minutes by config.yml
2021-01-26 13:34:53,057 - sonarr_youtubedl - DEBUG - DEBUGGING ENABLED
2021-01-26 13:34:53,078 - sonarr_youtubedl - DEBUG - Begin call Sonarr for all available series
2021-01-26 13:34:53,080 - sonarr_youtubedl - DEBUG - Begin GET with url: http://192.168.1.2:8989/api/series
/app/sonarr_youtubedl.py:186: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
logger.warn('{0} is not currently monitored'.format(ser['title']))
2021-01-26 13:34:54,151 - sonarr_youtubedl - WARNING - Psycho-Pass is not currently monitored
2021-01-26 13:34:54,154 - sonarr_youtubedl - WARNING - Psycho-Pass is not currently monitored
2021-01-26 13:34:54,157 - sonarr_youtubedl - DEBUG - Begin call Sonarr for all episodes for series_id: 48
2021-01-26 13:34:54,159 - sonarr_youtubedl - DEBUG - Begin GET with url: http://192.168.1.2:8989/api/episode
2021-01-26 13:34:54,161 - sonarr_youtubedl - DEBUG - Begin GET with params: {'seriesId': 48}
2021-01-26 13:34:54,229 - sonarr_youtubedl - INFO - The Promised Neverland missing 1 episodes
2021-01-26 13:34:54,233 - sonarr_youtubedl - INFO - 1: The Promised Neverland - Episode 3
2021-01-26 13:34:54,236 - sonarr_youtubedl - DEBUG - Begin call Sonarr for all episodes for series_id: 175
2021-01-26 13:34:54,238 - sonarr_youtubedl - DEBUG - Begin GET with url: http://192.168.1.2:8989/api/episode
2021-01-26 13:34:54,240 - sonarr_youtubedl - DEBUG - Begin GET with params: {'seriesId': 175}
2021-01-26 13:34:54,258 - sonarr_youtubedl - INFO - Kemono Jihen no episodes needed
2021-01-26 13:34:54,260 - sonarr_youtubedl - INFO - Processing Wanted Downloads
2021-01-26 13:34:54,263 - sonarr_youtubedl - INFO - The Promised Neverland:
2021-01-26 13:34:54,267 - sonarr_youtubedl - DEBUG - Cookies file used: /config/vvvvid.it_cookies.txt
2021-01-26 13:34:54,269 - sonarr_youtubedl - DEBUG - Youtube-DL opts used for episode matching
2021-01-26 13:34:54,271 - sonarr_youtubedl - DEBUG - {'ignoreerrors': True, 'playlistreverse': True, 'matchtitle': 'EPISODE\ 3', 'quiet': False, 'logger': <utils.YoutubeDLLogger object at 0x7fd50034c590>, 'progress_hooks': [<function ytdl_hooks at 0x7fd50039acb0>], 'cookie': '/config/vvvvid.it_cookies.txt'}
2021-01-26 13:34:55,053 - sonarr_youtubedl - DEBUG - [VVVVIDShow] Downloading JSON metadata
2021-01-26 13:34:55,288 - sonarr_youtubedl - DEBUG - [VVVVIDShow] the-promised-neverland-seconda-stagione: Downloading JSON metadata
2021-01-26 13:34:55,391 - sonarr_youtubedl - DEBUG - [VVVVIDShow] the-promised-neverland-seconda-stagione: Downloading JSON metadata
2021-01-26 13:34:55,545 - sonarr_youtubedl - DEBUG - [download] Downloading playlist: The Promised Neverland - Seconda Stagione
2021-01-26 13:34:55,550 - sonarr_youtubedl - DEBUG - [VVVVIDShow] playlist The Promised Neverland - Seconda Stagione: Collected 3 video ids (downloading 3 of them)
2021-01-26 13:34:55,552 - sonarr_youtubedl - DEBUG - [download] Downloading video 1 of 3
2021-01-26 13:34:55,555 - sonarr_youtubedl - DEBUG - [download] "Episodio 3" title did not match pattern "EPISODE\ 3"
2021-01-26 13:34:55,557 - sonarr_youtubedl - DEBUG - [download] Downloading video 2 of 3
2021-01-26 13:34:55,560 - sonarr_youtubedl - DEBUG - [download] "Episodio 2" title did not match pattern "EPISODE\ 3"
2021-01-26 13:34:55,562 - sonarr_youtubedl - DEBUG - [download] Downloading video 3 of 3
2021-01-26 13:34:55,564 - sonarr_youtubedl - DEBUG - [download] "Episodio 1" title did not match pattern "EPISODE\ 3"
2021-01-26 13:34:55,566 - sonarr_youtubedl - DEBUG - [download] Finished downloading playlist: The Promised Neverland - Seconda Stagione
2021-01-26 13:34:55,568 - sonarr_youtubedl - INFO - 1: Missing - Episode 3:
2021-01-26 13:34:55,571 - sonarr_youtubedl - INFO - Waiting...

Full log: https://mega.nz/file/V99CGCRT#oEkWZq7TdVoQG8YEY5B8V78kNgqCZA7j5aMEtBowJ1w

I renew my thanks for 'lupdate and look forward to it again @whatdaybob .

Line 316: TypeError: argument of type 'NoneType' is not iterable

Getting an error that's crashing the container:
TypeError: argument of type 'NoneType' is not iterable on

if 'entries' in result and len(result['entries']) > 0:

Before that

[youtube:tab] PL7C128DC8047D1C82: Downloading webpage
[download] Downloading playlist: Rooster Teeth Animated Adventures: Mondays
[youtube:tab] Downloading page 1
ERROR: Unable to download JSON metadata: HTTP Error 410: Gone (caused by <HTTPError 410: 'Gone'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Similar to #15
But this is not ARM. I'm running the container in 64-bit Ubuntu.

/sonarr_root hardcoded and Season directory format hardcoded to "Season x" along with files using SxEx instead of what SONARR has configured

I'm running sonarr_youtubedl on a VM which has the PLEX library mounted differently than the SONARR app on TrueNAS Scale.
Sonarr: "rootFolderPath": "/data/TV Shows/"
VM: "/PLEX/VIDEO/media/TV Shows/"

So I added 2 variables to the config.yml (path and localpath under the sonarr config) along with some code to get them into the class. A minor edit to the download function to remove sonarr_root and update to replace path with localpath.

In api/v3/config/naming:
"numberStyle": "S{season:00}E{episode:00}"
"seasonFolderFormat": "Season {season:00}"
"standardEpisodeFormat": "{Series TitleYear} - S{season:00}E{episode:00} - {Episode CleanTitle} [{Preferred Words }{Quality Full}]{[MediaInfo VideoDynamicRangeType]}{[Mediainfo AudioCodec}{ Mediainfo AudioChannels]}{[MediaInfo VideoCodec]}{-Release Group}"

I had to read the config/naming and format the strings to use python formatting. This allowed for simple changes to download function to use the new class variables. I did not write the code to fully read the standardEpisodeFormat as it was close enough to what was already there..

Attached diff.txt of my changes...
diff.txt

Now off to figure out why it can't find a couple of episodes from the list and how to add support for downloading in HD-720p, et. al.

Is this really the best solution for regexing?

I'm trying to download from https://roosterteeth.com/series/rwby but in Sonarr the episode names are like this The Shining Beacon (1) The Shining Beacon (2) and on the site it's The Shining Beacon The Shining Beacon, Pt.2
the best solution I could come up with is

    regex:
      sonarr:
        match: '[A-Z][a-z]* [A-Z][a-z]* [A-Z][a-z]* \(1\)'
        replace: 'The Shining Beacon'
        match: '[A-Z][a-z]* [A-Z][a-z]* [A-Z][a-z]* \(2\)'
        replace: 'The Shining Beacon, Pt.2'
        match: '[A-Z][a-z]* [A-Z][a-z]* [A-Z][a-z]* \(1\)'
        replace: 'The First Step'
        match: '[A-Z][a-z]* [A-Z][a-z]* [A-Z][a-z]* \(2\)'
        replace: 'The First Step, Pt.2'

But it seems like a pain, have to enter the episode name for every episode, tried entering regex in the replace Field and it just printed the regex
image

Multiple regex options?

The issue I'm facing is multiple changes to titles. in this playlist for example: https://www.youtube.com/watch?v=LlKnEgPEGmA&list=PLt5zc-HxINkpAr9Ri_qJtzklB9YK2Eunh

Title in sonarr: Episode title
Variation one: Show: Episode title
Variation two: Show | Episode title
Variation three: Episode title | Show

Each regex will be executed in sequence. The Sonarr episode title is the input for the first regex, and the output of each regex is used as the input for the next in the list.

Am i understanding it correctly that each is applied to the output of the previous and you are left with a single title in the end? is it possible to search against multiple title variations?
Is there a way to handle the situation above?

Not downloading proper files

I'm trying to run through the script to see where it is erroring out at. However, when I have it setup in the config file and let it run it isn't properly pulling files. It is naming it but the file is the same file over and over.

If I manually run the following it downloads proper files
yt-dlp -f "bv*[ext=mp4][height<=1080]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b" -P "/sonarr_root/" -o "%(uploader)s/%(upload_date>%Y)s/%(title)s.%(ext)s" "https://www.youtube.com/channel/channel_id"

How to deploy and configure if Sonarr is on a server but this is in Docker

How to deploy and configure if Sonarr is on a server but this is in Docker?

I run Sonarr, Radarr, Lidarr and Plex on a custom Media server. I am in the process of migrating my library files to a Synology NAS. It is not powerful enough to transcode, so Plex will remain on my server. So, the question is this: How would I deploy this in my current environment? I'm new to docker, but I have successfully deployed YoutubeDL-Material and have had great success with it in conjunction with FileBot to rename the downloaded files and move them to appropriate directories. I didn't see any videos detailing the deployment of this yet and the only write up I've found is on your Git page.

Issue communicating with sonarr!

I just noticed this has been looping the attached error for.. however long. I'm assuming it's been since I updated to the new major version of sonarr, on 4.0.0.307 right now in docker. The API key, url and port are all correct but all I see is what's in the picture.

image

Playlist question

Has anyone already tried to use this container to download series from websites supported by youtube-dl, such as CBS, NBC or CW?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.