8000
Skip to content

Add library replacement recommendations for Tvheadend codebase#2032

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/review-codebase-for-libraries
Draft

Add library replacement recommendations for Tvheadend codebase#2032
Copilot wants to merge 2 commits intomasterfrom
copilot/review-codebase-for-libraries

Conversation

Copy link
Copy Markdown
Contributor
Copilot AI commented Jan 2, 2026

Comprehensive analysis identifying custom implementations in Tvheadend that could be replaced by external libraries, with migration recommendations and priority rankings.

Analysis Coverage

Analyzed 18 functional areas:

  • JSON/XML parsing (htsmsg_json.c, htsmsg_xml.c)
  • URL parsing (url.c)
  • UUID generation (uuid.c)
  • HTTP client/server (http.c, httpc.c)
  • Buffer management (htsbuf.c)
  • Message serialization (htsmsg.c, htsmsg_binary.c)
  • Cron parsing (cron.c)
  • Character encoding (intlconv.c)
  • Compression wrapper (zlib.c)

Key Recommendations

High Priority (already conditionally supported):

  • Make liburiparser mandatory — remove regex fallback
  • Make PCRE2 mandatory — better performance for EPG scraping
  • Consider zlib-ng — drop-in performance improvement

Medium Priority:

  • libcurl for outbound HTTP (EPG fetching)
  • ccronexpr for full cron expression support
  • cJSON/Jansson with htsmsg adapter layer

Keep As-Is:

  • htsmsg serialization — deeply integrated, TV-optimized
  • Custom HTTP server — specialized for HTSP streaming
  • Buffer management — tuned for streaming workloads

Deliverable

Added docs/LIBRARY_REPLACEMENT_RECOMMENDATIONS.md with:

  • Library alternatives (license, size, tradeoffs)
  • Migration effort estimates
  • Priority matrix
  • Phased action plan
Original prompt

Find potential "tasks"/functionalities in this codebase which could be replaced by libraries. Go through each and every file and make recommendations which functionality could be replaced by which library


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: Flole998 <9951871+Flole998@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown
sonarqubecloud bot commented Jan 2, 2026

Copilot AI changed the title [WIP] Identify functionalities replaceable by libraries Add library replacement recommendations for Tvheadend codebase Jan 2, 2026
Copilot AI requested a review from Flole998 January 2, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0