Switch to unified view

a/src/mediaserver/cdplugins/uprcl/uprcltags.py b/src/mediaserver/cdplugins/uprcl/uprcltags.py
...
...
13
#
13
#
14
# You should have received a copy of the GNU General Public License
14
# You should have received a copy of the GNU General Public License
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
16
17
import sys
17
import sys
18
PY3 = sys.version > '3'
18
import os
19
import os
19
import sqlite3
20
import sqlite3
20
import time
21
import time
21
import tempfile
22
import tempfile
22
from timeit import default_timer as timer
23
from timeit import default_timer as timer
...
...
282
        c = self._conn.cursor()
283
        c = self._conn.cursor()
283
        c.execute(stmt, values)
284
        c.execute(stmt, values)
284
        entries = [rcldoctoentry(pid + '$i' + str(r[0]),
285
        entries = [rcldoctoentry(pid + '$i' + str(r[0]),
285
                                 pid, self._httphp, self._pprefix,
286
                                 pid, self._httphp, self._pprefix,
286
                                 self._rcldocs[r[0]]) for r in c]
287
                                 self._rcldocs[r[0]]) for r in c]
288
        if PY3:
289
            return sorted(entries, key=cmpentries)
290
        else:
287
        return sorted(entries, cmp=cmpentries)
291
            return sorted(entries, cmp=cmpentries)
288
    
292
    
289
293
290
    # Return a list of trackids as selected by the current
294
    # Return a list of trackids as selected by the current
291
    # path <selwhere> is like: WHERE col1_id = ? AND col2_id = ? [...], and
295
    # path <selwhere> is like: WHERE col1_id = ? AND col2_id = ? [...], and
292
    # <values> holds the corresponding values
296
    # <values> holds the corresponding values
...
...
461
                for docidx in docids:
465
                for docidx in docids:
462
                    id = pid + '$*i' + str(docidx)
466
                    id = pid + '$*i' + str(docidx)
463
                    entries.append(rcldoctoentry(id, pid, self._httphp,
467
                    entries.append(rcldoctoentry(id, pid, self._httphp,
464
                                                 self._pprefix,
468
                                                 self._pprefix,
465
                                                 self._rcldocs[docidx]))
469
                                                 self._rcldocs[docidx]))
470
                    if PY3:
471
                        entries = sorted(entries, key=cmpentries)
472
                    else:
466
                    entries = sorted(entries, cmp=cmpentries)
473
                        entries = sorted(entries, cmp=cmpentries)
467
            else:
474
            else:
468
                for tt in subqs:
475
                for tt in subqs:
469
                    id = pid + '$=' + tt
476
                    id = pid + '$=' + tt
470
                    entries.append(rcldirentry(id, pid, tt))
477
                    entries.append(rcldirentry(id, pid, tt))
471
        else:
478
        else: