Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG] tv_grab_zz_sdjson is outdated (XMLTV 1.3.0) and causes missing episode numbers

Đang mở
#280 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker
Lĩnh vực
build-system, devops

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra định nghĩa build của Docker image để xem XMLTV 1.3.0 và /usr/bin/tv_grab_zz_sdjson được cài đặt như thế nào. Kiểm tra phiên bản mà grabber báo cáo, sau đó chạy nó với cấu hình Schedules Direct UK được mô tả trong issue. Công việc được xem là hoàn tất khi image chứa grabber đã được cập nhật và XMLTV được tạo ra có số mùa và số tập như Frasier S06E23.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

The LinuxServer Tvheadend Docker image currently ships XMLTV 1.3.0, including tv_grab_zz_sdjson 1.3.0.

When using the Schedules Direct SD-JSON grabber with UK listings, episode/season information can be missing from the generated XMLTV data.

For example, Schedules Direct provides the following metadata for Frasier:

programID: EP012597200187

metadata:
  Gracenote:
    season: 6
    episode: 23

However, the 1.3.0 version of tv_grab_zz_sdjson does not reliably process this metadata because it iterates over the metadata hash without resetting Perl's hash iterator.

The relevant code in the 1.3.0 version is:

metadata: for my $metadata (@{$details->{'metadata'}}) {
    while(my ($key, $value) = each %{$metadata}) {

The current upstream version contains an additional:

keys %{$metadata};

before the while loop, which fixes the problem.

I manually replaced /usr/bin/tv_grab_zz_sdjson in the running container with the current upstream version and ran the grabber through Tvheadend.

The resulting EPG now correctly shows season/episode information, including:

Frasier - Shutout in Seattle - S06E23
Frasier - Shutout in Seattle - S06E24
Frasier - Momma Mia - S07E01
Frasier - Father of the Bride - S07E02
Frasier - Radio Wars - S07E03

The corrected episode numbers are shown on both Channel 4 and Channel 4 HD.

Expected Behavior

The Docker image should ship a current version of XMLTV/tv_grab_zz_sdjson so that the Schedules Direct grabber correctly processes the season and episode metadata provided by the SD-JSON API.

In particular, tv_grab_zz_sdjson should include the upstream fix present in XMLTV 1.4.0 and correctly generate the XMLTV episode-num elements.

For example:

<episode-num system="xmltv_ns">5.22.0/2</episode-num>
<episode-num system="dd_progid">EP012597200187</episode-num>

for Frasier S06E23.

Steps To Reproduce
  1. Create/run a LinuxServer Tvheadend container using:

    lscr.io/linuxserver/tvheadend:latest
    
  2. Configure tv_grab_zz_sdjson as the XMLTV EPG grabber.

  3. Configure the grabber to use a Schedules Direct account and a UK lineup.

  4. Check the version inside the container:

    docker exec tvheadend /usr/bin/tv_grab_zz_sdjson --version
    

    The current image reports:

    XMLTV module version 1.3.0
    This is tv_grab_zz_sdjson version 1.3.0
    
  5. Run the XMLTV grabber and import the resulting guide into Tvheadend.

  6. Check programmes which have Gracenote season/episode metadata.

  7. Episode/season information is missing or incorrect in the resulting EPG.

  8. Replace /usr/bin/tv_grab_zz_sdjson in the container with the current upstream XMLTV version and run the same grab.

  9. The same programmes now correctly show their season and episode numbers in Tvheadend.

For example, Frasier episodes are displayed as S06E23, S06E24, S07E01, S07E02 and S07E03.

Environment
OS: Unraid 7.3.1

CPU architecture: x86-64

Docker image:
lscr.io/linuxserver/tvheadend:latest

LinuxServer image build:
fcd987f0-ls285
Build date: 2026-07-18T16:31:51+00:00

XMLTV version:
1.3.0

tv_grab_zz_sdjson version:
1.3.0

EPG source:
Schedules Direct SD-JSON

Affected channels:
Channel 4
Channel 4 HD
CPU architecture

x86-64

Docker creation
Docker created via Unraid's Apps function
Container logs
The issue does not produce an error in the Tvheadend container log.

The relevant diagnostic output is:

    $ docker exec tvheadend /usr/bin/tv_grab_zz_sdjson --version
    XMLTV module version 1.3.0
    This is tv_grab_zz_sdjson version 1.3.0

The grabber completes successfully and produces XMLTV data; the problem is that episode/season information is missing from some programmes.

After replacing /usr/bin/tv_grab_zz_sdjson with the current upstream version, the same grab completes successfully and Tvheadend displays the correct season/episode information.
Ngôn ngữ chính
Dockerfile
Star
214
Fork
93
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của linuxserver/docker-tvheadend

Tất cả issue của linuxserver/docker-tvheadend

Issue tương tự

Thêm issue về Build System

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.