أداة تنزيل تلقائية لـ 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. إذا كان الخيار يحتوي على كلمة "max"، فيجب أن يكون الحرف m كبيرًا. يجب التعامل مع 'معدل البت' و'sameplerate' و'عمق البت' على أنها كلمتين منفصلتين، على سبيل المثال --Mbr لـ --max-bitrate.
يمكن تعطيل العلامات بشكل صريح عن طريق تعيينها على "خطأ"، على سبيل المثال "--interactive false"
عادةً ما يتم تحديد نوع الإدخال تلقائيًا. لفرض نوع إدخال محدد، قم بتعيين --input-type [spotify|youtube|csv|string|bandcamp|list]. تتوفر أنواع الإدخال التالية:
المسار إلى ملف CSV محلي: استخدم ملف CSV يحتوي على معلومات المسار للأغاني المراد تنزيلها. يجب أن تكون أسماء الأعمدة هي الفنان، والعنوان، والألبوم، والطول، على الرغم من أنه يتم عادةً اكتشاف الأسماء البديلة أيضًا. مطلوب فقط عمود العنوان أو الألبوم، ولكن المعلومات الإضافية قد تؤدي إلى تحسين ترتيب نتائج البحث. سيتم التعامل مع كل صف لا يحتوي على نص عمود عنوان على أنه تنزيل ألبوم.
عنوان URL لقائمة التشغيل: تنزيل الأغاني من قائمة تشغيل على YouTube. لا تقوم الطريقة الافتراضية لاسترداد قوائم التشغيل دائمًا بإرجاع جميع مقاطع الفيديو، خاصة تلك غير المتوفرة. للحصول على جميع عناوين مقاطع الفيديو، يمكنك استخدام واجهة برمجة التطبيقات الرسمية من خلال توفير مفتاح مع --youtube-key. احصل عليه هنا https://console.cloud.google.com. أنشئ مشروعًا جديدًا، وانقر على "تمكين واجهة برمجة التطبيقات" (Enable Api) وابحث عن "بيانات youtube"، ثم اتبع المطالبات.
عنوان url لقائمة التشغيل/الألبوم أو "إعجابات Spotify": قم بتنزيل قائمة تشغيل أو ألبوم أو أغانيك المفضلة على 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 صالح لمدة ساعة واحدة فقط. سيعمل تحديث Spotify على تمكين sldl من تجديد الوصول في كل مرة يتم تشغيله (ويمكن استخدامه دون تضمين رمز Spotify)
عنوان 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"
حيث يشير "بعض الإدخال" إلى أي من أنواع الإدخال المذكورة أعلاه. يمكن حذف علامات الاقتباس إذا كان الحقل لا يحتوي على مسافات. تتم إضافة حقول الشرط أعلى الشروط التي تم تكوينها ويمكن حذفها أيضًا. يجب تنشيط إدخال القائمة يدويًا باستخدام --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 دقيقة إذا تم إجراء عدد كبير جدًا من عمليات البحث خلال فترة زمنية قصيرة. يحتوي البرنامج على محدد بحث يمكن تعديله باستخدام --عمليات البحث في كل مرة و-وقت تجديد البحث (عند الوصول إلى الحد الأقصى، ستكون حالة التنزيلات "في انتظار"). بشكل افتراضي، تم تكوينه للسماح بما يصل إلى 34 عملية بحث كل 220 ثانية. تم تحديد القيم الافتراضية من خلال التجربة، لذا قد تكون غير صحيحة.
ستجعل الخيارات التالية عملية البحث أسرع، ولكنها قد تقلل من جودة نتائج البحث أو تسبب عدم الاستقرار:
لن يتم تنزيل الملفات التي لا تستوفي الشروط المطلوبة. سيتم تفضيل الملفات التي تستوفي الشروط المسبقة؛ سيؤدي الإعداد --pref-format "flac,wav" إلى تنزيل الملفات غير المفقودة إذا كانت متوفرة، وتنزيل الملفات المفقودة فقط إذا لم يكن هناك شيء آخر.
لا توجد شروط افتراضية مطلوبة. الشروط المفضلة الافتراضية هي:
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 كيلوبت في الثانية، والتي يختلف طولها عن الطول المقدم بما لا يزيد عن 3 ثوانٍ. سيفضل أيضًا الملفات التي تحتوي مساراتها على العنوان والألبوم المقدمين (مع تجاهل حالة الأحرف، والمحددة بأحرف حدودية) والتي ليس طولها فارغًا. لا يوصى بتغيير الشروط الثلاثة الأخيرة المفضلة.
لاحظ أن الملفات التي تستوفي مجموعة فرعية من الشروط المفضلة ستظل مفضلة على الملفات التي لا تستوفي أي شرط، ولكن بعض الشروط لها الأسبقية على غيرها. على سبيل المثال، الملف الذي يلبي فقط العنوان الصارم (في حالة تمكينه) سيتم تفضيله دائمًا على الملف الذي يلبي شرط التنسيق فقط. قم بتشغيل --print "results-full" للكشف عن منطق الفرز.
يمكن أيضًا توفير الشروط كسلسلة مفصولة بفواصل منقوطة مع --cond و --pref، على سبيل المثال --cond "br >= 320; format = mp3,ogg; sr < 96000".
ستقوم الخيارات --strict-title و --strict-artist و --strict-album بتصفية أي ملف لا يحتوي على العنوان/الفنان/الألبوم في اسم الملف (تجاهل حالة الأحرف، محاطًا بأحرف حدودية).
هناك طريقة أخرى لمنع التنزيلات الخاطئة وهي ضبط --length-tol على 3 أو أقل لجعله يتجاهل أي أغانٍ تختلف عن الإدخال بأكثر من 3 ثوانٍ. ومع ذلك، يتم تمكين جميع الخيارات الأربعة بالفعل كشروط "مفضلة" افتراضيًا، مما يعني أنه لن يتم تنزيل هذه الملفات إلا كملاذ أخير على أي حال. ومن ثم، يوصى بتمكينها فقط إذا كنت بحاجة إلى تقليل التنزيلات الزائفة قدر الإمكان، أو في حالات خاصة مثل المقاطع الصوتية أو الألبومات التي يتكون اسمها من حرف واحد أو حرفين فقط.
قد تكون بعض المعلومات غير متوفرة اعتمادًا على العميل الذي يستخدمه النظير. على سبيل المثال، لا يشارك عميل 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
العوامل التالية مدعومة للاستخدام في ملف التعريف: &&، ||، ==، !=، !{bool}.
المتغيرات التالية متوفرة:
input-type ("youtube"|"csv"|"string"|"bandcamp"|"spotify")
download-mode ("normal"|"aggregate"|"album"|"album-aggregate")
interactive (bool)
تنزيل المسارات من ملف CSV:
sldl test.csv
تنزيل سبوتيفي يحب:
sldl spotify-likes
تحميل الألبوم التفاعلي:
sldl "Some Album" -a -t
قم بتنزيل أغنية معينة بالاسم، مفضلاً عدم فقدانها:
sldl "MC MENTAL @ HIS BEST, length=242" --pref-format "flac,wav"
قم بتنزيل ألبوم كل أغنية في قائمة تشغيل سبوتيفي:
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
، وأضف بعض العناصر كما هو مفصل في أنواع الإدخال: القائمة:
" 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
on host) - ضع تكوين sldl.conf
في هذا الدليل ثم استخدم sldl -c /config ...
لاستخدام التكوين الخاص بك في الحاوية/data
(في ./data
on host) - استخدم كدليل التنزيل 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
كل يوم أحد الساعة 1 صباحًا، وابحث عن المقاطع الصوتية المفقودة من قائمة تشغيل 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 للمساعدة في تعبير الجدولة.