当前位置: 首页 > Skill >

internet-radio-music-db

internet-radio-music-db

1.0.0 2026.11.27 浏览:859
获取Skill文件查看使用说明
作者:江知许可证:
本文目录展开

Internet Radio Music DB — Music Stream Database

Skill for collecting and managing an internet radio stream database.

🌐 WebUI Plugin (Recommended)

The easiest way to manage both playback and the stream database is the internet-radio-music-webui plugin.

The plugin provides an embeddable web panel with:

  • Playback controls: Play, Stop, Next, Previous, Resume (auto-resume after stop)
  • Mood-based genre selector: Pick from 20+ genres via dropdown
  • Stream database management: View stats (genres, languages, efficiency), list streams by genre, check availability, rebuild database — all from the browser
  • WebChat integration: Embed directly in webchat with [embed url="http://127.0.0.1:18789/mplayer"]

Install the plugin:

openclaw plugins install "clawhub:internet-radio-music-webui"
openclaw gateway restart

The plugin auto-detects the database scripts (cli.py, show_stats.py, build_db.py, check_availability.py) from this skill. Both this skill AND the internet-radio-music-player skill must be installed for the plugin to work.

Data source

https://www.internet-radio.com/ — the largest internet radio station catalog.

How database population works

  1. Parallel station collection — 10 threads simultaneously (one per genre), parsing up to MAX_PAGES pages per genre (/stations/{genre}/), stopping on empty page. With the default MAX_PAGES = 10 this yields ~2700+ stations across 29 genres (~150+ after dedup and filtering). Adjust MAX_PAGES to control search depth.
  2. Playlist extraction — extracts .pls playlist link from each station
  3. URL resolution — forms a direct stream URL from the playlist (http://server:port/stream)
  4. Adaptive speed check — parallel check of all new streams (60 workers), 4-second download. Threshold is per-stream based on bitrate
  5. Saving — data saved to state.json

Adaptive speed threshold

Each stream has a bitrate (kbps) stored in the database. The minimum speed threshold is:

threshold_KBps = max(5.0, min((bitrate_kbps / 8) * 0.75, 50.0))
Stream bitrate Nominal speed Threshold (75%) Effective min
320 kbps 40 KB/s 30 KB/s 30 KB/s
256 kbps 32 KB/s 24 KB/s 24 KB/s
192 kbps 24 KB/s 18 KB/s 18 KB/s
128 kbps 16 KB/s 12 KB/s 12 KB/s
64 kbps 8 KB/s 6 KB/s 6 KB/s
32 kbps 4 KB/s 3 KB/s 5 KB/s (floor)
unknown — — 5 KB/s (floor)

This means a 64k stream only needs 6 KB/s to pass, while a 320k stream needs 30 KB/s.

Availability checking

  • Parallel check of all streams (120 workers)
  • Uses the same adaptive threshold (shared check_stream.py module)
  • Streams with failed_checks >= 3 are automatically removed
  • Extra fields stored: check_speed_bps, check_threshold_kbs, check_bytes_received

Stream record format

{
  "url": "http://server:8000/stream",
  "name": "Station Name",
  "genre": "rock",
  "language": "en",
  "bitrate": 128,
  "available": true,
  "source": "internet-radio.com",
  "added_at": "2026-05-23T18:00:00+00:00",
  "last_checked": "2026-05-23T19:00:00+00:00",
  "last_speed_bps": 12288,
  "failed_checks": 0
}

Files

File Purpose
scripts/check_stream.py Shared module — adaptive speed check logic
scripts/build_db.py Database population (imports from check_stream.py)
scripts/check_availability.py Availability check (imports from check_stream.py)
scripts/cli.py Stream management (list/add/remove/export)
scripts/show_stats.py Statistics (genres, languages, speed, efficiency)
state.json Stream database (not included in publication)

Commands

# Populate database (parallel, 29 genres, ~1000+ streams)
python ~/.openclaw/skills/internet-radio-music-db/scripts/build_db.py

# Check availability (120 workers, adaptive thresholds)
python ~/.openclaw/skills/internet-radio-music-db/scripts/check_availability.py

# Full statistics
python ~/.openclaw/skills/internet-radio-music-db/scripts/show_stats.py

# Genre breakdown
python ~/.openclaw/skills/internet-radio-music-db/scripts/show_stats.py --genres

# Language distribution
python ~/.openclaw/skills/internet-radio-music-db/scripts/show_stats.py --lang

# Speed distribution
python ~/.openclaw/skills/internet-radio-music-db/scripts/show_stats.py --speed

# Top-10 fastest
python ~/.openclaw/skills/internet-radio-music-db/scripts/show_stats.py --top-speed 10

# Efficiency report (actual speed vs bitrate)
python ~/.openclaw/skills/internet-radio-music-db/scripts/show_stats.py --effective

# List streams by genre
python ~/.openclaw/skills/internet-radio-music-db/scripts/cli.py list rock

# Add/remove streams
python ~/.openclaw/skills/internet-radio-music-db/scripts/cli.py add <url> <name> <genre> [lang]
python ~/.openclaw/skills/internet-radio-music-db/scripts/cli.py remove <url>

# Export database
python ~/.openclaw/skills/internet-radio-music-db/scripts/cli.py export backup.json

Cron tasks

  • Database population — every 4 hours: 0 */4 * * *
  • Availability check — every 4h offset 30min: 30 */4 * * *
openclaw cron add --name "DB Population" --schedule "0 */4 * * *" --tz "Europe/Samara" 
  --message "Run: python ~/.openclaw/skills/internet-radio-music-db/scripts/build_db.py"

openclaw cron add --name "Availability Check" --schedule "30 */4 * * *" --tz "Europe/Samara" 
  --message "Run: python ~/.openclaw/skills/internet-radio-music-db/scripts/check_availability.py"

Features

  • Adaptive speed thresholds — each stream's minimum speed is based on its bitrate
  • Shared check_stream.py module for identical criteria in population and checking
  • Slow streams marked available: false, failed_checks counter incremented
  • Streams with failed_checks >= 3 auto-removed
  • Language detection by station name keywords
  • ~29 genres, MAX_PAGES per genre (default 10, configurable in build_db.py). Default settings yield ~150+ unique streams per cycle; increase MAX_PAGES for broader coverage
  • No duplicate URLs

Changelog

v2.6.0 (2026-05-29)

  • Added information about the internet-radio-music-webui plugin — the easiest way to manage playback and stream database
  • Plugin provides web panel with playback controls, mood selector, and DB management (stats, list, check, rebuild)
  • Both this skill and internet-radio-music-player are required for the plugin to work

v2.5.1 (2026-05-27)

  • Fixed description: renamed MAX_PAGE to MAX_PAGES for clarity
  • Updated docs: station count now correctly reflects ~150+ streams with default settings
  • Clarified MAX_PAGES is configurable in build_db.py for deeper/faster scans

v2.5.0 (2026-05-27)

  • Adaptive speed thresholds — replaced hardcoded 20 KB/s with bitrate-based formula
    • New shared module check_stream.py used by both build_db.py and check_availability.py
    • 320k stream needs 30 KB/s, 128k needs 12 KB/s, 64k needs 6 KB/s, unknown uses 5 KB/s floor
  • Efficiency report — new --effective flag shows actual vs nominal bitrate speed
  • Renamed check_stream() to probe_stream() in build_db.py
  • Updated docs with threshold table

v2.4.0 (2026-05-27)

  • Full English translation of all scripts and documentation
  • Added .clawhubignore

v2.2.0 (2026-05-27)

  • Fixed duplicate URL bug in build_db.py — added seen_urls set
  • Set MAX_PAGES = 10

v2.1.0 (2026-05-27)

  • Increased page limit from 6 to 10
  • Synchronized speed criteria between build and check scripts
  • Removed legacy scripts (check_all.py, ambient_boost.py)

v2.0.0

  • Initial release

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,040
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,033
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,021
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,021
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,019
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,016
Skill 文件
  • SKILL.md
    • Internet Radio Music DB — Music Stream Database
    • 🌐 WebUI Plugin (Recommended)
    • Data source
      • How database population works
      • Adaptive speed threshold
      • Availability checking
      • Stream record format
    • Files
    • Commands
    • Cron tasks
    • Features
    • Changelog
      • v2.6.0 (2026-05-29)
      • v2.5.1 (2026-05-27)
      • v2.5.0 (2026-05-27)
      • v2.4.0 (2026-05-27)
      • v2.2.0 (2026-05-27)
      • v2.1.0 (2026-05-27)
      • v2.0.0
  • 项目或源文件

相关 Skill

更多
Internet Radio Music Player Internet Radio Music Player 依据心情通过 Foobar2000 播放网络电台,自动从网络电台音乐库选择流派和电台,支持播放控制与历史记录。
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...