เครื่องมือดาวน์โหลดอัตโนมัติสำหรับ Soulseek ที่สร้างด้วย Soulseek.NET ยอมรับไฟล์ CSV รวมถึง URL ของ Spotify และ YouTube
รองรับการดาวน์โหลดเพลย์ลิสต์และอัลบั้ม เลือกไฟล์ที่ดีที่สุดตามเงื่อนไขไฟล์และการวิเคราะห์พฤติกรรมที่ผู้ใช้กำหนด
ดูตัวอย่างการใช้งาน
Usage: sldl <input> [OPTIONS]
<input> A url, search string, or path to a local CSV file.
Run --help "input" to view the accepted inputs.
Can also be passed with -i, --input <input>
--user <username> Soulseek username
--pass <password> Soulseek password
-p, --path <path> Download directory
--input-type <type> [csv|youtube|spotify|bandcamp|string|list]
--name-format <format> Name format for downloaded tracks. See --help name-format
-n, --number <maxtracks> Download the first n tracks of a playlist
-o, --offset <offset> Skip a specified number of tracks
-r, --reverse Download tracks in reverse order
-c, --config <path> Set config file location. Set to 'none' to ignore config
--profile <names> Configuration profile(s) to use. See --help ""config"".
--concurrent-downloads <num> Max concurrent downloads (default: 2)
--write-playlist Create an m3u playlist file in the output directory
--playlist-path <path> Override default path for m3u playlist file
--no-skip-existing Do not skip downloaded tracks
--no-write-index Do not create a file indexing all downloaded tracks
--index-path <path> Override default path for sldl index
--skip-check-cond Check file conditions when skipping existing files
--skip-check-pref-cond Check preferred conditions when skipping existing files
--skip-music-dir <path> Also skip downloading tracks found in a music library by
comparing filenames. Not 100% reliable.
--skip-not-found Skip searching for tracks that weren't found on Soulseek
during the last run.
--listen-port <port> Port for incoming connections (default: 49998)
--on-complete <command> Run a command whenever a file is downloaded.
Available placeholders: {path} (local save path), {title},
{artist},{album},{uri},{length},{failure-reason},{state}.
Prepend a state number to only run in specific cases:
1:, 2:, 3:, 4: for the Downloaded, Failed, Exists, and
NotFoundLastTime states respectively.
E.g: '1:<cmd>' will only run the command if the file is
downloaded successfully. Prepend 's:' to use the system
shell to execute the command.
--print <option> Print tracks or search results instead of downloading:
'tracks': Print all tracks to be downloaded
'tracks-full': Print extended information about all tracks
'results': Print search results satisfying file conditions
'results-full': Print search results including full paths.
--no-progress Disable progress bars/percentages, only simple printing
--debug Print extra debug info
--fast-search Begin downloading as soon as a file satisfying the preferred
conditions is found. Only for normal download mode.
--remove-ft Remove 'feat.' and everything after before searching
--no-remove-special-chars Do not remove special characters before searching
--remove-brackets Remove square brackets and their contents before searching
--regex <regex> Remove a regexp from all track titles and artist names.
Optionally specify a replacement regex after a semicolon.
Add 'T:', 'A:' or 'L:' at the start to only apply this to
the track title, artist, or album respectively.
--artist-maybe-wrong Performs an additional search without the artist name.
Useful for sources like SoundCloud where the "artist"
could just be an uploader. Note that when downloading a
YouTube playlist via url, this option is set automatically
on a per-track basis, so it is best kept off in that case.
-d, --desperate Tries harder to find the desired track by searching for the
artist/album/title only, then filtering. (slower search)
--fails-to-downrank <num> Number of fails to downrank a user's shares (default: 1)
--fails-to-ignore <num> Number of fails to ban/ignore a user's shares (default: 2)
--yt-dlp Use yt-dlp to download tracks that weren't found on
Soulseek. yt-dlp must be available from the command line.
--yt-dlp-argument <str> The command line arguments when running yt-dlp. Default:
"{id}" -f bestaudio/best -cix -o "{savepath}.%(ext)s"
Available vars are: {id}, {savedir}, {savepath} (w/o ext).
Note that -x causes yt-dlp to download webms in case ffmpeg
is unavailable.
--search-timeout <ms> Max search time in ms (default: 6000)
--max-stale-time <ms> Max download time without progress in ms (default: 50000)
--searches-per-time <num> Max searches per time interval. Higher values may cause
30-minute bans, see --help "search". (default: 34)
--searches-renew-time <sec> Controls how often available searches are replenished.
See --help "search". (default: 220)
--spotify-id <id> Spotify client ID
--spotify-secret <secret> Spotify client secret
--spotify-token <token> Spotify access token
--spotify-refresh <token> Spotify refresh token
--remove-from-source Remove downloaded tracks from source playlist
--youtube-key <key> Youtube data API key
--get-deleted Attempt to retrieve titles of deleted videos from wayback
machine. Requires yt-dlp.
--deleted-only Only retrieve & download deleted music.
--artist-col Artist column name
--title-col Track title column name
--album-col Album column name
--length-col Track length column name
--album-track-count-col Album track count column name (sets --album-track-count)
--yt-desc-col Youtube description column (improves --yt-parse)
--yt-id-col Youtube video id column (improves --yt-parse)
--time-format <format> Time format in Length column of the csv file (e.g h:m:s.ms
for durations like 1:04:35.123). Default: s
--yt-parse Enable if the CSV contains YouTube video titles and channel
names; attempt to parse them into title and artist names.
--remove-from-source Remove downloaded tracks from source CSV file
--format <formats> Accepted file format(s), comma-separated, without periods
--length-tol <sec> Length tolerance in seconds
--min-bitrate <rate> Minimum file bitrate
--max-bitrate <rate> Maximum file bitrate
--min-samplerate <rate> Minimum file sample rate
--max-samplerate <rate> Maximum file sample rate
--min-bitdepth <depth> Minimum bit depth
--max-bitdepth <depth> Maximum bit depth
--strict-title File name must contain title
--strict-artist File path must contain artist name
--strict-album File path must contain album name
--banned-users <list> Comma-separated list of users to ignore
--pref-format <formats> Preferred file format(s), comma-separated (default: mp3)
--pref-length-tol <sec> Preferred length tolerance in seconds (default: 3)
--pref-min-bitrate <rate> Preferred minimum bitrate (default: 200)
--pref-max-bitrate <rate> Preferred maximum bitrate (default: 2500)
--pref-min-samplerate <rate> Preferred minimum sample rate
--pref-max-samplerate <rate> Preferred maximum sample rate (default: 48000)
--pref-min-bitdepth <depth> Preferred minimum bit depth
--pref-max-bitdepth <depth> Preferred maximum bit depth
--pref-banned-users <list> Comma-separated list of users to downrank
--strict-conditions Skip files with missing properties instead of accepting by
default; if --min-bitrate is set, ignores any files with
unknown bitrate.
-a, --album Album download mode: Download a folder
-t, --interactive Interactive mode, allows to select the folder and images
--album-track-count <num> Specify the exact number of tracks in the album. Add a + or
- for inequalities, e.g '5+' for five or more tracks.
--album-art <option> Retrieve additional images after downloading the album:
'default': No additional images
'largest': Download from the folder with the largest image
'most': Download from the folder containing the most images
--album-art-only Only download album art for the provided album
--no-browse-folder Do not automatically browse user shares to get all files in
in the folder
--failed-album-path Path to move all album files to when one of the items from
the directory fails to download. Set to 'delete' to delete
the files instead. Set to 'disable' keep it where it is.
Default: {configured output dir}/failed
-g, --aggregate Aggregate download mode: Find and download all distinct
songs associated with the provided artist, album, or title.
--aggregate-length-tol <tol> Max length tolerance in seconds to consider two tracks or
albums equal. (Default: 3)
--min-shares-aggregate <num> Minimum number of shares of a track or album for it to be
downloaded in aggregate mode. (Default: 2)
--relax-filtering Slightly relax file filtering in aggregate mode to include
more results
นอกจากนี้ยังยอมรับคำย่อของธงสองและ --สามคำ เช่น --twf หากตัวเลือกมีคำว่า 'สูงสุด' m ควรเป็นตัวพิมพ์ใหญ่ 'bitrate', 'sameplerate' และ 'bitdeep' ควรถือเป็นคำสองคำที่แยกจากกัน เช่น --Mbr สำหรับ --max-bitrate
สามารถปิดการใช้งานแฟล็กได้อย่างชัดเจนโดยตั้งค่าเป็นเท็จ เช่น '--interactive false'
โดยทั่วไปประเภทอินพุตจะถูกกำหนดโดยอัตโนมัติ หากต้องการบังคับใช้ประเภทอินพุตเฉพาะ ให้ตั้งค่า --input-type [spotify|youtube|csv|string|bandcamp|list] มีประเภทอินพุตต่อไปนี้:
เส้นทางไปยังไฟล์ CSV ในเครื่อง: ใช้ไฟล์ CSV ที่มีข้อมูลแทร็กของเพลงที่จะดาวน์โหลด ชื่อของคอลัมน์ควรเป็นศิลปิน ชื่อ อัลบั้ม ความยาว แม้ว่าโดยปกติจะตรวจพบชื่ออื่นเช่นกัน จำเป็นต้องใช้เฉพาะชื่อหรือคอลัมน์อัลบั้ม แต่ข้อมูลเพิ่มเติมอาจปรับปรุงอันดับผลการค้นหาได้ ทุกแถวที่ไม่มีข้อความคอลัมน์ชื่อจะถือเป็นการดาวน์โหลดอัลบั้ม
URL เพลย์ลิสต์: ดาวน์โหลดเพลงจากเพลย์ลิสต์ YouTube วิธีการเริ่มต้นในการดึงเพลย์ลิสต์ไม่ได้ส่งคืนวิดีโอทั้งหมดเสมอไป โดยเฉพาะวิดีโอที่ไม่สามารถใช้งานได้ หากต้องการรับชื่อวิดีโอทั้งหมด คุณสามารถใช้ API อย่างเป็นทางการโดยระบุคีย์ที่มี --youtube-key ดาวน์โหลดได้ที่นี่ https://console.cloud.google.com สร้างโปรเจ็กต์ใหม่ คลิก "เปิดใช้งาน Api" และค้นหา "ข้อมูล youtube" จากนั้นปฏิบัติตามคำแนะนำ
URL เพลย์ลิสต์/อัลบั้มหรือ 'spotify-likes': ดาวน์โหลดเพลย์ลิสต์ Spotify อัลบั้ม หรือเพลงที่คุณชอบ จำเป็นต้องมีข้อมูลรับรองเมื่อดาวน์โหลดเพลย์ลิสต์ส่วนตัวหรือเพลงที่ชอบ
สร้างแอปพลิเคชัน Spotify ที่ https://developer.spotify.com/dashboard/applications ด้วย URL การเปลี่ยนเส้นทาง http://localhost:48721/callback รับรหัสแอปพลิเคชันและข้อมูลลับจากแดชบอร์ดแอปพลิเคชันที่สร้างขึ้น
เริ่มต้น sldl ด้วยข้อมูลประจำตัวที่ได้รับและการดำเนินการที่ได้รับอนุญาตเพื่อทริกเกอร์ขั้นตอนการเข้าสู่ระบบแอพ Spotify:
sldl spotify-likes --spotify-id 123456 --spotify-secret 123456 -n 1 --print-tracks
sldl จะพยายามเปิดเบราว์เซอร์โดยอัตโนมัติ แต่จะถอยกลับไปบันทึก URL ขั้นตอนการเข้าสู่ระบบเพื่อส่งออก หลังจากขั้นตอนการเข้าสู่ระบบเสร็จสมบูรณ์ sldl จะส่งเอาต์พุตโทเค็นและโทเค็นการรีเฟรช และเรียกใช้คำสั่งปัจจุบันให้เสร็จสิ้น
หากต้องการข้ามการกำหนดขั้นตอนการเข้าสู่ระบบทุกครั้งที่ใช้ sldl โทเค็นและโทเค็นการรีเฟรชสามารถระบุให้กับ sldl ได้ (คำแนะนำ: เก็บข้อมูลนี้ไว้ในไฟล์กำหนดค่าเพื่อทำให้คำสั่งละเอียดน้อยลง):
sldl spotify-likes --spotify-id 123456 --spotify-secret 123456 --spotify-refresh 123456 --spotify-token 123456 -n 1 --pt
การเข้าถึง Spotify-Token ใช้ได้เพียง 1 ชั่วโมงเท่านั้น Spotify-refresh จะช่วยให้ sldl ต่ออายุการเข้าถึงทุกครั้งที่มีการเรียกใช้ (และสามารถใช้งานได้โดยไม่ต้องรวม Spotify-token)
URL ของ bandcamp: ดาวน์โหลดเพลงเดียว อัลบั้ม หรือผลงานทั้งหมดของศิลปิน แยกชื่อศิลปิน ชื่ออัลบั้ม และชุด --album-track-count="n+" โดยที่ n คือจำนวนแทร็กที่มองเห็นได้บนหน้า bandcamp
ชื่อของเพลง อัลบั้ม หรือศิลปินที่จะค้นหา: อาจเป็นสตริงการค้นหาทั่วไปใดก็ได้ (เช่น สิ่งที่คุณป้อนลงในแถบค้นหา Soulseek) หรือรายการคุณสมบัติที่คั่นด้วยเครื่องหมายจุลภาค เช่น 'title=Song Name, artist= ชื่อศิลปิน ยาว=215'.
คุณสมบัติต่อไปนี้ได้รับการยอมรับ:
title
artist
album
length (in seconds)
artist-maybe-wrong
album-track-count
ข้อมูลตัวอย่างและการตีความ:
Input String | Artist | Title | Album | Length
---------------------------------------------------------------------------------
'Foo Bar' (without any hyphens) | | Foo Bar | |
'Foo - Bar' | Foo | Bar | |
'Foo - Bar' (with --album enabled) | Foo | | Bar |
'Artist - Title, length=42' | Artist | Title | | 42
'artist=AR, title=T, album=AL' | AR | T | AL |
เส้นทางไปยังไฟล์ข้อความโดยแต่ละบรรทัดมีรูปแบบดังต่อไปนี้:
"some input" "conditions" "preferred conditions"
เช่น:
"artist=Artist, album=Album" "format=mp3; br > 128" "br >= 320"
โดยที่ "some input" คือประเภทอินพุตใดๆ ข้างต้น สามารถละเว้นเครื่องหมายคำพูดได้หากฟิลด์ไม่มีการเว้นวรรค ฟิลด์เงื่อนไขจะถูกเพิ่มที่ด้านบนของเงื่อนไขที่กำหนดค่าไว้ และยังสามารถละเว้นได้ อินพุตรายการจะต้องเปิดใช้งานด้วยตนเองด้วย --input-type=list
นอกจากนี้ยังยอมรับชวเลขสำหรับการดาวน์โหลดอัลบั้ม: a:"Artist - Album"
โปรดทราบว่า a:
ต้องปรากฏนอกเครื่องหมายคำพูด
ค่าเริ่มต้น ดาวน์โหลดไฟล์เดียวสำหรับทุกรายการอินพุต
sldl จะค้นหาอัลบั้มและดาวน์โหลดทั้งโฟลเดอร์รวมถึงไฟล์ที่ไม่ใช่เสียง เปิดใช้งานเมื่ออินพุตเป็นลิงก์ไปยังอัลบั้ม Spotify หรือ bandcamp เมื่อสตริงอินพุตหรือแถว CSV ไม่มีชื่อแทร็ก หรือเมื่อเปิดใช้งาน -a/--album
ด้วย -g/--aggregate sldl จะทำการค้นหาอินพุตทั่วไป จากนั้นพยายามจัดกลุ่มผลลัพธ์ออกเป็นเพลงที่แตกต่างกันและดาวน์โหลดหนึ่งเพลงในแต่ละประเภท โดยเริ่มจากเพลงที่แชร์โดยผู้ใช้ส่วนใหญ่
โปรดทราบว่า --min-shares-aggregate คือ 2 โดยค่าเริ่มต้น ซึ่งหมายความว่าเพลงที่แชร์โดยผู้ใช้เพียงรายเดียวจะถูกละเว้น
เปิดใช้งานเมื่อเปิดใช้งานทั้ง --album และ --aggregate sldl จะจัดกลุ่มการแชร์และดาวน์โหลดหนึ่งในอัลบั้มที่แตกต่างกัน โดยเริ่มจากอัลบั้มที่แชร์โดยผู้ใช้มากที่สุด ขอแนะนำให้จับคู่สิ่งนี้กับ --interactive
โปรดทราบว่า --min-shares-aggregate คือ 2 โดยค่าเริ่มต้น ซึ่งหมายความว่าอัลบั้มที่แชร์โดยผู้ใช้เพียงคนเดียวจะถูกละเว้น
คำค้นหาถูกกำหนดดังนี้:
เซิร์ฟเวอร์จะแบนคุณเป็นเวลา 30 นาที หากมีการค้นหามากเกินไปในช่วงเวลาสั้นๆ โปรแกรมมีตัวจำกัดการค้นหาซึ่งสามารถปรับได้ด้วย --searches-per-time และ --searches-renew-time (เมื่อถึงขีดจำกัด สถานะของการดาวน์โหลดจะเป็น "กำลังรอ") ตามค่าเริ่มต้น มีการกำหนดค่าให้อนุญาตการค้นหาสูงสุด 34 ครั้งทุกๆ 220 วินาที ค่าเริ่มต้นถูกกำหนดโดยการทดลอง ดังนั้นค่าเหล่านี้จึงอาจไม่ถูกต้อง
ตัวเลือกต่อไปนี้จะทำให้ทำงานเร็วขึ้น แต่อาจลดคุณภาพผลการค้นหาหรือทำให้เกิดความไม่เสถียร:
ไฟล์ที่ไม่ตรงตามเงื่อนไขที่กำหนดจะไม่ถูกดาวน์โหลด ไฟล์ที่ตรงตามเงื่อนไขที่กำหนดไว้จะเป็นที่ต้องการ การตั้งค่า --pref-format "flac,wav" จะทำให้ดาวน์โหลดไฟล์ lossless หากมี และดาวน์โหลดเฉพาะไฟล์ที่สูญเสียหากไม่มีสิ่งอื่นใด
ไม่มีเงื่อนไขบังคับเริ่มต้น เงื่อนไขที่ต้องการเริ่มต้นคือ:
pref-format = mp3
pref-length-tol = 3
pref-min-bitrate = 200
pref-max-bitrate = 2500
pref-max-samplerate = 48000
pref-strict-title = true
pref-strict-album = true
pref-accept-no-length = false
sldl จะเลือกใช้ไฟล์ MP3 ที่มีบิตเรตระหว่าง 200 ถึง 2500 kbps และมีความยาวแตกต่างจากความยาวที่ให้มาไม่เกิน 3 วินาที นอกจากนี้ยังจะเลือกไฟล์ที่มีเส้นทางที่มีชื่อและอัลบั้มที่ให้มา (ไม่สนใจตัวพิมพ์เล็กและล้อมรอบด้วยอักขระขอบเขต) และมีความยาวที่ไม่ใช่ค่าว่าง ไม่แนะนำให้เปลี่ยนเงื่อนไขที่ต้องการสามรายการสุดท้าย
โปรดทราบว่าไฟล์ที่ตรงตามเงื่อนไขเซ็ตย่อยของเงื่อนไขที่ต้องการจะยังคงเป็นที่ต้องการมากกว่าไฟล์ที่ไม่ตรงตามเงื่อนไขใดๆ แต่บางเงื่อนไขจะมีความสำคัญมากกว่าเงื่อนไขอื่นๆ ตัวอย่างเช่น ไฟล์ที่ตรงตามเงื่อนไขชื่อที่เข้มงวดเท่านั้น (หากเปิดใช้งาน) จะถูกเลือกใช้มากกว่าไฟล์ที่ตรงตามเงื่อนไขการจัดรูปแบบเท่านั้น รันด้วย --print "results-full" เพื่อแสดงตรรกะการเรียงลำดับ
เงื่อนไขยังสามารถระบุเป็นสตริงคั่นด้วยอัฒภาคด้วย --cond และ --pref เช่น --cond "br >= 320; format = mp3,ogg; sr < 96000"
ตัวเลือก --strict-title, --strict-artist และ --strict-album จะกรองไฟล์ใดๆ ที่ไม่มีชื่อ/ศิลปิน/อัลบั้มในชื่อไฟล์ (ไม่สนใจตัวพิมพ์เล็กและใหญ่ ล้อมรอบด้วยตัวอักษรขอบเขต)
อีกวิธีหนึ่งในการป้องกันการดาวน์โหลดที่ผิดพลาดคือการตั้งค่า --length-tol เป็น 3 หรือน้อยกว่า เพื่อให้ไม่สนใจเพลงใดๆ ที่แตกต่างจากอินพุตมากกว่า 3 วินาที อย่างไรก็ตาม ตัวเลือกทั้ง 4 ตัวเลือกได้เปิดใช้งานเป็นเงื่อนไข 'ที่ต้องการ' ตามค่าเริ่มต้นแล้ว ซึ่งหมายความว่าไฟล์ดังกล่าวจะถูกดาวน์โหลดเป็นทางเลือกสุดท้ายเท่านั้น ดังนั้นจึงขอแนะนำให้เปิดใช้งานหากคุณต้องการลดการดาวน์โหลดที่ผิดพลาดให้เหลือน้อยที่สุด หรือในกรณีพิเศษ เช่น แทร็กหรืออัลบั้มที่มีชื่อเพียงหนึ่งหรือสองตัวอักขระ
ข้อมูลบางอย่างอาจไม่พร้อมใช้งาน ขึ้นอยู่กับไคลเอนต์ที่เพียร์ใช้ ตัวอย่างเช่น ไคลเอนต์ Soulseek มาตรฐานไม่แชร์บิตเรตของไฟล์ หาก (เช่น) --min-bitrate ถูกตั้งค่าไว้ sldl จะยังคงยอมรับไฟล์ใดๆ ที่มีบิตเรตที่ไม่รู้จัก คุณสามารถกำหนดค่าให้ปฏิเสธไฟล์ทั้งหมดที่มีคุณสมบัติที่เลือกอย่างน้อยหนึ่งรายการเป็นโมฆะ (ไม่ทราบ) โดยเปิดใช้งาน --strict-conditions
ด้วยเหตุนี้ หากตั้งค่า --min-bitrate ไว้ด้วย ไฟล์ใดๆ ที่แชร์โดยผู้ใช้ที่มีไคลเอ็นต์เริ่มต้นจะถูกละเว้น โปรดทราบว่าเงื่อนไขที่ต้องการเริ่มต้นจะส่งผลต่อการจัดอันดับด้วยตัวเลือกนี้อยู่แล้ว เนื่องจากการตรวจสอบบิตเรตและแซมเปิลเรต
ตัวแปรที่อยู่ใน {} จะถูกแทนที่ด้วยค่าแท็กไฟล์ที่เกี่ยวข้อง รูปแบบของชื่อรองรับไดเร็กทอรีย่อยและนิพจน์เงื่อนไข เช่น {tag1|tag2} - หาก tag1 เป็นโมฆะ ให้ใช้ tag2 ตัวอักษรสตริงที่อยู่ในวงเล็บจะถูกละเว้นในการตรวจสอบค่าว่าง
artist First artist (from the file tags)
sartist Source artist (as on CSV/Spotify/YouTube/etc)
artists Artists, joined with '&'
albumartist First album artist
albumartists Album artists, joined with '&'
title Track title
stitle Source track title
album Album name
salbum Source album name
year Track year or date
track Track number
disc Disc number
filename Soulseek filename without extension
foldername Soulseek folder name
extractor Name of the extractor used (CSV/Spotify/YouTube/etc)
default-folder Default sldl folder name (usually the playlist name)
sldl จะค้นหาไฟล์ชื่อ sldl.conf ในตำแหน่งต่อไปนี้:
~/AppData/Roaming/sldl/sldl.conf
~/.config/sldl/sldl.conf
รวมถึงในไดเร็กทอรีของไฟล์ปฏิบัติการด้วย
ตัวอย่างไฟล์กำหนดค่า:
username = your-username
password = your-password
pref-format = flac
fast-search = true
บรรทัดที่ขึ้นต้นด้วยแฮชแท็ก (#) จะถูกละเว้น ตัวหนอนในพาธจะถูกขยายเป็นไดเร็กทอรีผู้ใช้
รองรับโปรไฟล์:
[lossless]
pref-format = flac,wav
หากต้องการเปิดใช้งานโปรไฟล์ด้านบน ให้รัน --profile "lossless" หากต้องการแสดงรายการโปรไฟล์ที่มีอยู่ทั้งหมด ให้รัน --profile "help"
โปรไฟล์สามารถเปิดใช้งานได้โดยอัตโนมัติตามเงื่อนไขง่ายๆ บางประการ:
[no-stale]
profile-cond = interactive && download-mode == "album"
max-stale-time = 999999
# album downloads will never be automatically cancelled in interactive mode
[youtube]
profile-cond = input-type == "youtube"
path = ~/downloads/sldl-youtube
# download to another location for youtube
โอเปอเรเตอร์ต่อไปนี้ได้รับการสนับสนุนสำหรับการใช้งานใน profile-cond: &&, ||, ==, !=, !{bool}
มีตัวแปรต่อไปนี้:
input-type ("youtube"|"csv"|"string"|"bandcamp"|"spotify")
download-mode ("normal"|"aggregate"|"album"|"album-aggregate")
interactive (bool)
ดาวน์โหลดแทร็กจากไฟล์ CSV:
sldl test.csv
ดาวน์โหลด Spotify ไลค์:
sldl spotify-likes
ดาวน์โหลดอัลบั้มแบบโต้ตอบ:
sldl "Some Album" -a -t
ดาวน์โหลดเพลงเฉพาะตามชื่อ โดยเลือกแบบไม่สูญเสียข้อมูล:
sldl "MC MENTAL @ HIS BEST, length=242" --pref-format "flac,wav"
ดาวน์โหลดอัลบั้มของทุกเพลงในเพลย์ลิสต์ Spotify:
sldl https://spotify/playlist/id -a
ดึงชื่อวิดีโอที่ถูกลบ จากนั้นดาวน์โหลดจากเพลย์ลิสต์ YouTube พร้อมทางเลือก yt-dlp:
sldl https://www.youtube.com/playlist/id --get-deleted --yt-dlp
พิมพ์เพลงทั้งหมดโดยศิลปินที่ไม่ได้อยู่ในห้องสมุดของคุณ:
sldl "artist=MC MENTAL" --aggregate --skip-music-dir "path/to/music" --print results-full
ดาวน์โหลดอัลบั้มทั้งหมดโดยศิลปินที่พบใน Soulseek:
sldl "artist=MC MENTAL" -a -g -t
สร้างไฟล์ชื่อ wishlist.txt
และเพิ่มบางรายการตามรายละเอียดใน Input types: List:
" Artist - My Favorite Song "
a: " Artist - Some Album, album-track-count=5 " " format=flac "
เพิ่มโปรไฟล์ใน sldl.conf
ของคุณ :
[wishlist]
input = ~/sldl/wishlist.txt
input-type = list
index-path = ~/sldl/wishlist-index.sldl
สิ่งนี้จะสร้างไฟล์ดัชนีส่วนกลาง wishlist-index.sldl
ซึ่งจะถูกสแกนทุกครั้งที่เรียกใช้ sldl เพื่อข้ามรายการสิ่งที่อยากได้ที่ดาวน์โหลดไปแล้ว หากคุณต้องการค้นหาต่อไปจนกว่าจะดาวน์โหลดเวอร์ชันที่ตรงตามเงื่อนไขที่ต้องการ ให้เพิ่ม skip-check-pref-cond = true
(โปรดทราบว่าการดำเนินการนี้ต้องการให้ไฟล์ยังคงอยู่ในจุดเดิมหลังจากดาวน์โหลดแล้ว)
สุดท้าย ให้ตั้งค่างาน cron (หรืองานที่กำหนดเวลาไว้บน windows) เพื่อรัน sldl เป็นระยะด้วยตัวเลือกต่อไปนี้:
sldl --profile wishlist
chmod +x publish.sh && sh publish.sh
สำหรับ Intel Mac ให้ยกเลิกหมายเหตุ x64 และแสดงความคิดเห็นส่วน arm64 ใน publish.sh--no-progress
ในกรณีที่เกิดปัญหา คุณสามารถสร้างคอนเทนเนอร์นักเทียบท่าสำหรับการรัน sldl
ได้จากที่เก็บนี้ รูปภาพรองรับ linux x86/ARM
วิธีสร้างและเริ่มต้นคอนเทนเนอร์:
clone https://github.com/fiso64/slsk-batchdl
cd slsk-batchdl
docker compose up -d
exec
ลงในคอนเทนเนอร์เพื่อเริ่มใช้ sldl
:
docker compose exec sldl sh
sldl --help
สแต็กการเขียนจะเมานต์สองไดเร็กทอรีสัมพันธ์กับตำแหน่งที่ docker-compose.yml
อยู่ ซึ่งสามารถใช้สำหรับการจัดการไฟล์:
/config
(ที่ . ./config
บนโฮสต์) - ใส่การกำหนดค่า sldl.conf
ของคุณในไดเร็กทอรีนี้ จากนั้นใช้ sldl -c /config ...
เพื่อใช้การกำหนดค่าของคุณในคอนเทนเนอร์/data
(ที่ ./data
บนโฮสต์) - ใช้เป็นไดเร็กทอรีดาวน์โหลด IE sldl -p /data ...
หากคุณใช้งาน Docker บน โฮสต์ Linux คุณควรระบุสิทธิ์ user:group
ของผู้ใช้ที่เป็นเจ้าของ การกำหนดค่าและไดเร็กทอรีข้อมูล บนโฮสต์ เพื่อหลีกเลี่ยงปัญหาสิทธิ์อนุญาตไฟล์นักเทียบท่า สิ่งเหล่านี้สามารถระบุได้โดยใช้ตัวแปรสภาพแวดล้อม PUID และ PGID
หากต้องการรับ UID และ GID สำหรับผู้ใช้ปัจจุบันให้รันคำสั่งเหล่านี้จากเทอร์มินัล:
id -u
- พิมพ์ UIDid -g
-- พิมพ์ GID แทนที่สิ่งเหล่านี้ด้วยตัวแปรที่เกี่ยวข้อง ( PUID
PGID
) ใน docker-compose.yml
คำสั่ง sldl
หนึ่งคำสั่งขึ้นไปสามารถรันตามกำหนดเวลาได้โดยใช้ cron ที่สร้างไว้ในคอนเทนเนอร์
หากต้องการสร้างกำหนดเวลาให้สร้างไฟล์ใหม่บนโฮสต์ ./config/crontabs/abc
และใช้กับไวยากรณ์ crontab มาตรฐาน
อย่าลืมรีสตาร์ทคอนเทนเนอร์หลังจากทำการเปลี่ยนแปลงไฟล์ cron
ตัวอย่าง => เรียกใช้ sldl
ทุกวันอาทิตย์เวลา 01.00 น. ค้นหาเพลงที่หายไปจากเพลย์ลิสต์ Spotify ที่ระบุ
# min hour day month weekday command
0 1 * * 0 sldl https://open.spotify.com/playlist/6sf1WR5grXGJ6dET -c /config -p /data --skip-existing --m3u-path /data/index.sldl"
crontab.guru สามารถใช้เพื่อช่วยในการกำหนดนิพจน์ได้