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

Torrent name assignment #8

Closed
Demicro opened this issue Jan 8, 2021 · 8 comments
Closed

Torrent name assignment #8

Demicro opened this issue Jan 8, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@Demicro
Copy link

Demicro commented Jan 8, 2021

I am trying to get the program to use the name of the file as the name it will show in the torrent but the torrent is not created.
using a bat file

the torrent is not created if the name contains parentheses

-n "%~nx1" %*

@rsnitsch
Copy link
Owner

rsnitsch commented Jan 8, 2021

What is -n "%~nx1" %* evaluated to on your system? What does the full command look like which executes py3createtorrent? (With all placeholders evaluated.)

@Demicro
Copy link
Author

Demicro commented Jan 8, 2021

to get the file name and extension "%~nx1"

py3createtorrent -P -q -d -2 --md5 -c "xD" -t tracker -n "%~nx1" -o "%outputdir%%~n1[tracker name] %~n1.torrent" %*

@rsnitsch
Copy link
Owner

rsnitsch commented Jan 8, 2021

What is the actual full command called, after the placeholders have been replaced with the variable values?

@Demicro
Copy link
Author

Demicro commented Jan 8, 2021

file name contains (2020)
the torrent is created if I remove the parentheses

@rsnitsch
Copy link
Owner

rsnitsch commented Jan 8, 2021

For me it works. It is probably a problem with your BAT file. It is important to know what the actual full RESOLVED commandline looks like (after placeholders have been replaced with actual values).

My test output:

C:\Users\Robert\Desktop\TorrentTest                                                       
λ pip install py3createtorrent                                                            
Collecting py3createtorrent                                                               
  Using cached py3createtorrent-1.0.0b1-py3-none-any.whl (13 kB)                          
Collecting bencode.py                                                                     
  Downloading bencode.py-4.0.0-py2.py3-none-any.whl (18 kB)                               
Installing collected packages: bencode.py, py3createtorrent                               
Successfully installed bencode.py-4.0.0 py3createtorrent-1.0.0b1                          
                                                                                          
C:\Users\Robert\Desktop\TorrentTest                                                       
λ py3createtorrent.exe "test(parentheses).dot"                                            
Successfully created torrent:                                                             
  Name:                test(parentheses).dot                                              
  Size:                4 KiB                                                              
  Pieces:              1 x 16 KiB                                                         
  Comment:             created with py3createtorrent v1.0.0b1                             
  Private:             no                                                                 
  Creation date:       2021-01-08 11:49:26                                                
  DHT bootstrap nodes: (none)                                                             
  Webseeds:            (none)                                                             
  Primary tracker:     (none)                                                             
  Backup trackers:                                                                        
    (none)                                                                                
                                                                                          
C:\Users\Robert\Desktop\TorrentTest                                                       
λ py3createtorrent.exe "test(parentheses).dot" -o "custom-name-with-(parentheses).torrent"
Successfully created torrent:                                                             
  Name:                test(parentheses).dot                                              
  Size:                4 KiB                                                              
  Pieces:              1 x 16 KiB                                                         
  Comment:             created with py3createtorrent v1.0.0b1                             
  Private:             no                                                                 
  Creation date:       2021-01-08 11:50:19                                                
  DHT bootstrap nodes: (none)                                                             
  Webseeds:            (none)                                                             
  Primary tracker:     (none)                                                             
  Backup trackers:                                                                        
    (none)                                                                                
                                                                                          
C:\Users\Robert\Desktop\TorrentTest                                                       
λ ls -l                                                                                   
total 10                                                                                  
-rw-r--r-- 1 Robert 197121  226 Jan  8 11:50 'custom-name-with-(parentheses).torrent'     
-rw-r--r-- 1 Robert 197121 4592 Jan  8 11:27 'test(parentheses).dot'                      
-rw-r--r-- 1 Robert 197121  226 Jan  8 11:49 'test(parentheses).dot.torrent'             

@Demicro
Copy link
Author

Demicro commented Jan 8, 2021

py3createtorrent.py: error: Invalid name: 'camila (2020).aac'. Allowed chars: A_Z, a-z, 0-9, any of {.,_-} plus spaces.

@rsnitsch rsnitsch added the bug Something isn't working label Jan 8, 2021
@rsnitsch
Copy link
Owner

rsnitsch commented Jan 8, 2021

Ok, I got it. Will be fixed soon.

@rsnitsch
Copy link
Owner

rsnitsch commented Jan 8, 2021

Fixed in 1.0.0b2. Please upgrade with pip install --upgrade py3createtorrent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants