mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
update to movim 0.9-2015-09-10
This commit is contained in:
parent
7f7d89bbdd
commit
88279612ef
5 changed files with 36 additions and 38 deletions
|
@ -7,12 +7,12 @@ Warning: BETA.
|
|||
|
||||
You need a valid SSL certificate to use Movim, auto-signed is not allowed.
|
||||
|
||||
Current Movim version : 0.9 git2015-09-07
|
||||
Current Movim version : 0.9 git2015-09-10
|
||||
|
||||
**Changelog**
|
||||
|
||||
0.9b 2015-0
|
||||
- Update to Movim 0.9 git2015-09-07
|
||||
- Update to Movim 0.9 git2015-09-10
|
||||
- Add notes in README about public pods & whitelisting
|
||||
- script/install now check if path is empty.
|
||||
- script/remove now delete /etc/php/fpm/pool.d/movim.conf (fix #8).
|
||||
|
|
|
@ -389,6 +389,26 @@ class Contact extends Model {
|
|||
}
|
||||
}
|
||||
|
||||
function getAlbum()
|
||||
{
|
||||
$uri = str_replace(
|
||||
' ',
|
||||
'%20',
|
||||
'http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=80c1aa3abfa9e3d06f404a2e781e38f9&artist='.
|
||||
$this->tuneartist.
|
||||
'&album='.
|
||||
$this->tunesource.
|
||||
'&format=json'
|
||||
);
|
||||
|
||||
$json = json_decode(requestURL($uri, 2));
|
||||
|
||||
if($json->album) {
|
||||
$json->album->url = $json->album->image[2]->{'#text'};
|
||||
return $json->album;
|
||||
}
|
||||
}
|
||||
|
||||
function toRoster() {
|
||||
return array(
|
||||
'jid' => $this->jid,
|
||||
|
|
|
@ -271,26 +271,6 @@ class Contact extends WidgetBase
|
|||
}
|
||||
}
|
||||
|
||||
function getLastFM($contact)
|
||||
{
|
||||
$uri = str_replace(
|
||||
' ',
|
||||
'%20',
|
||||
'http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=80c1aa3abfa9e3d06f404a2e781e38f9&artist='.
|
||||
$contact->tuneartist.
|
||||
'&album='.
|
||||
$contact->tunesource.
|
||||
'&format=json'
|
||||
);
|
||||
|
||||
$json = json_decode(requestURL($uri, 2));
|
||||
|
||||
$img = $json->album->image[2]->{'#text'};
|
||||
$url = $json->album->url;
|
||||
|
||||
return array($img, $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Validate the jid
|
||||
*
|
||||
|
|
|
@ -172,26 +172,25 @@
|
|||
</ul>
|
||||
{/if}
|
||||
|
||||
{if="$contact->tuneartist || $contact->tunetitle"}
|
||||
{$album = $contact->getAlbum()}
|
||||
{if="$album"}
|
||||
<ul class="flex">
|
||||
<li class="subheader block large">{$c->__('general.tune')}</li>
|
||||
|
||||
{$img_array = $c->getLastFM($contact)}
|
||||
<li class="
|
||||
block
|
||||
{if="$contact->tunetitle"}condensed{/if}
|
||||
{if="isset($img_array[1]) && $img_array[1] != ''"} action{/if}
|
||||
action
|
||||
">
|
||||
{if="isset($img_array[1]) && $img_array[1] != ''"}
|
||||
|
||||
<div class="action">
|
||||
<a href="{$img_array[1]}" target="_blank">
|
||||
<a href="{$album->url}" target="_blank">
|
||||
<i class="zmdi zmdi-radio"></i>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
<span class="icon bubble">
|
||||
{if="isset($img_array[0]) && $img_array[0] != ''"}
|
||||
<img src="{$img_array[0]}"/>
|
||||
{if="isset($album->url)"}
|
||||
<img src="{$album->url}"/>
|
||||
{else}
|
||||
<i class="zmdi zmdi-play-circle-fill"></i>
|
||||
{/if}
|
||||
|
@ -204,7 +203,6 @@
|
|||
{$contact->tunesource}
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
{if="$contact->tunetitle"}
|
||||
<p>{$contact->tunetitle}</p>
|
||||
{/if}
|
||||
|
|
|
@ -31,13 +31,13 @@
|
|||
<!--ng-class="rosterCtrl.getContactClient(myjid.ajiditems)"-- >-->
|
||||
<div
|
||||
class="action"
|
||||
ng-if="myjid.ajiditems.rosterview.tune != '' || myjid.ajiditems.rosterview.type != '' || myjid.ajiditems.rosterview.subscription != 'both'"
|
||||
ng-if="myjid.ajiditems.rosterview.tune || myjid.ajiditems.rosterview.type != '' || myjid.ajiditems.rosterview.subscription != 'both'"
|
||||
ng-switch on="myjid.ajiditems.rosterview.type">
|
||||
<i ng-switch-when="handheld" class="zmdi zmdi-smartphone"></i>
|
||||
<i ng-switch-when="phone" class="zmdi zmdi-smartphone"></i>
|
||||
<i ng-switch-when="web" class="zmdi zmdi-globe-alt"></i>
|
||||
<i ng-switch-when="bot" class="zmdi zmdi-memory"></i>
|
||||
<i ng-if="myjid.ajiditems.rosterview.tune" class="zmdi zmdi-play-arrow"></i>
|
||||
<i ng-if="myjid.ajiditems.rosterview.tune" class="zmdi zmdi-play"></i>
|
||||
<i ng-if="myjid.ajiditems.rosterview.subscription == 'to'" class="zmdi zmdi-arrow-in"></i>
|
||||
<i ng-if="myjid.ajiditems.rosterview.subscription == 'from'" class="zmdi zmdi-arrow-out"></i>
|
||||
<i ng-if="myjid.ajiditems.rosterview.subscription == 'none'" class="zmdi zmdi-do-not-disturb"></i>
|
||||
|
|
Loading…
Reference in a new issue