epgsearch: use new plugin hooks instead of magic keys (requires enigma2 >= 4.3.2r4)
[enigma2-plugins.git] / valixdcontrol / src / comp / suomi_patch
1 #!/bin/sh
2 if [ `grep "                            res.append(MultiContentEntryText(pos=(50, 0), size=(310, 22), font=1, flags=RT_HALIGN_LEFT, text=filename))" /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieList.py | wc -l` -gt 0 ]; then
3 echo "Suomipoeka MovieList found, try to patch it ......."
4 cp /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieList.py /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieList.py_org
5 cat /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieList.py | sed -e "s/                             res.append(MultiContentEntryText(pos=(50, 0), size=(310, 22), font=1, flags=RT_HALIGN_LEFT, text=filename))/                            res.append(MultiContentEntryText(pos=(50, 0), size=(563, 25), font=1, flags=RT_HALIGN_LEFT, text=filename))/g" > /tmp/MovieList_patched1.py
6 cat /tmp/MovieList_patched1.py | sed -e "s/                             res.append(MultiContentEntryText(pos=(366, 0), size=(200, 22), font=1, flags=RT_HALIGN_LEFT, text=_(\"Directory\")))/                           res.append(MultiContentEntryText(pos=(615, 0), size=(200, 25), font=1, flags=RT_HALIGN_RIGHT, text=_(\"Directory\")))/g" > /tmp/MovieList_patched2.py
7 cat /tmp/MovieList_patched2.py | sed -e "s/                     res.append(MultiContentEntryText(pos=(380, 0), size=(90, 22), font=1, flags=RT_HALIGN_RIGHT, text=date))/                       res.append(MultiContentEntryText(pos=(675, 0), size=(90, 25), font=1, flags=RT_HALIGN_RIGHT, text=date))/g" > /tmp/MovieList_patched3.py
8 cat /tmp/MovieList_patched3.py | sed -e "s/                     res.append(MultiContentEntryText(pos=(posx, 0), size=(400-posx, 22), font=1, flags=RT_HALIGN_LEFT, text=moviestring))/                  res.append(MultiContentEntryText(pos=(posx, 0), size=(705-posx, 25), font=1, flags=RT_HALIGN_LEFT, text=moviestring))/g" > /tmp/MovieList_patched4.py
9 cat /tmp/MovieList_patched4.py | sed -e "s/                     res.append(MultiContentEntryText(pos=(470, 0), size=(85, 22), font=1, flags=RT_HALIGN_LEFT, text=time))/                        res.append(MultiContentEntryText(pos=(765, 0), size=(85, 25), font=1, flags=RT_HALIGN_LEFT, text=time))/g" > /tmp/MovieList_patched5.py
10 cp /tmp/MovieList_patched5.py /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieList.py
11 rm -rf /tmp/MovieList_patched*.py
12 else
13 echo "Nothing to do!"
14 fi
15
16 if [ `grep "    WINDOW_HEIGHT = 444" /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieSelection.py | wc -l` -gt 0 ]; then
17 echo "Suomipoeka MovieSelection found, try to patch it ......."
18 cp /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieSelection.py /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieSelection.py_org
19 cat /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieSelection.py_org | sed -e "s/    WINDOW_HEIGHT = 444/    #WINDOW_HEIGHT = 444/g" > /usr/lib/enigma2/python/Plugins/Extensions/Suomipoeka/MovieSelection.py
20 else
21 echo "Nothing to do!"
22 fi
23 exit 0