[mythtv-commits] Ticket #10006: [bug] sort Season/Episod for serie in Mythfrontend
MythTV
noreply at mythtv.org
Wed Aug 24 12:58:58 UTC 2011
#10006: [bug] sort Season/Episod for serie in Mythfrontend
-------------------------+--------------------------------------
Reporter: mgf@… | Type: Bug Report - General
Status: new | Priority: minor
Milestone: 0.25 | Component: MythTV - General
Version: Trunk Head | Severity: medium
Keywords: | Ticket locked: 0
-------------------------+--------------------------------------
Sort Season-Episod don't work properly, he sort alphabetically , not
numerically !
sample : '''1''',10,11,'''2''',21,22......
solution (for sample) in playbackbox.cpp:
{{{
static int comp_season(const ProgramInfo *a, const ProgramInfo *b)
{
if (atoi(a->GetSeason()) == atoi(b->GetSeason()))
return (atoi(a->GetEpisode()) <
atoi(b->GetEpisode()) ? 1 : -1);
else
return (atoi(a->GetSeason()) <
atoi(b->GetSeason()) ? 1 : -1);
}
static int comp_season_rev(const ProgramInfo *a, const ProgramInfo *b)
{
if (atoi(a->GetSeason()) == atoi(b->GetSeason()))
return (atoi(a->GetEpisode()) >
atoi(b->GetEpisode()) ? 1 : -1);
else
return (atoi(a->GetSeason()) >
atoi(b->GetSeason()) ? 1 : -1);
}
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/10006>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list