Permalink
Browse files

import videos

  • Loading branch information...
julienmru committed Mar 7, 2017
1 parent afbba99 commit 93d66ed2fec8ffaae02c93e5d0798d1d58dd8ca2
View
0 LICENSE 100644 → 100755
No changes.
View
0 README.md 100644 → 100755
No changes.
@@ -16,6 +16,7 @@
prop,<:texte_statut_propose_evaluation:>,
publie,<:texte_statut_publie:>}})]
[(#SAISIE{mot, mots, label=<:spipagram:label_mots:>, multiple=oui})]
[(#SAISIE{input, frequence, label=<:spipagram:label_frequence:>, defaut=3600, explication=<:spipagram:explication_frequence:>})]
</ul>
<input type="hidden" name="_meta_casier" value="spipagram/config" />
View
0 images/logo_spipagram.svg 100644 → 100755
No changes.
View
0 images/logo_spipagram_256.png 100644 → 100755
No changes.
View
0 images/logo_spipagram_32.png 100644 → 100755
No changes.
View
@@ -0,0 +1,3 @@
installation: charger_plugin
date: 2017-03-06T04:59:20Z
source: ../tmp/cache/chargeur/v1.2.0-a2360747-spipagram.zip
View
@@ -13,6 +13,8 @@
'label_auteur' => 'Articles’ author',
'label_statut' => 'Status',
'label_mots' => 'Attached keyword(s)',
'label_frequence' => 'Import frequency',
'explication_frequence' => 'Import frequency in seconds<br><strong>Warning:</strong> if you change the frequency, you will need to reset the job queue in the <a href="?exec=job_queue">List of tasks</a> menu, so that change is effective immediately.',
'debug_spipagram' => 'Debug Spipagram',
'non_configure' => 'not configured',
'connexion_a_instagram' => 'Connectivity to Instagram',
View
@@ -13,6 +13,8 @@
'label_auteur' => 'Auteur des articles',
'label_statut' => 'Statut',
'label_mots' => 'Mot(s) clé(s) associé(s)',
'label_frequence' => 'Fréquence des imports',
'explication_frequence' => 'Fréquence des imports en secondes<br><strong>Attention :</strong> si vous modifiez la fréquence il vous faudra réinitialiser la liste des travaux via le menu <a href="?exec=job_queue">Liste des travaux</a> pour une prise en compte immédiate.',
'debug_spipagram' => 'Déboguer Spipagram',
'non_configure' => 'non configuré',
'connexion_a_instagram' => 'Connexion à Instagram',
View
@@ -1,7 +1,7 @@
<paquet
prefix="spipagram"
categorie="multimedia"
version="1.2.0"
version="1.3.0"
etat="stable"
compatibilite="[3.0.0;3.1.*]"
documentation="http://contrib.spip.net/spipagram"
View
0 prive/exec/debug_spipagram.html 100644 → 100755
No changes.
View
@@ -109,6 +109,20 @@ function spipagram_import(){
spip_log('Impossible de copier le logo', 'spipagram'._LOG_AVERTISSEMENT);
}
}
if (isset($_item->videos->standard_resolution->url) && sql_countsel('spip_documents', 'objet = "article" and id_objet = '.$id_article) == 0) {
spip_log('Ajout de la vidéo pour l’article '.$id_article.' depuis '.$_item->videos->standard_resolution->url, 'spipagram'._LOG_INFO);
$ajouter_documents = charger_fonction('ajouter_documents', 'action');
$file = [
'name' => basename($_item->videos->standard_resolution->url),
'tmp_name' => $_item->videos->standard_resolution->url,
'distant' => TRUE,
'mode '=> 'document',
];
if (!($ajouter_documents(0, [$file], 'article', $id_article, $mode))) {
spip_log('Impossible de copier la vidéo', 'spipagram'._LOG_AVERTISSEMENT);
}
}
}
if (isset($old_id_auteur)) $GLOBALS['visiteur_session']['id_auteur'] = $old_id_auteur;
View
@@ -9,6 +9,12 @@
if (!defined("_ECRIRE_INC_VERSION")) return;
function spipagram_taches_generales_cron($taches){
$taches['spipagram_import'] = 3600;
include_spip('inc/config');
if ($_frequence = intval(lire_config('spipagram/config/frequence'))) {
$taches['spipagram_import'] = max(300, (int)$_frequence);
} else {
$taches['spipagram_import'] = 3600;
}
return $taches;
}
View
@@ -0,0 +1,10 @@
<svn_revision>
<text_version>
Origine: https://github.com/cahri/spip-spipagram/tags/v1.2.0
Revision: 21
Dernier commit: 2017-02-26 12:04:33 +0100
</text_version>
<origine>https://github.com/cahri/spip-spipagram/tags/v1.2.0</origine>
<revision>21</revision>
<commit>2017-02-26 12:04:33 +0100 </commit>
</svn_revision>

0 comments on commit 93d66ed

Please sign in to comment.