541 | | programid.append(episode); |
542 | | programid.append(season); |
543 | | if (pginfo->partnumber && pginfo->parttotal) |
| 541 | /* Append unpadded episode and season number to the seriesid (to |
| 542 | maintain consistency with historical encoding), but limit the |
| 543 | season number representation to a single base-36 character to |
| 544 | ensure unique programid generation. */ |
| 545 | int season_int = season.toInt(); |
| 546 | if (season_int > 35) |
545 | | programid += QString::number(pginfo->partnumber); |
546 | | programid += QString::number(pginfo->parttotal); |
| 548 | // Can not represent season as a single base-36 character, so |
| 549 | // remove the programid and fall back to normal dup matching. |
| 550 | if (kCategoryMovie != pginfo->categoryType) |
| 551 | programid.clear(); |
| 552 | } |
| 553 | else |
| 554 | { |
| 555 | programid.append(episode); |
| 556 | programid.append(QString::number(season_int, 36)); |
| 557 | if (pginfo->partnumber && pginfo->parttotal) |
| 558 | { |
| 559 | programid += QString::number(pginfo->partnumber); |
| 560 | programid += QString::number(pginfo->parttotal); |
| 561 | } |