r0bc94 / JellyfinDownloader

Tool to download Series or Movies from a Jellyfin Server
6 stars 2 forks source link

Example of a movie command line? #13

Open ZappBrannigannnn opened 1 month ago

ZappBrannigannnn commented 1 month ago

I have tried many combinations of ids and URLs along with username and password flags. I'm wondering if you could give me an example of a command line that would be successful with movies? Thanks so much!

r0bc94 commented 1 month ago

Hi, the easiest way is to just specify an url and a name of a show you want to download like so:

➜  jellyfindownloader git:(main) go run main.go -url https://192.168.178.3:8103/ -name "James Bond"
Username: robin
Password: 
Found multiple Shows for the given Searchterm. Please Select the show you want to download:
  1. James Bond 007 - Goldfinger
  2. James Bond 007 jagt Dr. No
  3. James Bond 007 - Im Geheimdienst Ihrer Majestät
  4. James Bond 007 - Feuerball
  5. James Bond 007 - Leben und sterben lassen
  6. James Bond 007 - Diamantenfieber
  7. James Bond 007 - Man lebt nur zweimal
  8. James Bond 007 - Liebesgrüße aus Moskau
  9. James Bond 007 - Der Spion, der mich liebte
  10. James Bond 007 - Der Mann mit dem goldenen Colt
  11. James Bond 007 - Moonraker - Streng geheim
  12. James Bond 007 - In tödlicher Mission

This also works for movies and in conjunction with the username and password parameters

o run main.go -url https://192.168.178.3:8103/ -name "James Bond" -username Robin -password password123
Found multiple Shows for the given Searchterm. Please Select the show you want to download:
  1. James Bond 007 - Goldfinger
  2. James Bond 007 jagt Dr. No
  3. James Bond 007 - Im Geheimdienst Ihrer Majestät
  4. James Bond 007 - Feuerball
  5. James Bond 007 - Leben und sterben lassen
  6. James Bond 007 - Diamantenfieber
  7. James Bond 007 - Man lebt nur zweimal
  8. James Bond 007 - Liebesgrüße aus Moskau
  9. James Bond 007 - Der Spion, der mich liebte
  10. James Bond 007 - Der Mann mit dem goldenen Colt
  11. James Bond 007 - Moonraker - Streng geheim
  12. James Bond 007 - In tödlicher Mission
==> ^Csignal: interrupt

Can you send me the command including the result you tried to that I could take a look?

ZappBrannigannnn commented 1 month ago

Should there be hyphens before username and password?

On Thu, Sep 26, 2024, 3:06 p.m. Robin Palkovits @.***> wrote:

Hi, the easiest way is to just specify an url and a name of a show you want to download like so:

➜ jellyfindownloader git:(main) go run main.go -url https://192.168.178.3:8103/ -name "James Bond" Username: robin Password: Found multiple Shows for the given Searchterm. Please Select the show you want to download:

  1. James Bond 007 - Goldfinger
  2. James Bond 007 jagt Dr. No
  3. James Bond 007 - Im Geheimdienst Ihrer Majestät
  4. James Bond 007 - Feuerball
  5. James Bond 007 - Leben und sterben lassen
  6. James Bond 007 - Diamantenfieber
  7. James Bond 007 - Man lebt nur zweimal
  8. James Bond 007 - Liebesgrüße aus Moskau
  9. James Bond 007 - Der Spion, der mich liebte
  10. James Bond 007 - Der Mann mit dem goldenen Colt
  11. James Bond 007 - Moonraker - Streng geheim
  12. James Bond 007 - In tödlicher Mission

This also works for movies.

Can you send me the command including the result you tried to that I could take a look?

— Reply to this email directly, view it on GitHub https://github.com/r0bc94/JellyfinDownloader/issues/13#issuecomment-2377723512, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESVFNLVOVT6574SZ3XTZYRLJZAVCNFSM6AAAAABO25RO4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZXG4ZDGNJRGI . You are receiving this because you authored the thread.Message ID: @.***>

ZappBrannigannnn commented 1 month ago

C:>jdl -url https://********.org/ -username *** -password **** -name "Atrocious" Failed to obtain Episode Information for given id: Request Failed (Code 404):

If I try to enter the username and password within the prompts the password doesn't seem to enter and i get:

Authentication Failed! Request Failed (Code 401): Error processing request.

Sorry I should mention that I changed the jellyfindownloader.exe to jdl.exe so i didn't have to type it out every time.

r0bc94 commented 1 month ago

Should there be hyphens before username and password?

No. But you can also pass the credentials using variables, which also is a lot more secure then passing credetials directly via the command line as those can be read from the process list.

On linux, you can call the tool like so:

JF_USERNAME="username" JF_PASSWORD="password"  jellyfindownloader -url https://192.168.178.3:8103/ -name "James Bond"

On Windows, it should work like so, but I didn't confirmed it:

cmd /C "set JF_USERNAME=username && set JF_PASSWORD=password && jellyfindownloader -url https://192.168.178.3:8103/ -name "James Bond"

If I try to enter the username and password within the prompts the password doesn't seem to enter and i get:

That you dont see a direct response when entering the password is indeed correct. However for the username, the prompt shold act normally. I suppose you are on windows right? If so, do you use the new Windows Terminal or the default cmd?

ZappBrannigannnn commented 1 month ago

I am on windows. I am using mobaxterm terminal. Are you saying i should switch -username and -password for -jf_username and -jf_password?

ZappBrannigannnn commented 1 month ago

C:>jdl -url https://********.org/ -username *** -password **** -name "Atrocious" Failed to obtain Episode Information for given id: Request Failed (Code 404):

This obviously passed the authentication. But couldn't seem to find anything.

ZappBrannigannnn commented 1 month ago

I'm going into the terminal, navigating to the folder which contains jellyfindownloader.exe by doing this: cd\ cd jellyfindownloader dir/p jdl.exe (is present in the folder) (I have renamed it to jdl.exe so i don't have to type that out every time)

Then I type this: -url https://*****/ -name "Atrocious" -username ****-password ** I get this: '-url' is not recognized as an internal or external command, operable program or batch file.

Or this: C:\Jellyfindownloader>jdl -url https://** -name "atrocious" I get this: Authentication Failed! Request Failed (Code 401): Error processing request. (Which tells me that it at least connected to the url properly, attempted to access it, and was denied due to no credentials.)

Or this: C:>jdl -url https://********.org/ -username *** -password **** -name "Atrocious" I get this: Failed to obtain Episode Information for given id: Request Failed (Code 404): (This seems to have passed the authentication. But couldn't find anything.)

Am i doing something inherently wrong. Your suggestions, for example: cmd /C "set JF_USERNAME=username && set JF_PASSWORD=password && jellyfindownloader -url https://192.168.178.3:8103/ -name "James Bond" look quite different from mine. Where should this be entered? You enter cmd into the cmd?? Regardless is there an intentional extra quotation mark before SET ? ("set)

I'm only guessing but are we trying to "set" a static username and password for jellyfin by using the JF_USERNAME and JF_PASSWORD?

Throwing spaghetti at the wall I tried this (among many other things): C:\Jellyfindownloader>jdl -set JF_USERNAME=** and get this: flag provided but not defined: -set which makes sense because as far as i can tell these are the only available flags:

-name string Name of the Show or Movie you want to download. -password string Passwort for the Jellyfin instance. If not provided, username will be prompted. -seasonid string If given, only the episodes with the provided season Id will be downloaded -seriesid string ID which points to the series which should be downloaded -url string Base URL which points to the Jellyfin Instance -username string Username used to login to the Jellyfin instance. If not provided, password will be prompted. -version Shows the Version Informations and Exit

Maybe it would help to break this down into steps to narrow down where I'm failing.

r0bc94 commented 1 month ago

I actually where able to reproduce this issue on Windows. Please get me some time to look into this.

r0bc94 commented 1 month ago

I guess I found the issue, at least when specifying the username in the command prompt. Can you please check my PR https://github.com/r0bc94/JellyfinDownloader/pull/14 ?

r0bc94 commented 1 month ago

To make things easier, I already build and created a windows release which should include the fix. Please check out: https://github.com/r0bc94/JellyfinDownloader/releases/tag/pre_v1.2.2

ZappBrannigannnn commented 1 month ago

This is with the new .exe file C:\Jellyfindownloader>jdl -url https://****/ -username *****-password **-name Atrocious Failed to obtain Episode Information for given id: Request Failed (Code 404):

Is there a way to list everything that is available?

Is there a way to use the movie's id instead of the name maybe?

r0bc94 commented 1 month ago

Do you know which version the jellyfin server is you want to query?