Appearance
IPTV
The IPTV module manages IPTV reseller operations on top of a CMSPanel-based supplier: provisioning and controlling subscriber lines, tracking the reseller's own panel accounts and sellable packages, and mirroring the Xtream streaming catalog (live channels, VOD, series) for browsing. It is used by IPTV resellers and their support staff on the operator site (mm.lubb.co.za) and by the end customer on the self-service portal (portal.moviemagic.cc), where a subscriber sees only their own lines, read-only.
What you can do
- Provision and manage IPTV lines — create, edit, and delete lines (username, password, package, connections, expiry, status) in the IPTV Lines grid, with per-line Extend, Enable, and Delete actions that call the live CMSPanel supplier.
- Pull live line data from the panel — "Sync from Panel" fetches the reseller's current lines from CMSPanel and upserts them locally by panel line ID (or username), including status, trial flag, lock state, and connection count.
- Track panel accounts — a Panel Accounts grid records the reseller's own CMSPanel login(s), credit balance, and status, independent of the subscriber lines they provision.
- Manage sellable packages — a Packages grid lists the packages a reseller can sell (name, duration in months, connection count, trial flag), refreshed on demand from the panel's paid and trial package lists.
- Browse the Xtream catalog — separate grids for Live Channels, VOD, and Series mirror the streaming server's channel/title catalog (stream IDs, categories, EPG channel mapping, ratings, release dates), each refreshable with a "Sync Catalog" action.
- Link lines to billing and customers — each line can be tied to a catalog item (for pricing) and to the owning customer, with the underlying reseller distinguished from the billed end-customer.
- Customer self-service view — subscribers see a scoped, read-only version of the Lines grid limited to their own lines on the customer portal.
Common tasks
Provision a new IPTV line manually Open IPTV Lines and click Create. Fill in username, password, package, and connections; save. The line is created locally as a normal grid row — line creation on the panel itself is not automated here, so pair this with the panel-side account setup if one doesn't already exist.
Pull existing lines from the panel In IPTV Lines, click "Sync from Panel" in the toolbar. This calls the CMSPanel
lines/linesendpoint and upserts every returned line by its panel ID (falling back to username), refreshing status, expiry, trial/lock flags, and connection count. Safe to re-run — it is idempotent.Extend, enable, or delete a line on the panel Select a line in IPTV Lines and use the row actions: Extend (renew, optionally passing a package), Enable (reactivate a suspended line), or Delete on Panel (permanently removes it on CMSPanel and marks the local row expired/locked). Each action requires the line to already have a Panel ID — run "Sync from Panel" first if it doesn't.
Refresh sellable packages Open the Packages grid and click "Sync Packages." This pulls both the paid and trial package lists from CMSPanel and upserts them by name, including duration and connection limits.
Refresh the streaming catalog From Live Channels, VOD, or Series, click "Sync Catalog." All three trigger the same catalog sync, which pulls live channels, VOD titles, and series from the Xtream streaming server in one pass and updates the three catalog tables. You can optionally pin a specific line's credentials for the sync via the username/password prompt; otherwise the first usable line is used.
Set up the panel connection (prerequisite for all sync/action buttons) Under Connections, configure the
iptv_providerconnection with a token, username, and password for the CMSPanel account. Every sync and per-line action checks for this first and returns a clear error ("IPTV panel not configured...") if it's missing.
Data model
- IptvLine (
isp_data_iptv) — a provisioned subscriber line: username/password, panel line ID, package, connections, expiry, status (active/suspended/expired), trial and locked flags, reseller notes, and links tocustomer_id(billed party),reseller_user_id(owning reseller, when the line belongs to a reseller's end-user),item_id(catalog item for pricing), anddomain_uuid/domain_name(service hostname). This is the core entity of the module. - IptvAccount (
isp_iptv_accounts) — a reseller's own CMSPanel login: username/password, panel name, credit balance, status. Distinct from the lines it provisions. - IptvPackage (
isp_iptv_packages) — a sellable package definition: name, duration in months, connection count, trial flag. - IptvLiveStream (
isp_iptv_live_streams), IptvVodStream (isp_iptv_vod_streams), IptvSeries (isp_iptv_series) — the mirrored Xtream catalog: stream/series ID, name, category, and type-specific fields (EPG channel ID for live, rating/format for VOD, genre/release date for series).
Relationship to subscriptions: IptvLine.domain_name, item_id, and started_at were absorbed from the generic Subscription record once the Subscriptions grid was dropped from the MovieMagic customer portal — every MovieMagic subscription was IPTV, so these facts now live directly on the line instead of a separate subscription row. item_id is the drill-down into the catalog item (AccItem) that prices the line.
Configuration & integrations
iptv_providerconnection — configured under the site's Connections grid (via theerp_credentialsoverlay), holding the CMSPaneltoken,username, andpassword. All panel calls (line sync, extend/enable/delete, package sync, catalog sync) resolve this connection first and fail fast with a setup prompt if it's incomplete.- CMSPanel supplier — the underlying IPTV panel, integrated through
app.services.providers.iptv_provider, ported from the CloudTools portal'sIptvService.php. Used forlines/lines(line listing), line extend/enable/delete, andlines/packages/{0,1}(paid/trial package listing). - Xtream catalog sync —
app.services.iptv_catalog_sync, ported from theiptv:sync-catalogjob, pulls the live/VOD/series catalog from the Xtream streaming server using one of the reseller's line credentials. - Site availability — the module's grids are registered only on the
mm(MovieMagic operator) andmm_portal(customer portal) sites; it was intentionally left off the reseller portal, whose product line doesn't include IPTV.
API reference
IPTV grids use the platform's generic grid CRUD REST API — there are no IPTV-specific routes, only IPTV-specific row actions:
GET /grid/{slug}/data— list/search/paginate rows (slugis one ofiptv-lines,iptv-accounts,iptv-packages,iptv-live-streams,iptv-vod-streams,iptv-series).POST /grid/{slug}— create a row.PUT /grid/{slug}/{row_id}— update a row.DELETE /grid/{slug}/{row_id}— delete a row.GET /grid/{slug}/stats— grid summary stats (e.g. total/active/trial line counts).POST /grid/{slug}/action/{key}— run a row or toolbar action button; this is how all panel/catalog integration is triggered:iptv-lines→sync(pull lines from panel),extend,enable,delete_paneliptv-packages→sync(pull paid + trial packages)iptv-live-streams,iptv-vod-streams,iptv-series→sync(refresh the Xtream catalog; same handler on all three)