Skip to content

Extract upload date for 1337x results#16

Open
anandghegde wants to merge 1 commit into
baairon:mainfrom
anandghegde:feat/1337x-date-added
Open

Extract upload date for 1337x results#16
anandghegde wants to merge 1 commit into
baairon:mainfrom
anandghegde:feat/1337x-date-added

Conversation

@anandghegde

Copy link
Copy Markdown

Summary

1337x search results were the only source missing the added (upload date) field — every other source populates it, and the UI already renders an "Added" column / detail row when the data is present.

This parses the Date uploaded field from the 1337x torrent detail page and populates TorrentResult.added. The detail page is already fetched to resolve the magnet link, so this adds no extra network requests.

Details

  • New parseUploadDate() parses 1337x's Mon. Dayth 'YY format (e.g. Jun. 26th '26) into a UTC unix timestamp (seconds), matching the convention used by other sources.
  • detailMagnetdetailInfo, now returning both the magnet and the parsed date from the single detail-page fetch.

Testing

  • Unit tests (src/sources/x1337.test.ts): date format, ordinal variants (1st/2nd/3rd/22nd), single-digit days, and missing/unparseable cases.
  • tsc --noEmit: clean.
  • Full suite: 59/59 pass.
  • Live integration: ran the real x1337Movies.search("matrix") against live mirrors — 8/8 results returned correctly-parsed upload dates.

Parse the "Date uploaded" field from 1337x torrent detail pages and
populate TorrentResult.added, matching the other sources. The detail
page is already fetched to resolve the magnet, so no extra requests
are made.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant