Skip to content

Commit

Permalink
Rawr
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldenfreddy0703 committed Nov 28, 2024
1 parent 62715d8 commit 3023b46
Show file tree
Hide file tree
Showing 12 changed files with 147 additions and 12 deletions.
2 changes: 1 addition & 1 deletion repo/plugin.video.otaku.testing/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.otaku.testing" name="Otaku Testing" provider-name="TeamOtaku" version="5.1.24">
<addon id="plugin.video.otaku.testing" name="Otaku Testing" provider-name="TeamOtaku" version="5.1.25">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.beautifulsoup4"/>
Expand Down
5 changes: 5 additions & 0 deletions repo/plugin.video.otaku.testing/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Changelog v5.1.25 (2024-11-28):
- Improved Airing Calendar for Mal
- Fix Small Bug with smartscroll
- Added Simkl Ranks to Mal Calendar

Changelog v5.1.24 (2024-11-27):
- Added Airing Anime Calendar

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_season_year(self, period='current'):
return season, year


def get_airing_calendar(self, page=1, format_in=''):
def get_airing_calendar(self, page=1):
import datetime
import time
import itertools
Expand Down Expand Up @@ -116,7 +116,7 @@ def get_airing_calendar(self, page=1, format_in=''):

results = list(map(self.process_airing_view, list_))
results = list(itertools.chain(*results))
airing = database.get(lambda x, y: results, 12, page, self.format_in_type)
airing = database.get(lambda x: results, 24, page)
return airing


Expand Down
9 changes: 5 additions & 4 deletions repo/plugin.video.otaku.testing/resources/lib/MalBrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_season_year(self, period='current'):
season_start_date_last, season_end_date_last, year_start_date_last, year_end_date_last,
season_start_date_next, season_end_date_next, year_start_date_next, year_end_date_next)

def get_airing_calendar(self, page=1, format_in=''):
def get_airing_calendar(self, page=1):
import time

days_of_week = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
Expand Down Expand Up @@ -1548,7 +1548,7 @@ def base_airing_view(self, res, ts):
airingAt_day = airingAt.strftime('%A')
airingAt_time = airingAt.strftime('%I:%M %p')
airing_status = 'airing' if airingAt.timestamp() > ts else 'aired'
rank = None
simkl_rank = None
genres = [genre['name'] for genre in res['genres']]
if genres:
genres = ' | '.join(genres[:3])
Expand All @@ -1563,6 +1563,7 @@ def base_airing_view(self, res, ts):
if simkl_entry:
episode = simkl_entry['episode']['episode']
rating = simkl_entry['ratings']['simkl']['rating']
simkl_rank = simkl_entry['rank']
airingAt = datetime.datetime.fromisoformat(simkl_entry['date'].replace('Z', '+00:00'))
airingAt_day = airingAt.strftime('%A')
airingAt_time = airingAt.strftime('%I:%M %p')
Expand All @@ -1578,8 +1579,8 @@ def base_airing_view(self, res, ts):
'poster': res['images']['jpg']['image_url'],
'ep_title': '{} {} {}'.format(episode, airing_status, airingAt_day),
'ep_airingAt': airingAt_time,
'averageScore': score,
'rank': rank,
'rating': score,
'simkl_rank': simkl_rank,
'plot': res['synopsis'].replace('<br><br>', '[CR]').replace('<br>', '').replace('<i>', '[I]').replace('</i>', '[/I]') if res['synopsis'] else res['synopsis'],
'genres': genres,
'id': res['mal_id']
Expand Down
2 changes: 0 additions & 2 deletions repo/plugin.video.otaku.testing/resources/lib/ui/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,8 @@ def draw_items(video_data, content_type=None, draw_cm=None):
for _ in range(num_watched):
if getInt('smart.scroll.direction') == 0:
xbmc.executebuiltin('Action(Down)')
print('down')
else:
xbmc.executebuiltin('Action(Right)')
print('right')


def bulk_player_list(video_data, draw_cm=None, bulk_add=True):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def __init__(self, xml_file, location, actionArgs=None):
self.setProperty('texture.averstr', os.path.join(control.IMAGES_PATH, 'anichart-icon-null.png'))
self.setProperty('texture.aversad', os.path.join(control.IMAGES_PATH, 'anichart-icon-frown.png'))
self.setProperty('texture.popular', os.path.join(control.IMAGES_PATH, 'anichart-icon-popular.png'))
self.setProperty('texture.simkl_rank', os.path.join(control.IMAGES_PATH, 'anichart-icon-simkl.png'))
self.setProperty('otaku.logo', control.OTAKU_LOGO3_PATH)
self.setProperty('otaku.fanart', control.OTAKU_FANART)
self.setProperty('settings.color', 'deepskyblue')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,71 @@
<align>left</align>
<label>#$INFO[ListItem.Property(rank)]</label>
</control>

<control type="group">
<left>750</left>
<top>10</top>
<control type="label">
<visible>Integer.IsGreater(ListItem.Property(rating),0)</visible>
<left>-110</left>
<top>0</top>
<width>100</width>
<height>22</height>
<font>font12</font>
<selectedcolor>white</selectedcolor>
<align>right</align>
<label>$INFO[ListItem.Property(rating)]%</label>
</control>
<control type="image">
<visible>Integer.IsGreaterOrEqual(ListItem.Property(rating),75)</visible>
<left>0</left>
<top>0</top>
<width>35</width>
<height>35</height>
<texture>$INFO[Window().Property(texture.aver)]</texture>
</control>
<control type="image">
<visible>Integer.IsGreater(ListItem.Property(rating),60) + Integer.IsLess(ListItem.Property(rating),75)</visible>
<left>0</left>
<top>0</top>
<width>35</width>
<height>35</height>
<texture>$INFO[Window().Property(texture.averstr)]</texture>
</control>
<control type="image">
<visible>Integer.IsGreater(ListItem.Property(rating),0) + Integer.IsLessOrEqual(ListItem.Property(rating),60)</visible>
<left>0</left>
<top>0</top>
<width>35</width>
<height>35</height>
<texture>$INFO[Window().Property(texture.aversad)]</texture>
</control>
</control>

<control type="group">
<left>750</left>
<top>60</top>
<control type="label">
<visible>Integer.IsGreater(ListItem.Property(simkl_rank),0)</visible>
<left>-110</left>
<top>0</top>
<width>100</width>
<height>22</height>
<font>font12</font>
<selectedcolor>white</selectedcolor>
<align>right</align>
<label>#$INFO[ListItem.Property(simkl_rank)]</label>
</control>
<control type="image">
<visible>Integer.IsGreater(ListItem.Property(simkl_rank),0)</visible>
<left>0</left>
<top>0</top>
<width>35</width>
<height>35</height>
<texture>$INFO[Window().Property(texture.simkl_rank)]</texture>
</control>
</control>

</itemlayout>
<focusedlayout height="390" width="800">
<control type="image">
Expand Down Expand Up @@ -339,6 +404,71 @@
<align>left</align>
<label>#$INFO[ListItem.Property(rank)]</label>
</control>

<control type="group">
<left>750</left>
<top>10</top>
<control type="label">
<visible>Integer.IsGreater(ListItem.Property(rating),0)</visible>
<left>-110</left>
<top>0</top>
<width>100</width>
<height>22</height>
<font>font12</font>
<selectedcolor>white</selectedcolor>
<align>right</align>
<label>$INFO[ListItem.Property(rating)]%</label>
</control>
<control type="image">
<visible>Integer.IsGreaterOrEqual(ListItem.Property(rating),75)</visible>
<left>0</left>
<top>0</top>
<width>35</width>
<height>35</height>
<texture>$INFO[Window().Property(texture.aver)]</texture>
</control>
<control type="image">
<visible>Integer.IsGreater(ListItem.Property(rating),60) + Integer.IsLess(ListItem.Property(rating),75)</visible>
<left>0</left>
<top>0</top>
<width>35</width>
<height>35</height>
<texture>$INFO[Window().Property(texture.averstr)]</texture>
</control>
<control type="image">
<visible>Integer.IsGreater(ListItem.Property(rating),0) + Integer.IsLessOrEqual(ListItem.Property(rating),60)</visible>
<left>0</left>
<top>0</top>
<width>35</width>
<height>35</height>
<texture>$INFO[Window().Property(texture.aversad)]</texture>
</control>
</control>

<control type="group">
<left>750</left>
<top>60</top>
<control type="label">
<visible>Integer.IsGreater(ListItem.Property(simkl_rank),0)</visible>
<left>-110</left>
<top>0</top>
<width>100</width>
<height>22</height>
<font>font12</font>
<selectedcolor>white</selectedcolor>
<align>right</align>
<label>#$INFO[ListItem.Property(simkl_rank)]</label>
</control>
<control type="image">
<visible>Integer.IsGreater(ListItem.Property(simkl_rank),0)</visible>
<left>0</left>
<top>0</top>
<width>35</width>
<height>35</height>
<texture>$INFO[Window().Property(texture.simkl_rank)]</texture>
</control>
</control>

</focusedlayout>
</control>

Expand Down
2 changes: 1 addition & 1 deletion repo/zips/addons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<poster>poster.png</poster>
</assets>
</extension>
</addon><addon id="plugin.video.otaku.testing" name="Otaku Testing" provider-name="TeamOtaku" version="5.1.24">
</addon><addon id="plugin.video.otaku.testing" name="Otaku Testing" provider-name="TeamOtaku" version="5.1.25">
<requires>
<import addon="xbmc.python" version="3.0.0" />
<import addon="script.module.beautifulsoup4" />
Expand Down
2 changes: 1 addition & 1 deletion repo/zips/addons.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
09849429bee7e7eedb9d858bbe21197f
0bd728c846bbf4ebc57da56651d01d3b
2 changes: 1 addition & 1 deletion repo/zips/plugin.video.otaku.testing/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.otaku.testing" name="Otaku Testing" provider-name="TeamOtaku" version="5.1.24">
<addon id="plugin.video.otaku.testing" name="Otaku Testing" provider-name="TeamOtaku" version="5.1.25">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.beautifulsoup4"/>
Expand Down
Binary file not shown.

0 comments on commit 3023b46

Please sign in to comment.