Crash with negative track numbers
Created by: xJota
Environment
- Lollypop version: 0.9.244
Bug/Feature
For some reason I have songs with negative track_numbers and Lollypop is not correctly handling them and crashing when I try to play said song. The issue is at line 395 in lollypop/mpris.py
I've added a print(str(track_number)) so we can see what track_number is being extracted:
4294967295
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/lollypop/mpris.py", line 395, in __on_current_changed
self.__update_metadata()
File "/usr/lib/python3.6/site-packages/lollypop/mpris.py", line 337, in __update_metadata
track_number)
File "/usr/lib64/python3.6/site-packages/gi/overrides/GLib.py", line 243, in __new__
(v, rest_format, _) = creator._create(format_string, [value])
File "/usr/lib64/python3.6/site-packages/gi/overrides/GLib.py", line 126, in _create
v = constructor(args[0])
OverflowError: 4294967295 not in range -2147483648 to 2147483647
The actual track_number inside the file metadata is -1, but it is being extracted as 4294967295 (since 2^32 -1 = 4294967295)