[grilo-plugins] local-metadata: new match for tv series
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] local-metadata: new match for tv series
- Date: Mon, 30 Jun 2014 01:11:46 +0000 (UTC)
commit 5cfbe38bea990f80e600ceee3d09fa7f12c1c6ac
Author: Victor Toso <me victortoso com>
Date: Thu Jun 26 10:48:14 2014 -0300
local-metadata: new match for tv series
- Match season and episode with dots
e.g: season: 2, episode 05 is (..) 2.05
- Match title inside parentheses.
https://bugzilla.gnome.org/show_bug.cgi?id=732261
src/local-metadata/grl-local-metadata.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/local-metadata/grl-local-metadata.c b/src/local-metadata/grl-local-metadata.c
index e797c10..03f35ee 100644
--- a/src/local-metadata/grl-local-metadata.c
+++ b/src/local-metadata/grl-local-metadata.c
@@ -47,9 +47,9 @@ GRL_LOG_DOMAIN_STATIC(local_metadata_log_domain);
#define TV_REGEX \
"(?<showname>.*)\\." \
- "(?<season>[sS]\\d{1,2}|\\d{1,2})" \
- "(?<episode>(?:[eExX]\\d{1,2}))" \
- "\\.?(?<name>.*)?"
+ "(?<season>[sS\\.]\\d{1,2}|\\d{1,2})" \
+ "(?<episode>(?:[eExX\\.]\\d{1,2}))" \
+ "\\.?(?<name>.*|(?:\().*))?"
#define MOVIE_REGEX \
"(?<name>.*)" \
"(?<year>19\\d{2}|20\\d{2})"
@@ -347,7 +347,7 @@ video_guess_values_from_display_name (const gchar *display_name,
if (g_match_info_matches (info)) {
if (title) {
*title = g_match_info_fetch_named (info, "name");
- g_strdelimit (*title, ".", ' ');
+ g_strdelimit (*title, ".()", ' ');
}
if (showname) {
@@ -373,7 +373,7 @@ video_guess_values_from_display_name (const gchar *display_name,
if (episode) {
gchar *e = g_match_info_fetch_named (info, "episode");
if (e) {
- if (*e == 'e' || *e == 'E' || *e == 'x') {
+ if (*e == 'e' || *e == 'E' || *e == 'x' || *e == '.') {
*episode = atoi (e + 1);
} else {
*episode = atoi (e);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]